in particular, it will not give you the latest version.
The offending code is luarocks/show.lua, around 81:
local version,repo_url
local package, versions = util.sortedpairs(results)()
--question: what do we do about multiple versions? This should
--give us the latest version on the last repo (which is usually the
global one)
for vs, repos in util.sortedpairs(versions, deps.compare_versions) do
version = vs
for _, rp in ipairs(repos) do repo_url = rp.repo end
end
Clearly I was puzzled, and I chose wrong - the 'higher' version is
presented first, e.g.
$ luarocks list webrocks
...
webrocks
2.3-1 (installed) - /usr/local/lib/luarocks/rocks
2.2-1 (installed) - /usr/local/lib/luarocks/rocks
2.0-1 (installed) - /usr/local/lib/luarocks/rocks
1.0-2 (installed) - /usr/local/lib/luarocks/rocks
1.0-1 (installed) - /usr/local/lib/luarocks/rocks
So 'version = vs' should be 'if not version then version = vs end' to
pick up the first in the list.
steve d.
_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers