aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-10-26 14:36:39 -0200
committerHisham <hisham@gobolinux.org>2016-10-26 14:36:39 -0200
commit9ab9a8be410201c821fb72851067270e862fca12 (patch)
tree22cee9326d5cb557d081c2dc2e02e7a73c2cd157 /src
parente5f6a46679192893782a58e17ccd3d371964ae6f (diff)
parent716d54d72f562efe944478496e217695c44dc90f (diff)
downloadluarocks-9ab9a8be410201c821fb72851067270e862fca12.tar.gz
luarocks-9ab9a8be410201c821fb72851067270e862fca12.tar.bz2
luarocks-9ab9a8be410201c821fb72851067270e862fca12.zip
Merge branch 'master' of https://github.com/keplerproject/luarocks
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/doc.lua2
-rw-r--r--src/luarocks/download.lua2
-rw-r--r--src/luarocks/lint.lua2
-rw-r--r--src/luarocks/manif.lua3
-rw-r--r--src/luarocks/new_version.lua2
-rw-r--r--src/luarocks/pack.lua2
-rw-r--r--src/luarocks/path_cmd.lua3
-rw-r--r--src/luarocks/remove.lua2
-rw-r--r--src/luarocks/show.lua2
-rw-r--r--src/luarocks/unpack.lua2
13 files changed, 11 insertions, 15 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/doc.lua b/src/luarocks/doc.lua
index 15460b31..423ebe02 100644
--- a/src/luarocks/doc.lua
+++ b/src/luarocks/doc.lua
@@ -63,6 +63,8 @@ function doc.command(flags, name, version)
63 return nil, "Argument missing. "..util.see_help("doc") 63 return nil, "Argument missing. "..util.see_help("doc")
64 end 64 end
65 65
66 name = name:lower()
67
66 local iname, iversion, repo = search.pick_installed_rock(name, version, flags["tree"]) 68 local iname, iversion, repo = search.pick_installed_rock(name, version, flags["tree"])
67 if not iname then 69 if not iname then
68 util.printout(name..(version and " "..version or "").." is not installed. Looking for it in the rocks servers...") 70 util.printout(name..(version and " "..version or "").." is not installed. Looking for it in the rocks servers...")
diff --git a/src/luarocks/download.lua b/src/luarocks/download.lua
index 18573ae4..e434cdbb 100644
--- a/src/luarocks/download.lua
+++ b/src/luarocks/download.lua
@@ -102,7 +102,7 @@ function download.command(flags, name, version)
102 arch = flags["arch"] 102 arch = flags["arch"]
103 end 103 end
104 104
105 local dl, err = download.download(arch, name, version, flags["all"]) 105 local dl, err = download.download(arch, name:lower(), version, flags["all"])
106 return dl and true, err 106 return dl and true, err
107end 107end
108 108
diff --git a/src/luarocks/lint.lua b/src/luarocks/lint.lua
index d5cc48d0..0fd81a20 100644
--- a/src/luarocks/lint.lua
+++ b/src/luarocks/lint.lua
@@ -26,7 +26,7 @@ function lint.command(flags, input)
26 local filename = input 26 local filename = input
27 if not input:match(".rockspec$") then 27 if not input:match(".rockspec$") then
28 local err 28 local err
29 filename, err = download.download("rockspec", input) 29 filename, err = download.download("rockspec", input:lower())
30 if not filename then 30 if not filename then
31 return nil, err 31 return nil, err
32 end 32 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/new_version.lua b/src/luarocks/new_version.lua
index 8fc00a86..91f7607c 100644
--- a/src/luarocks/new_version.lua
+++ b/src/luarocks/new_version.lua
@@ -141,7 +141,7 @@ function new_version.command(flags, input, version, url)
141 return nil, err 141 return nil, err
142 end 142 end
143 else 143 else
144 filename, err = download.download("rockspec", input) 144 filename, err = download.download("rockspec", input:lower())
145 if not filename then 145 if not filename then
146 return nil, err 146 return nil, err
147 end 147 end
diff --git a/src/luarocks/pack.lua b/src/luarocks/pack.lua
index 932ff0d5..35bbe838 100644
--- a/src/luarocks/pack.lua
+++ b/src/luarocks/pack.lua
@@ -184,7 +184,7 @@ function pack.command(flags, arg, version)
184 if arg:match(".*%.rockspec") then 184 if arg:match(".*%.rockspec") then
185 file, err = pack.pack_source_rock(arg) 185 file, err = pack.pack_source_rock(arg)
186 else 186 else
187 file, err = do_pack_binary_rock(arg, version, flags["tree"]) 187 file, err = do_pack_binary_rock(arg:lower(), version, flags["tree"])
188 end 188 end
189 if err then 189 if err then
190 return nil, err 190 return nil, err
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..601eedcf 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)
@@ -156,6 +155,7 @@ function remove.command(flags, name, version)
156 end 155 end
157 156
158 local results = {} 157 local results = {}
158 name = name:lower()
159 search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version)) 159 search.manifest_search(results, cfg.rocks_dir, search.make_query(name, version))
160 if not results[name] then 160 if not results[name] then
161 return nil, "Could not find rock '"..name..(version and " "..version or "").."' in "..path.rocks_tree_to_string(cfg.root_dir) 161 return nil, "Could not find rock '"..name..(version and " "..version or "").."' in "..path.rocks_tree_to_string(cfg.root_dir)
diff --git a/src/luarocks/show.lua b/src/luarocks/show.lua
index 88f9512d..85c7edcb 100644
--- a/src/luarocks/show.lua
+++ b/src/luarocks/show.lua
@@ -78,7 +78,7 @@ function show.command(flags, name, version)
78 end 78 end
79 79
80 local repo, repo_url 80 local repo, repo_url
81 name, version, repo, repo_url = search.pick_installed_rock(name, version, flags["tree"]) 81 name, version, repo, repo_url = search.pick_installed_rock(name:lower(), version, flags["tree"])
82 if not name then 82 if not name then
83 return nil, version 83 return nil, version
84 end 84 end
diff --git a/src/luarocks/unpack.lua b/src/luarocks/unpack.lua
index c3dc9a4c..0922f9b9 100644
--- a/src/luarocks/unpack.lua
+++ b/src/luarocks/unpack.lua
@@ -159,7 +159,7 @@ function unpack.command(flags, name, version)
159 return run_unpacker(name, flags["force"]) 159 return run_unpacker(name, flags["force"])
160 else 160 else
161 local search = require("luarocks.search") 161 local search = require("luarocks.search")
162 return search.act_on_src_or_rockspec(run_unpacker, name, version) 162 return search.act_on_src_or_rockspec(run_unpacker, name:lower(), version)
163 end 163 end
164end 164end
165 165