aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/deps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/deps.lua')
-rw-r--r--src/luarocks/deps.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index 229c3843..182bbfb2 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -7,7 +7,7 @@ local manif = require("luarocks.manif")
7local path = require("luarocks.path") 7local path = require("luarocks.path")
8local dir = require("luarocks.dir") 8local dir = require("luarocks.dir")
9local util = require("luarocks.util") 9local util = require("luarocks.util")
10local vers = require("luarocks.vers") 10local vers = require("luarocks.core.vers")
11local queries = require("luarocks.queries") 11local queries = require("luarocks.queries")
12 12
13--- Attempt to match a dependency to an installed rock. 13--- Attempt to match a dependency to an installed rock.
@@ -28,7 +28,7 @@ local function match_dep(dep, blacklist, deps_mode, rocks_provided)
28 -- Provided rocks have higher priority than manifest's rocks. 28 -- Provided rocks have higher priority than manifest's rocks.
29 versions = { provided } 29 versions = { provided }
30 else 30 else
31 versions = manif.get_versions(dep.name, deps_mode) 31 versions = manif.get_versions(dep, deps_mode)
32 end 32 end
33 33
34 local latest_version 34 local latest_version
@@ -115,7 +115,7 @@ function deps.report_missing_dependencies(name, version, dependencies, deps_mode
115 first_missing_dep = false 115 first_missing_dep = false
116 end 116 end
117 117
118 util.printout((" %s (%s)"):format(vers.show_dep(dep), rock_status(dep.name, deps_mode, rocks_provided))) 118 util.printout((" %s (%s)"):format(tostring(dep), rock_status(dep.name, deps_mode, rocks_provided)))
119 end 119 end
120 end 120 end
121end 121end
@@ -172,11 +172,11 @@ function deps.fulfill_dependencies(rockspec, deps_mode)
172 end 172 end
173 173
174 util.printout(("%s %s depends on %s (%s)"):format( 174 util.printout(("%s %s depends on %s (%s)"):format(
175 rockspec.name, rockspec.version, vers.show_dep(dep), rock_status(dep.name, deps_mode, rockspec.rocks_provided))) 175 rockspec.name, rockspec.version, tostring(dep), rock_status(dep.name, deps_mode, rockspec.rocks_provided)))
176 176
177 if dep.constraints[1] and dep.constraints[1].no_upgrade then 177 if dep.constraints[1] and dep.constraints[1].no_upgrade then
178 util.printerr("This version of "..rockspec.name.." is designed for use with") 178 util.printerr("This version of "..rockspec.name.." is designed for use with")
179 util.printerr(vers.show_dep(dep)..", but is configured to avoid upgrading it") 179 util.printerr(tostring(dep)..", but is configured to avoid upgrading it")
180 util.printerr("automatically. Please upgrade "..dep.name.." with") 180 util.printerr("automatically. Please upgrade "..dep.name.." with")
181 util.printerr(" luarocks install "..dep.name) 181 util.printerr(" luarocks install "..dep.name)
182 util.printerr("or choose an older version of "..rockspec.name.." with") 182 util.printerr("or choose an older version of "..rockspec.name.." with")
@@ -184,12 +184,12 @@ function deps.fulfill_dependencies(rockspec, deps_mode)
184 return nil, "Failed matching dependencies" 184 return nil, "Failed matching dependencies"
185 end 185 end
186 186
187 local url, search_err = search.find_suitable_rock(queries.from_constraints(dep.name, dep.constraints)) 187 local url, search_err = search.find_suitable_rock(dep)
188 if not url then 188 if not url then
189 return nil, "Could not satisfy dependency "..vers.show_dep(dep)..": "..search_err 189 return nil, "Could not satisfy dependency "..tostring(dep)..": "..search_err
190 end 190 end
191 util.printout("Installing "..url) 191 util.printout("Installing "..url)
192 local ok, install_err, errcode = install.command({deps_mode = deps_mode}, url) 192 local ok, install_err, errcode = install.command({deps_mode = deps_mode, namespace = dep.namespace}, url)
193 if not ok then 193 if not ok then
194 return nil, "Failed installing dependency: "..url.." - "..install_err, errcode 194 return nil, "Failed installing dependency: "..url.." - "..install_err, errcode
195 end 195 end