diff options
| author | Peter Melnichenko <mpeterval@gmail.com> | 2016-10-20 23:22:44 +0300 |
|---|---|---|
| committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-10-20 23:22:44 +0300 |
| commit | 478fc5517c686c080797f840cc000cc9828ffcb4 (patch) | |
| tree | be57e8f4eb9c290d8401631f586b59ed2d8928a6 /src | |
| parent | 1a9389f0687017430c84ade3252f46ac4b77a738 (diff) | |
| download | luarocks-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.lua | 2 | ||||
| -rw-r--r-- | src/luarocks/command_line.lua | 1 | ||||
| -rw-r--r-- | src/luarocks/deps.lua | 1 | ||||
| -rw-r--r-- | src/luarocks/manif.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/path_cmd.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/remove.lua | 1 |
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. |
| 3 | local command_line = {} | 3 | local command_line = {} |
| 4 | 4 | ||
| 5 | local pack = function(...) return {...}, select("#", ...) end | ||
| 6 | local unpack = unpack or table.unpack | 5 | local unpack = unpack or table.unpack |
| 7 | 6 | ||
| 8 | local util = require("luarocks.util") | 7 | local 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 | ||
| 56 | function manif.make_rock_manifest(name, version) | 56 | function 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 ) |
| 86 | end | 85 | end |
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 @@ | |||
| 4 | local path_cmd = {} | 4 | local path_cmd = {} |
| 5 | 5 | ||
| 6 | local util = require("luarocks.util") | 6 | local util = require("luarocks.util") |
| 7 | local deps = require("luarocks.deps") | ||
| 8 | local cfg = require("luarocks.cfg") | 7 | local cfg = require("luarocks.cfg") |
| 9 | 8 | ||
| 10 | util.add_run_function(path_cmd) | 9 | util.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. |
| 37 | function path_cmd.command(flags) | 36 | function 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") | |||
| 11 | local path = require("luarocks.path") | 11 | local path = require("luarocks.path") |
| 12 | local util = require("luarocks.util") | 12 | local util = require("luarocks.util") |
| 13 | local cfg = require("luarocks.cfg") | 13 | local cfg = require("luarocks.cfg") |
| 14 | local manif = require("luarocks.manif") | ||
| 15 | local fs = require("luarocks.fs") | 14 | local fs = require("luarocks.fs") |
| 16 | 15 | ||
| 17 | util.add_run_function(remove) | 16 | util.add_run_function(remove) |
