aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-10-20 23:22:44 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-10-20 23:22:44 +0300
commit478fc5517c686c080797f840cc000cc9828ffcb4 (patch)
treebe57e8f4eb9c290d8401631f586b59ed2d8928a6 /src
parent1a9389f0687017430c84ade3252f46ac4b77a738 (diff)
downloadluarocks-478fc5517c686c080797f840cc000cc9828ffcb4.tar.gz
luarocks-478fc5517c686c080797f840cc000cc9828ffcb4.tar.bz2
luarocks-478fc5517c686c080797f840cc000cc9828ffcb4.zip
Remove some unused locals and imports
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/build.lua2
-rw-r--r--src/luarocks/command_line.lua1
-rw-r--r--src/luarocks/deps.lua1
-rw-r--r--src/luarocks/manif.lua3
-rw-r--r--src/luarocks/path_cmd.lua3
-rw-r--r--src/luarocks/remove.lua1
6 files changed, 2 insertions, 9 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua
index f52fb7a8..20d094b1 100644
--- a/src/luarocks/build.lua
+++ b/src/luarocks/build.lua
@@ -203,7 +203,7 @@ function build.build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_m
203 end 203 end
204 204
205 if not minimal_mode then 205 if not minimal_mode then
206 local _, source_dir 206 local source_dir
207 if need_to_fetch then 207 if need_to_fetch then
208 ok, source_dir, errcode = fetch.fetch_sources(rockspec, true) 208 ok, source_dir, errcode = fetch.fetch_sources(rockspec, true)
209 if not ok then 209 if not ok then
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua
index 858e871f..ecf3a61b 100644
--- a/src/luarocks/command_line.lua
+++ b/src/luarocks/command_line.lua
@@ -2,7 +2,6 @@
2--- Functions for command-line scripts. 2--- Functions for command-line scripts.
3local command_line = {} 3local command_line = {}
4 4
5local pack = function(...) return {...}, select("#", ...) end
6local unpack = unpack or table.unpack 5local unpack = unpack or table.unpack
7 6
8local util = require("luarocks.util") 7local util = require("luarocks.util")
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index f8deff3c..756ba6bd 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -691,7 +691,6 @@ function deps.scan_deps(results, missing, manifest, name, version, deps_mode)
691 691
692 local fetch = require("luarocks.fetch") 692 local fetch = require("luarocks.fetch")
693 693
694 local err
695 if results[name] then 694 if results[name] then
696 return results, missing 695 return results, missing
697 end 696 end
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index 1b75452b..2d983a85 100644
--- a/src/luarocks/manif.lua
+++ b/src/luarocks/manif.lua
@@ -55,7 +55,6 @@ end
55 55
56function manif.make_rock_manifest(name, version) 56function manif.make_rock_manifest(name, version)
57 local install_dir = path.install_dir(name, version) 57 local install_dir = path.install_dir(name, version)
58 local rock_manifest = path.rock_manifest_file(name, version)
59 local tree = {} 58 local tree = {}
60 for _, file in ipairs(fs.find(install_dir)) do 59 for _, file in ipairs(fs.find(install_dir)) do
61 local full_path = dir.path(install_dir, file) 60 local full_path = dir.path(install_dir, file)
@@ -80,7 +79,7 @@ function manif.make_rock_manifest(name, version)
80 last[last_name] = sum 79 last[last_name] = sum
81 end 80 end
82 end 81 end
83 rock_manifest = { rock_manifest=tree } 82 local rock_manifest = { rock_manifest=tree }
84 manif.rock_manifest_cache[name.."/"..version] = rock_manifest 83 manif.rock_manifest_cache[name.."/"..version] = rock_manifest
85 save_table(install_dir, "rock_manifest", rock_manifest ) 84 save_table(install_dir, "rock_manifest", rock_manifest )
86end 85end
diff --git a/src/luarocks/path_cmd.lua b/src/luarocks/path_cmd.lua
index 15fb9ca2..eba85d46 100644
--- a/src/luarocks/path_cmd.lua
+++ b/src/luarocks/path_cmd.lua
@@ -4,7 +4,6 @@
4local path_cmd = {} 4local path_cmd = {}
5 5
6local util = require("luarocks.util") 6local util = require("luarocks.util")
7local deps = require("luarocks.deps")
8local cfg = require("luarocks.cfg") 7local cfg = require("luarocks.cfg")
9 8
10util.add_run_function(path_cmd) 9util.add_run_function(path_cmd)
@@ -35,8 +34,6 @@ And on Windows:
35--- Driver function for "path" command. 34--- Driver function for "path" command.
36-- @return boolean This function always succeeds. 35-- @return boolean This function always succeeds.
37function path_cmd.command(flags) 36function path_cmd.command(flags)
38 local deps_mode = deps.get_deps_mode(flags)
39
40 local lr_path, lr_cpath, lr_bin = cfg.package_paths(flags["tree"]) 37 local lr_path, lr_cpath, lr_bin = cfg.package_paths(flags["tree"])
41 local path_sep = cfg.export_path_separator 38 local path_sep = cfg.export_path_separator
42 39
diff --git a/src/luarocks/remove.lua b/src/luarocks/remove.lua
index 82c9818b..54756388 100644
--- a/src/luarocks/remove.lua
+++ b/src/luarocks/remove.lua
@@ -11,7 +11,6 @@ local repos = require("luarocks.repos")
11local path = require("luarocks.path") 11local path = require("luarocks.path")
12local util = require("luarocks.util") 12local util = require("luarocks.util")
13local cfg = require("luarocks.cfg") 13local cfg = require("luarocks.cfg")
14local manif = require("luarocks.manif")
15local fs = require("luarocks.fs") 14local fs = require("luarocks.fs")
16 15
17util.add_run_function(remove) 16util.add_run_function(remove)