diff options
Diffstat (limited to 'src/luarocks/path.lua')
| -rw-r--r-- | src/luarocks/path.lua | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua index 83e9c295..71893cf1 100644 --- a/src/luarocks/path.lua +++ b/src/luarocks/path.lua | |||
| @@ -231,25 +231,4 @@ function path.use_tree(tree) | |||
| 231 | cfg.deploy_lib_dir = path.deploy_lib_dir(tree) | 231 | cfg.deploy_lib_dir = path.deploy_lib_dir(tree) |
| 232 | end | 232 | end |
| 233 | 233 | ||
| 234 | --- Return the pathname of the file that would be loaded for a module, | ||
| 235 | -- returning the versioned pathname if given version is not the default version | ||
| 236 | -- in the given manifest. | ||
| 237 | -- @param module_name string: module name (eg. "socket.core") | ||
| 238 | -- @param file_name string: module file name as in manifest (eg. "socket/core.so") | ||
| 239 | -- @param name string: name of the package (eg. "luasocket") | ||
| 240 | -- @param version string: version number (eg. "2.0.2-1") | ||
| 241 | -- @param tree string: repository path (eg. "/usr/local") | ||
| 242 | -- @param manifest table: the manifest table for the tree. | ||
| 243 | -- @return string: filename of the module (eg. "/usr/local/lib/lua/5.1/socket/core.so") | ||
| 244 | function path.which(module_name, file_name, name, version, tree, manifest) | ||
| 245 | local versions = manifest.modules[module_name] | ||
| 246 | assert(versions) | ||
| 247 | for i, name_version in ipairs(versions) do | ||
| 248 | if name_version == name.."/"..version then | ||
| 249 | return path.which_i(file_name, name, version, tree, i):gsub("//", "/") | ||
| 250 | end | ||
| 251 | end | ||
| 252 | assert(false) | ||
| 253 | end | ||
| 254 | |||
| 255 | return path | 234 | return path |
