aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-08-23 22:21:11 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-10-21 13:30:51 -0300
commit413cdea62d8464908fd50dfc6b6fd35ee3c03fe3 (patch)
tree68e728b2116721c4e8d861c157b989570e27fb41
parent3d585c3b3fba291374602750ef3201a017cb60db (diff)
downloadluarocks-413cdea62d8464908fd50dfc6b6fd35ee3c03fe3.tar.gz
luarocks-413cdea62d8464908fd50dfc6b6fd35ee3c03fe3.tar.bz2
luarocks-413cdea62d8464908fd50dfc6b6fd35ee3c03fe3.zip
deps: fix: re-enable constraint check for no_upgrade flag
-rw-r--r--src/luarocks/deps.lua16
-rw-r--r--src/luarocks/deps.tl16
2 files changed, 16 insertions, 16 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index f02070a6..f335ebc0 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -333,14 +333,14 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, found_or_err)
335 else 335 else
336 336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then
337 337 util.printerr("This version of " .. name .. " is designed for use with")
338 338 util.printerr(tostring(depq) .. ", but is configured to avoid upgrading it")
339 339 util.printerr("automatically. Please upgrade " .. depq.name .. " with")
340 340 util.printerr(" luarocks install " .. depq.name)
341 341 util.printerr("or look for a suitable version of " .. name .. " with")
342 342 util.printerr(" luarocks search " .. name)
343 343 end
344 return nil, found_or_err 344 return nil, found_or_err
345 end 345 end
346 end 346 end
diff --git a/src/luarocks/deps.tl b/src/luarocks/deps.tl
index 17584c36..5ca9c879 100644
--- a/src/luarocks/deps.tl
+++ b/src/luarocks/deps.tl
@@ -333,14 +333,14 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, found_or_err)
335 else 335 else
336 -- if no_upgrade then 336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then
337 -- util.printerr("This version of "..name.." is designed for use with") 337 util.printerr("This version of "..name.." is designed for use with")
338 -- util.printerr(tostring(dep)..", but is configured to avoid upgrading it") 338 util.printerr(tostring(depq)..", but is configured to avoid upgrading it")
339 -- util.printerr("automatically. Please upgrade "..dep.name.." with") 339 util.printerr("automatically. Please upgrade "..depq.name.." with")
340 -- util.printerr(" luarocks install "..dep.name) 340 util.printerr(" luarocks install "..depq.name)
341 -- util.printerr("or look for a suitable version of "..name.." with") 341 util.printerr("or look for a suitable version of "..name.." with")
342 -- util.printerr(" luarocks search "..name) 342 util.printerr(" luarocks search "..name)
343 -- end 343 end
344 return nil, found_or_err 344 return nil, found_or_err
345 end 345 end
346 end 346 end