| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
See #664.
|
| |
|
|
|
|
|
| |
This prevents `sudo luarocks` to take over ownership of
the user's ~/.cache/luarocks directory.
|
| |
|
|
|
|
| |
Closes #676.
|
| |
|
|
|
|
|
| |
Fixes problem in macOS 10.12.
See http://lua-users.org/lists/lua-l/2016-12/msg00001.html
|
| |
|
|
|
|
|
|
|
|
| |
Instead of using path.which that produced incorrect results for files
with no .lua/.so/.dll extension, reimplement similar functionality
in luarocks.repos (with support for commands as well) and use that.
Ref #424.
|
| |
|
| |
|
| |
|
|
|
|
| |
Clearly tostring was implied instead of tonumber.
|
| |
|
|\
| |
| | |
Fix conflict resolution on deploy/remove w.r.t. C/Lua modules with same name
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactor repos.deploy_files and repos.delete_version
to make relationships between properties of deployed
files clearer and to avoid converting back and forth
between related properties.
Location of each deployable file in its rock manifest is
pair deploy_type - the first subtree name ("bin", "lib", or "lua")
and file_path - remaining path from the subtree to the file. These
components determine where each file is physically located.
Conflicts are considered based on two other properties: type
and name of an item a file provides. Type can be "command" or "module".
For items deployed using non-versioned names pairs (type, name) should be
unique.
Conversion from (deploy_type, file_path) to (item_type, item_name)
is obvious, using path.path_to_module() for modules. Reversing this
conversion is necessary for moving files between versioned and
non-versioned locations on conflicts, and also for path.which
function used in luarocks.show. However,
rock tree manifest only allows to get file_path, which
is not enough for modules - deploy_type can be both "lua" and "lib".
Currently path.which infers deploy_type based on extension,
falling back to "lib" if it's unknown, causing luarocks.show
to display wrong paths (#424). This commit does not address that
but adds relevant funcionality.
Currently conflict resolution assumes that both files in conflict
have same deploy_type and errors on conflict between
a C module and a Lua module. This commit fixes that, inferring
deploy_type for files with unknown extension using rock manifest.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Do not report missing dependencies on manifest update, which is now
done more often. Instead do it at the end of commands
that may alter manifest (install, build, make, remove - excluding
purge).
For reporting reuse format used when showing missing deps to be
installed. Do not report missing indirect dependencies,
only direct ones.
|
|\
| |
| | |
Remove packages without manifest rebuild
|
| |
| |
| |
| |
| |
| |
| | |
Rename `manif.update_manifest` to `manif.add_to_manifest`.
Add `manif.remove_from_manifest` that performs reverse action.
Use it in `repos.delete_version` to avoid rebuilding manifest
everytime a package is removed.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
`repo` sometimes means root dir and sometimes means rock dir.
At least do not reuse the same variable for both.
|
| |
| |
| |
| |
| | |
Do not accept a hook function to call after storing results.
Simply call it on the outside after calling store_results.
|
| |
| |
| |
| |
| |
| | |
Instead of passing a function and its arguments to a helper
function for it to call it, make a copy of result, and return it,
call the function on the outer level and pass the result to helper.
|
|/
|
|
|
|
|
|
|
|
| |
To get all installed versions of a package using deps_mode,
instead of deeply merging all manifests of corresponding trees,
shallowly merge only tables related to that package.
This affects speed of manifest manipulation and dependency resolution.
Minimal performance testing suggests 3x-4x speed-up on reinstallation
of a package using `luarocks make`.
|
|
|
|
|
|
| |
Do not use "^[%.a-zA-Z]?:?[\\/]" as a pattern when checking if
a path is absolute on Windows. Check if there is a
directory separator after an optional drive letter instead.
|
|
|
|
| |
Use string replacements instead of functions in calls to gsub.
|
| |
|
|
|
|
|
| |
Let the user set their own custom platform entries,
but also provide fallbacks to make sure things work.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Internally package names are lowercased, however, rockspec may contain
a name with uppercase letters, which will be displayed by `luarocks show`.
Some commands, like `luarocks search`, `luarocks install` and `luarocks
build`, support this and convert input name to lowercase before passing
it to interanl functions.
Do the same thing in other commands accepting rock names.
|
| | |
|
| |
| |
| |
| |
| | |
Remove explicit reference to cygwin, and make option
available for custom environments.
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
When deploying script to bin/script.bat, check and back up
bin/script.bat, not bin/script.
|
|
|
|
|
|
|
|
| |
When deploying or deleting files, resolve conflicts purely
based on module names and command names, not file names.
Also, don't assume that in case of a conflict both packages have the
same file providing the module or command; it can be false due to binary
wrappers and `path_to_module("mod/init.lua")` == `path_to_module("mod.lua").
|
|
|
|
| |
Same as 6639022.
|
|
|
|
|
|
|
|
|
|
| |
In builtin backend, when figuring out where to install a module and
checking for special "init.lua" logic, trigger it only when
the whole basename is "init.lua", not when it merely ends with it.
Fixes incorrect installation when build.modules contains pairs like
`["kainit"] = "kainit.lua"` - the module used to go to `kainit/kainit.lua`
instead of just `kainit.lua`.
|
|
|
|
|
|
|
| |
If `basename` is equal to `baseinfo` then, as `filename` is
`baseinfo` plus ".lua", assignment `filename = basename..".lua"`
has no effect and the if statement can be removed. Then `baseinfo`
can be removed as unused.
|
|
|
|
|
|
|
|
| |
Similarly to repos.delete_version, it's a good idea to update
manifest immediately after altering what's deployed, even though
in this case manifest was always updated by the caller.
Also added more doc comments for repos functions.
|
|
|
|
|
|
|
| |
This is a naive implementation of the solution suggested by @mpeterv for #268.
I'm merging this since it does produce more correct behavior,
at the cost of a performance regression. We need a function akin to
update_manifest for removing packages from a manifest.
|
|
|
|
|
| |
Ravi has "Ravi 5.3" as _VERSION. Don't use _VERSION:sub(5) to get Lua
version, match " (5%.[123])$" instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`find_providers` function used by `manif.find_current_provider`
and `manif.find_next_provider` needs relative path from a directory
an installed file is deployed in (bin dir, lua dir, or lib dir) to the file.
It then uses that path as key in manifest, converting it to
module name beforehand for lua files and lib files.
It happened to leave a leading slash in this relative path for
lua and lib files. `path.path_to_module` has a workaround stripping
leading dots caused by leading slashes. However, if the file
doesn't have `.lua` extension, slashes are not converted to dots
and the workaround doesn't trigger.
The issue results in files falsely considered "untracked" and backed-up
when reinstalling a different version of a rock,
see sailorproject/sailor#138.
The fix is to use correct relative paths without leading slashes.
|