diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-20 18:48:11 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-20 18:48:11 -0200 |
commit | 13a249a6c1dc7e43bbe29791d2ad2bb2b42850d6 (patch) | |
tree | 6aeeb7c59b542072ea8ee3fbf0b2335abcf7a0d8 /src | |
parent | f1693432ac62bac910215e962f4a3417111ca840 (diff) | |
download | luarocks-13a249a6c1dc7e43bbe29791d2ad2bb2b42850d6.tar.gz luarocks-13a249a6c1dc7e43bbe29791d2ad2bb2b42850d6.tar.bz2 luarocks-13a249a6c1dc7e43bbe29791d2ad2bb2b42850d6.zip |
Fix regressions caused by #194. Thank you, integrated testing!
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/deps.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index 34ef8298..116b4bbb 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
@@ -324,7 +324,7 @@ local function match_dep(dep, blacklist, deps_mode) | |||
324 | assert(type(dep) == "table") | 324 | assert(type(dep) == "table") |
325 | 325 | ||
326 | local versions = cfg.rocks_provided[dep.name] | 326 | local versions = cfg.rocks_provided[dep.name] |
327 | if not cfg.rocks_provided[dep.name] then | 327 | if cfg.rocks_provided[dep.name] then |
328 | -- provided rocks have higher priority than manifest's rocks | 328 | -- provided rocks have higher priority than manifest's rocks |
329 | versions = { cfg.rocks_provided[dep.name] } | 329 | versions = { cfg.rocks_provided[dep.name] } |
330 | else | 330 | else |
@@ -366,7 +366,7 @@ end | |||
366 | -- @param blacklist table or nil: Program versions to not use as valid matches. | 366 | -- @param blacklist table or nil: Program versions to not use as valid matches. |
367 | -- Table where keys are program names and values are tables where keys | 367 | -- Table where keys are program names and values are tables where keys |
368 | -- are program versions and values are 'true'. | 368 | -- are program versions and values are 'true'. |
369 | -- @return table, table: A table where keys are dependencies parsed | 369 | -- @return table, table, table: A table where keys are dependencies parsed |
370 | -- in table format and values are tables containing fields 'name' and | 370 | -- in table format and values are tables containing fields 'name' and |
371 | -- version' representing matches; a table of missing dependencies | 371 | -- version' representing matches; a table of missing dependencies |
372 | -- parsed as tables; and a table of "no-upgrade" missing dependencies | 372 | -- parsed as tables; and a table of "no-upgrade" missing dependencies |
@@ -378,16 +378,16 @@ function match_deps(rockspec, blacklist, deps_mode) | |||
378 | local matched, missing, no_upgrade = {}, {}, {} | 378 | local matched, missing, no_upgrade = {}, {}, {} |
379 | 379 | ||
380 | for _, dep in ipairs(rockspec.dependencies) do | 380 | for _, dep in ipairs(rockspec.dependencies) do |
381 | if not cfg.rocks_provided[dep.name] then | 381 | local found = match_dep(dep, blacklist and blacklist[dep.name] or nil, deps_mode) |
382 | local found = match_dep(dep, blacklist and blacklist[dep.name] or nil, deps_mode) | 382 | if found then |
383 | if found then | 383 | if not cfg.rocks_provided[dep.name] then |
384 | matched[dep] = found | 384 | matched[dep] = found |
385 | end | ||
386 | else | ||
387 | if dep.constraints[1] and dep.constraints[1].no_upgrade then | ||
388 | no_upgrade[dep.name] = dep | ||
385 | else | 389 | else |
386 | if dep.constraints[1] and dep.constraints[1].no_upgrade then | 390 | missing[dep.name] = dep |
387 | no_upgrade[dep.name] = dep | ||
388 | else | ||
389 | missing[dep.name] = dep | ||
390 | end | ||
391 | end | 391 | end |
392 | end | 392 | end |
393 | end | 393 | end |