aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/build.lua1
-rw-r--r--src/luarocks/fetch.lua2
-rw-r--r--src/luarocks/make_manifest.lua2
-rw-r--r--src/luarocks/pack.lua1
-rw-r--r--src/luarocks/path.lua2
-rw-r--r--src/luarocks/search.lua2
-rw-r--r--src/luarocks/util.lua10
7 files changed, 11 insertions, 9 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua
index 997929a8..98d5dd61 100644
--- a/src/luarocks/build.lua
+++ b/src/luarocks/build.lua
@@ -170,6 +170,7 @@ function build_rockspec(rockspec_file, need_to_fetch, minimal_mode)
170 build.type = "builtin" 170 build.type = "builtin"
171 end 171 end
172 172
173 local build_type
173 ok, build_type = pcall(require, "luarocks.build." .. build.type) 174 ok, build_type = pcall(require, "luarocks.build." .. build.type)
174 if not ok or not type(build_type) == "table" then 175 if not ok or not type(build_type) == "table" then
175 return nil, "Failed initializing build back-end for build type '"..build.type.."'" 176 return nil, "Failed initializing build back-end for build type '"..build.type.."'"
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua
index 407d72c5..5e1f870d 100644
--- a/src/luarocks/fetch.lua
+++ b/src/luarocks/fetch.lua
@@ -285,7 +285,7 @@ function fetch_sources(rockspec, extract, dest_dir)
285 assert(type(dest_dir) == "string" or not dest_dir) 285 assert(type(dest_dir) == "string" or not dest_dir)
286 286
287 local protocol = rockspec.source.protocol 287 local protocol = rockspec.source.protocol
288 local proto 288 local ok, proto
289 if protocol == "http" or protocol == "https" or protocol == "ftp" or protocol == "file" then 289 if protocol == "http" or protocol == "https" or protocol == "ftp" or protocol == "file" then
290 proto = require("luarocks.fetch") 290 proto = require("luarocks.fetch")
291 else 291 else
diff --git a/src/luarocks/make_manifest.lua b/src/luarocks/make_manifest.lua
index bec1b704..4701a45a 100644
--- a/src/luarocks/make_manifest.lua
+++ b/src/luarocks/make_manifest.lua
@@ -24,7 +24,7 @@ function run(repo)
24 24
25 print("Making manifest for "..repo) 25 print("Making manifest for "..repo)
26 26
27 ok, err = manif.make_manifest(repo) 27 local ok, err = manif.make_manifest(repo)
28 if ok then 28 if ok then
29 print("Generating index.html for "..repo) 29 print("Generating index.html for "..repo)
30 index.make_index(repo) 30 index.make_index(repo)
diff --git a/src/luarocks/pack.lua b/src/luarocks/pack.lua
index 2fa12d9b..800a855e 100644
--- a/src/luarocks/pack.lua
+++ b/src/luarocks/pack.lua
@@ -113,6 +113,7 @@ local function pack_binary_rock(name, version)
113 local temp_dir = fs.make_temp_dir("pack") 113 local temp_dir = fs.make_temp_dir("pack")
114 fs.copy_contents(prefix, temp_dir) 114 fs.copy_contents(prefix, temp_dir)
115 115
116 local is_binary = false
116 if rock_manifest.lib then 117 if rock_manifest.lib then
117 copy_back_files(name, version, rock_manifest.lib, cfg.deploy_lib_dir, dir.path(temp_dir, "lib")) 118 copy_back_files(name, version, rock_manifest.lib, cfg.deploy_lib_dir, dir.path(temp_dir, "lib"))
118 is_binary = true 119 is_binary = true
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 8c5aa0da..4718378e 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -269,6 +269,6 @@ function versioned_name(file, prefix, name, version)
269 assert(type(version) == "string") 269 assert(type(version) == "string")
270 270
271 local rest = file:gsub("^"..prefix.."/*", "") 271 local rest = file:gsub("^"..prefix.."/*", "")
272 name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_") 272 local name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_")
273 return dir.path(prefix, name_version.."-"..rest) 273 return dir.path(prefix, name_version.."-"..rest)
274end 274end
diff --git a/src/luarocks/search.lua b/src/luarocks/search.lua
index 0ba9ff43..da69eaff 100644
--- a/src/luarocks/search.lua
+++ b/src/luarocks/search.lua
@@ -37,7 +37,7 @@ local function query_arch_as_table(query)
37 query.arch = accept 37 query.arch = accept
38 elseif format == "string" then 38 elseif format == "string" then
39 local accept = {} 39 local accept = {}
40 for a in string.gmatch(query.arch, "[%w_-]+") do 40 for a in query.arch:gmatch("[%w_-]+") do
41 accept[a] = true 41 accept[a] = true
42 end 42 end
43 query.arch = accept 43 query.arch = accept
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua
index f48bfe1f..ab6ad34f 100644
--- a/src/luarocks/util.lua
+++ b/src/luarocks/util.lua
@@ -273,15 +273,15 @@ function show_table(t, name, indent)
273 local info = debug.getinfo(o, "S") 273 local info = debug.getinfo(o, "S")
274 -- info.name is nil because o is not a calling level 274 -- info.name is nil because o is not a calling level
275 if info.what == "C" then 275 if info.what == "C" then
276 return string.format("%q", so .. ", C function") 276 return ("%q"):format(so .. ", C function")
277 else 277 else
278 -- the information is defined through lines 278 -- the information is defined through lines
279 return string.format("%q", so .. ", defined in (" .. info.linedefined .. "-" .. info.lastlinedefined .. ")" .. info.source) 279 return ("%q"):format(so .. ", defined in (" .. info.linedefined .. "-" .. info.lastlinedefined .. ")" .. info.source)
280 end 280 end
281 elseif type(o) == "number" then 281 elseif type(o) == "number" then
282 return so 282 return so
283 else 283 else
284 return string.format("%q", so) 284 return ("%q"):format(so)
285 end 285 end
286 end 286 end
287 287
@@ -307,8 +307,8 @@ function show_table(t, name, indent)
307 cart = cart .. " = {\n" 307 cart = cart .. " = {\n"
308 for k, v in pairs(value) do 308 for k, v in pairs(value) do
309 k = basicSerialize(k) 309 k = basicSerialize(k)
310 local fname = string.format("%s[%s]", name, k) 310 local fname = ("%s[%s]"):format(name, k)
311 field = string.format("[%s]", k) 311 field = ("[%s]"):format(k)
312 -- three spaces between levels 312 -- three spaces between levels
313 addtocart(v, fname, indent .. " ", saved, field) 313 addtocart(v, fname, indent .. " ", saved, field)
314 end 314 end