aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-06-29 22:11:49 -0300
committerHisham <hisham@gobolinux.org>2016-06-29 22:11:49 -0300
commit6b38323d10743c83e377d9be2fa734a3a3d5a300 (patch)
tree164b5b35f7361cd87a34ec98c92a0e70936dc606 /src
parent26f498d8b7a24d976f814c2cd1a9e544893d276a (diff)
parentfa60a09a3a522f9f3b58f084ab8efdb35a04e7df (diff)
downloadluarocks-6b38323d10743c83e377d9be2fa734a3a3d5a300.tar.gz
luarocks-6b38323d10743c83e377d9be2fa734a3a3d5a300.tar.bz2
luarocks-6b38323d10743c83e377d9be2fa734a3a3d5a300.zip
Merge branch 'master' into luarocks-3
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/build.lua2
-rw-r--r--src/luarocks/fetch.lua3
-rw-r--r--src/luarocks/fs/unix/tools.lua3
-rw-r--r--src/luarocks/fs/win32/tools.lua3
4 files changed, 5 insertions, 6 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua
index 4a71b4c5..2d29e23f 100644
--- a/src/luarocks/build.lua
+++ b/src/luarocks/build.lua
@@ -201,8 +201,8 @@ function build.build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_m
201 return nil, "Rockspec error: build type not specified" 201 return nil, "Rockspec error: build type not specified"
202 end 202 end
203 203
204 local ok
204 if not build_only_deps then 205 if not build_only_deps then
205 local ok
206 ok, err, errcode = deps.check_external_deps(rockspec, "build") 206 ok, err, errcode = deps.check_external_deps(rockspec, "build")
207 if err then 207 if err then
208 return nil, err, errcode 208 return nil, err, errcode
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua
index 3eea61fc..2590afd4 100644
--- a/src/luarocks/fetch.lua
+++ b/src/luarocks/fetch.lua
@@ -353,7 +353,8 @@ function fetch.get_sources(rockspec, extract, dest_dir)
353 if extract then 353 if extract then
354 local ok, err = fs.change_dir(store_dir) 354 local ok, err = fs.change_dir(store_dir)
355 if not ok then return nil, err end 355 if not ok then return nil, err end
356 fs.unpack_archive(rockspec.source.file) 356 ok, err = fs.unpack_archive(rockspec.source.file)
357 if not ok then return nil, err end
357 if not fs.exists(rockspec.source.dir) then 358 if not fs.exists(rockspec.source.dir) then
358 359
359 -- If rockspec.source.dir can't be found, see if we only have one 360 -- If rockspec.source.dir can't be found, see if we only have one
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua
index 7a67fb22..d0802725 100644
--- a/src/luarocks/fs/unix/tools.lua
+++ b/src/luarocks/fs/unix/tools.lua
@@ -192,8 +192,7 @@ function tools.unpack_archive(archive)
192 -- Ignore .lua and .c files; they don't need to be extracted. 192 -- Ignore .lua and .c files; they don't need to be extracted.
193 return true 193 return true
194 else 194 else
195 local ext = archive:match(".*(%..*)") 195 return false, "Couldn't extract archive "..archive..": unrecognized filename extension"
196 return false, "Unrecognized filename extension "..(ext or "")
197 end 196 end
198 if not ok then 197 if not ok then
199 return false, "Failed extracting "..archive 198 return false, "Failed extracting "..archive
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua
index 1d47fa59..4adc78d1 100644
--- a/src/luarocks/fs/win32/tools.lua
+++ b/src/luarocks/fs/win32/tools.lua
@@ -204,8 +204,7 @@ function tools.unpack_archive(archive)
204 -- Ignore .lua and .c files; they don't need to be extracted. 204 -- Ignore .lua and .c files; they don't need to be extracted.
205 return true 205 return true
206 else 206 else
207 local ext = archive:match(".*(%..*)") 207 return false, "Couldn't extract archive "..archive..": unrecognized filename extension"
208 return false, "Unrecognized filename extension "..(ext or "")
209 end 208 end
210 if not ok then 209 if not ok then
211 return false, "Failed extracting "..archive 210 return false, "Failed extracting "..archive