From 478fc5517c686c080797f840cc000cc9828ffcb4 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Thu, 20 Oct 2016 23:22:44 +0300 Subject: Remove some unused locals and imports --- src/luarocks/build.lua | 2 +- src/luarocks/command_line.lua | 1 - src/luarocks/deps.lua | 1 - src/luarocks/manif.lua | 3 +-- src/luarocks/path_cmd.lua | 3 --- src/luarocks/remove.lua | 1 - 6 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') 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 end if not minimal_mode then - local _, source_dir + local source_dir if need_to_fetch then ok, source_dir, errcode = fetch.fetch_sources(rockspec, true) 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 @@ --- Functions for command-line scripts. local command_line = {} -local pack = function(...) return {...}, select("#", ...) end local unpack = unpack or table.unpack 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) local fetch = require("luarocks.fetch") - local err if results[name] then return results, missing 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 function manif.make_rock_manifest(name, version) local install_dir = path.install_dir(name, version) - local rock_manifest = path.rock_manifest_file(name, version) local tree = {} for _, file in ipairs(fs.find(install_dir)) do local full_path = dir.path(install_dir, file) @@ -80,7 +79,7 @@ function manif.make_rock_manifest(name, version) last[last_name] = sum end end - rock_manifest = { rock_manifest=tree } + local rock_manifest = { rock_manifest=tree } manif.rock_manifest_cache[name.."/"..version] = rock_manifest save_table(install_dir, "rock_manifest", rock_manifest ) 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 @@ local path_cmd = {} local util = require("luarocks.util") -local deps = require("luarocks.deps") local cfg = require("luarocks.cfg") util.add_run_function(path_cmd) @@ -35,8 +34,6 @@ And on Windows: --- Driver function for "path" command. -- @return boolean This function always succeeds. function path_cmd.command(flags) - local deps_mode = deps.get_deps_mode(flags) - local lr_path, lr_cpath, lr_bin = cfg.package_paths(flags["tree"]) local path_sep = cfg.export_path_separator 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") local path = require("luarocks.path") local util = require("luarocks.util") local cfg = require("luarocks.cfg") -local manif = require("luarocks.manif") local fs = require("luarocks.fs") util.add_run_function(remove) -- cgit v1.2.3-55-g6feb