From 5320579bfe756704fc1743d0d3e43cc5037a0edd Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 3 Dec 2011 20:47:22 -0200 Subject: Fixes suggested by David Manura ("hashes in versions numbers and git checkout warning") --- src/luarocks/deps.lua | 4 ++-- src/luarocks/fetch/git.lua | 3 ++- src/luarocks/manif.lua | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index 27062cbb..88a1bb0a 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua @@ -630,7 +630,7 @@ function scan_deps(results, missing, manifest, name, version) if not deplist then rockspec, err = fetch.load_local_rockspec(path.rockspec_file(name, version)) if err then - missing[name.." "..version] = true + missing[name.." "..version] = err return results, missing end dependencies_name[version] = rockspec.dependencies @@ -643,7 +643,7 @@ function scan_deps(results, missing, manifest, name, version) end if next(failures) then for _, failure in pairs(failures) do - missing[show_dep(failure)] = true + missing[show_dep(failure)] = "failed" end end results[name] = version diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index 7db74c26..f8c0f2c8 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua @@ -26,7 +26,7 @@ function get_sources(rockspec, extract, dest_dir) local checkout_command local tag_or_branch = rockspec.source.tag or rockspec.source.branch if tag_or_branch then - checkout_command = {git_cmd, "checkout", tag_or_branch} + checkout_command = {git_cmd, "checkout", "-q", tag_or_branch} end local store_dir if not dest_dir then @@ -38,6 +38,7 @@ function get_sources(rockspec, extract, dest_dir) else store_dir = dest_dir end + store_dir = fs.absolute_name(store_dir) fs.change_dir(store_dir) if not fs.execute(unpack(command)) then return nil, "Failed cloning git repository." diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua index 8ce555d8..44a21f91 100644 --- a/src/luarocks/manif.lua +++ b/src/luarocks/manif.lua @@ -188,9 +188,9 @@ local function update_dependencies(manifest) repo.dependencies, missing = deps.scan_deps({}, {}, manifest, pkg, version) repo.dependencies[pkg] = nil if missing then - for miss, _ in pairs(missing) do + for miss, err in pairs(missing) do if miss == current then - util.printerr("Tree inconsistency detected: "..current.." has no rockspec.") + util.printerr("Tree inconsistency detected: "..current.." has no rockspec. "..err) else util.printerr("Missing dependency for "..pkg.." "..version..": "..miss) end -- cgit v1.2.3-55-g6feb