If the `version` in a rockspec contains more than one dash (e.g.
`1-1-1`), you will get a "Tree inconsistency detected: foo-1 1-1-1 has
no rockspec." warning. The following change provides more clarity:
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index 27062cb..04d5158 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)] = 'fail'
end
end
results[name] = version
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index 8ce555d..9c751f6 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
It now displays "Tree inconsistency detected: bitnumber-1 1-1-1 has no
rockspec. Inconsistency between rockspec filename
(bitnumber-1-1-1-1.rockspec) and its contents
(bitnumber-1-1-1.rockspec)."
Something more likely needs done about this to prevent it. I came
across this problem when trying to use a dashed date (e.g. 2011-12-01)
in the version number. (I've since removed the dashes.)
Another problem is that when installing a rockspec with the `url` set
to a `git://` path and `tag` set to some tag, the following warning
displays during installing the rockspec:
---------------------
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
---------------------
This is the same warning that one sees on cloning the repo and
checking out a tag (rather than a branch) from the git command line.
The warning is valid but confusing to a user running luarocks. This
warning can be suppressed using the `-q` option to `git checkout`:
iff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua
index 7db74c2..76e503d 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
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers