aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/deps.lua9
-rw-r--r--src/luarocks/deps.tl9
2 files changed, 12 insertions, 6 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index 19cf6936..5802601e 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -329,9 +329,12 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
329 util.printout(("%s %s depends on %s (%s)"):format( 329 util.printout(("%s %s depends on %s (%s)"):format(
330 name, version, tostring(depq), (rock_status(depq, get_versions)))) 330 name, version, tostring(depq), (rock_status(depq, get_versions))))
331 331
332 local okfulfill, found_or_err, _ = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey) 332 local okfulfill, version_or_err, tree = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey)
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, version_or_err)
335 if tree and rockspec:format_is_at_least("3.1") then
336 rockspec.variables[depq.name:upper() .. "_ROCKDIR"] = path.install_dir(depq.name, version_or_err, tree)
337 end
335 else 338 else
336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then 339 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") 340 util.printerr("This version of " .. name .. " is designed for use with")
@@ -341,7 +344,7 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
341 util.printerr("or look for a suitable version of " .. name .. " with") 344 util.printerr("or look for a suitable version of " .. name .. " with")
342 util.printerr(" luarocks search " .. name) 345 util.printerr(" luarocks search " .. name)
343 end 346 end
344 return nil, found_or_err 347 return nil, version_or_err
345 end 348 end
346 end 349 end
347 350
diff --git a/src/luarocks/deps.tl b/src/luarocks/deps.tl
index f6a6642f..d127288e 100644
--- a/src/luarocks/deps.tl
+++ b/src/luarocks/deps.tl
@@ -329,9 +329,12 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
329 util.printout(("%s %s depends on %s (%s)"):format( 329 util.printout(("%s %s depends on %s (%s)"):format(
330 name, version, tostring(depq), (rock_status(depq, get_versions)))) 330 name, version, tostring(depq), (rock_status(depq, get_versions))))
331 331
332 local okfulfill, found_or_err, _ = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey) 332 local okfulfill, version_or_err, tree = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey)
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, version_or_err)
335 if tree and rockspec:format_is_at_least("3.1") then
336 rockspec.variables[depq.name:upper() .. "_ROCKDIR"] = path.install_dir(depq.name, version_or_err, tree)
337 end
335 else 338 else
336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then 339 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") 340 util.printerr("This version of "..name.." is designed for use with")
@@ -341,7 +344,7 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
341 util.printerr("or look for a suitable version of "..name.." with") 344 util.printerr("or look for a suitable version of "..name.." with")
342 util.printerr(" luarocks search "..name) 345 util.printerr(" luarocks search "..name)
343 end 346 end
344 return nil, found_or_err 347 return nil, version_or_err
345 end 348 end
346 end 349 end
347 350