diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-03 20:47:22 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-03 20:47:22 -0200 |
commit | 5320579bfe756704fc1743d0d3e43cc5037a0edd (patch) | |
tree | dd2c398a425153951309eaeac7aeb215f7740da1 | |
parent | 8728210e143bcde6c666319c715b1eb7b18467d7 (diff) | |
download | luarocks-5320579bfe756704fc1743d0d3e43cc5037a0edd.tar.gz luarocks-5320579bfe756704fc1743d0d3e43cc5037a0edd.tar.bz2 luarocks-5320579bfe756704fc1743d0d3e43cc5037a0edd.zip |
Fixes suggested by David Manura
("hashes in versions numbers and git checkout warning")
-rw-r--r-- | src/luarocks/deps.lua | 4 | ||||
-rw-r--r-- | src/luarocks/fetch/git.lua | 3 | ||||
-rw-r--r-- | 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) | |||
630 | if not deplist then | 630 | if not deplist then |
631 | rockspec, err = fetch.load_local_rockspec(path.rockspec_file(name, version)) | 631 | rockspec, err = fetch.load_local_rockspec(path.rockspec_file(name, version)) |
632 | if err then | 632 | if err then |
633 | missing[name.." "..version] = true | 633 | missing[name.." "..version] = err |
634 | return results, missing | 634 | return results, missing |
635 | end | 635 | end |
636 | dependencies_name[version] = rockspec.dependencies | 636 | dependencies_name[version] = rockspec.dependencies |
@@ -643,7 +643,7 @@ function scan_deps(results, missing, manifest, name, version) | |||
643 | end | 643 | end |
644 | if next(failures) then | 644 | if next(failures) then |
645 | for _, failure in pairs(failures) do | 645 | for _, failure in pairs(failures) do |
646 | missing[show_dep(failure)] = true | 646 | missing[show_dep(failure)] = "failed" |
647 | end | 647 | end |
648 | end | 648 | end |
649 | results[name] = version | 649 | 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) | |||
26 | local checkout_command | 26 | local checkout_command |
27 | local tag_or_branch = rockspec.source.tag or rockspec.source.branch | 27 | local tag_or_branch = rockspec.source.tag or rockspec.source.branch |
28 | if tag_or_branch then | 28 | if tag_or_branch then |
29 | checkout_command = {git_cmd, "checkout", tag_or_branch} | 29 | checkout_command = {git_cmd, "checkout", "-q", tag_or_branch} |
30 | end | 30 | end |
31 | local store_dir | 31 | local store_dir |
32 | if not dest_dir then | 32 | if not dest_dir then |
@@ -38,6 +38,7 @@ function get_sources(rockspec, extract, dest_dir) | |||
38 | else | 38 | else |
39 | store_dir = dest_dir | 39 | store_dir = dest_dir |
40 | end | 40 | end |
41 | store_dir = fs.absolute_name(store_dir) | ||
41 | fs.change_dir(store_dir) | 42 | fs.change_dir(store_dir) |
42 | if not fs.execute(unpack(command)) then | 43 | if not fs.execute(unpack(command)) then |
43 | return nil, "Failed cloning git repository." | 44 | 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) | |||
188 | repo.dependencies, missing = deps.scan_deps({}, {}, manifest, pkg, version) | 188 | repo.dependencies, missing = deps.scan_deps({}, {}, manifest, pkg, version) |
189 | repo.dependencies[pkg] = nil | 189 | repo.dependencies[pkg] = nil |
190 | if missing then | 190 | if missing then |
191 | for miss, _ in pairs(missing) do | 191 | for miss, err in pairs(missing) do |
192 | if miss == current then | 192 | if miss == current then |
193 | util.printerr("Tree inconsistency detected: "..current.." has no rockspec.") | 193 | util.printerr("Tree inconsistency detected: "..current.." has no rockspec. "..err) |
194 | else | 194 | else |
195 | util.printerr("Missing dependency for "..pkg.." "..version..": "..miss) | 195 | util.printerr("Missing dependency for "..pkg.." "..version..": "..miss) |
196 | end | 196 | end |