aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Refactor windows argument quoting functionsPeter Melnichenko2016-10-281-21/+9
| | | | Use string replacements instead of functions in calls to gsub.
* Move Unix-specific fs.Q implementation into luarocks.fs.unixPeter Melnichenko2016-10-282-11/+9
|
* Support user-defined platforms array.Hisham2016-10-261-30/+57
| | | | | Let the user set their own custom platform entries, but also provide fallbacks to make sure things work.
* Merge branch 'master' of https://github.com/keplerproject/luarocksHisham2016-10-2613-15/+11
|\
| * Treat rock name arguments in case insensitive wayPeter Melnichenko2016-10-268-6/+9
| | | | | | | | | | | | | | | | | | | | 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 some unused locals and importsPeter Melnichenko2016-10-206-9/+2
| |
* | Add link_lua_explicitly option.Hisham2016-10-252-1/+3
| | | | | | | | | | Remove explicit reference to cygwin, and make option available for custom environments.
* | Check rockspec_version before running type check.Hisham2016-10-251-6/+6
|/
* Show traceback for errors in scheduled functionsPeter Melnichenko2016-10-201-9/+15
|
* Slightly improve error messages in deploy/removePeter Melnichenko2016-10-201-5/+7
|
* Fix backup of wrapped scripts on deployPeter Melnichenko2016-10-201-26/+25
| | | | | When deploying script to bin/script.bat, check and back up bin/script.bat, not bin/script.
* Fix conflict resolution on deploy/deletePeter Melnichenko2016-10-192-78/+146
| | | | | | | | 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").
* Remove some useless code in luarocks.buildPeter Melnichenko2016-10-191-4/+1
| | | | Same as 6639022.
* Fix installation of modules from files ending with "init.lua"Peter Melnichenko2016-10-191-1/+1
| | | | | | | | | | 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`.
* Remove some useless code in build.builtinPeter Melnichenko2016-10-191-4/+1
| | | | | | | 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.
* Run manif.update_manifest in repos.deploy_filesPeter Melnichenko2016-10-193-13/+26
| | | | | | | | 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.
* Regenerate manifest every time we delete a version.Hisham2016-10-186-14/+24
| | | | | | | 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.
* Relax Lua version detection to support RaviPeter Melnichenko2016-10-141-1/+1
| | | | | Ravi has "Ravi 5.3" as _VERSION. Don't use _VERSION:sub(5) to get Lua version, match " (5%.[123])$" instead.
* Fix manif.find_{current,next}_provider returning "untracked" incorrectlyPeter Melnichenko2016-10-121-3/+8
| | | | | | | | | | | | | | | | | | | | `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.
* Merge branch 'master' of https://github.com/keplerproject/luarocksHisham2016-10-061-36/+43
|\
| * Rewrite util.sortedpairs to avoid using coroutinesPeter Melnichenko2016-10-061-36/+43
| | | | | | | | | | | | | | | | | | | | util.sortedpairs is used in luarocks loader since @6dc745a. Openresty does not like coroutines being used from inside `require`, resulting in "attempt to yield across C-call boundary" error. New version of util.sortedpairs uses a prepared array of ordered keys instead of coroutines. Ref #620.
* | Make the workaround for older LuaRocks versions more robust.Hisham2016-10-061-0/+24
|/
* Simulate module() for older wrappers.Hisham2016-10-051-0/+5
| | | | | | | | | | | | | | | Older versions of LuaRocks (e.g. 2.1.0) install script wrappers that assume that `luarocks.loader` is available in the global namespace (this is from the module() era). This workaround detects this (because site_config.lua files written by these old versions use module(), and therefore create a `luarocks` global. To reproduce this issue, make a clean install of LuaRocks 2.1.0, then run `luarocks install luarocks`. Installation succeds, but running `luarocks` produces `attempt to index field 'loader' (a nil value)`. Bug reported by @tomasguisasola.
* Fix pack-binary-rock operation.Hisham2016-09-081-1/+1
|
* Make `pack` use the same logic as `show` for finding a rock.Hisham2016-09-084-64/+46
|
* Use Unix makefile by default on MinGW;Hisham2016-08-221-0/+1
| | | | | Makefile.win is a leftover from Kepler days, and those are usually NMAKE makefiles for MSVC.
* Make behavior of config files on Windows more consistentHisham2016-08-111-4/+3
| | | | | with that on Unix. This was detected during the port of the new testsuite to Windows by @robooo.
* Closes #595. Fixes placement of rockspec when unpacking a git:// rock.Hisham2016-07-281-1/+0
|
* Check for invalid server response.Hisham2016-07-141-0/+3
|
* Merge pull request #587 from xpol/win32-unique-paths-in-bin-scriptsHisham Muhammad2016-07-112-1/+3
|\ | | | | Make package.path and package.cpath unique in win32 bin scripts.
| * Make package.path and package.cpath unique in win32 bin scripts.Xpol Wan2016-07-112-1/+3
| |
* | Merge branch 'master' of https://github.com/keplerproject/luarocksHisham2016-07-112-3/+6
|\|
| * Fix implicit number-to-string coversion in luarocks.helpPeter Melnichenko2016-07-051-1/+1
| |
| * Fix field name building in type_check.luaPeter Melnichenko2016-07-051-2/+5
| | | | | | | | Use 'parent[field]' notation for non-string fields.
* | Fix crash when given a remote rockspec.Hisham2016-07-111-5/+9
|/
* Mention failed action on invalid archive extensionPeter Melnichenko2016-06-222-4/+2
| | | | | | Return `Couldn't extract archive <file>: unrecognized filename extension` instead of `Unrecognized extension <ext>`, so that it's clear that the file is being interpreted as an archive.
* Handle unpack_archive errorsPeter Melnichenko2016-06-221-1/+2
| | | | | | In particular, when installing a rock, fail with a message related to extraction error or unrecognized archive extension instead of 'Directory <name> not found inside archive <name>.<ext>'.
* Fix an accidental global in luarocks.buildPeter Melnichenko2016-06-131-1/+1
|
* Don't use 'run' interface in luarocks.buildPeter Melnichenko2016-06-131-1/+1
| | | | | | Use local 'do_build' function as function for search.act_on_src_or_rockspec instead. This also gets rid of double permission check and double removal of other versions.
* Use install.command instead of install.run in luarocks.depsPeter Melnichenko2016-06-131-1/+1
|
* Merge pull request #567 from mpeterv/cli-refactorHisham Muhammad2016-06-1226-123/+64
|\ | | | | Refactor cli to avoid double args parsing
| * Get rid of util.forward_flagsPeter Melnichenko2016-06-032-34/+2
| | | | | | | | Use 'commands' functions directly.
| * Refactor CLI to avoid double args parsingPeter Melnichenko2016-06-0326-91/+64
| | | | | | | | | | | | | | | | New command module interface: instead of 'run' function they must have 'command' function that accepts flags table and other arguments. For compatibility a new util function is called on all command modules: it adds 'run' function that parses command-line args before passing them to 'command'.
* | Use utils.see_help() consistently for all commandsPeter Melnichenko2016-06-092-2/+2
| |
* | Check external_dependencies before dependencies.Hisham2016-06-071-6/+8
|/ | | | | This allows us to fail quicker before installing a bunch of other rocks.
* Remove commented module() callsPeter Melnichenko2016-05-3151-51/+0
|
* Remove unused imports in luarocks.makePeter Melnichenko2016-05-311-2/+0
|
* luarocks.persist: put pairs with number values on one linePeter Melnichenko2016-05-301-1/+1
| | | | | Instead of pairs with number keys. Keeps parsed version representation compact but puts items in regular arrays each on its own line.
* Merge pull request #562 from mpeterv/write-rockspec-infer-scm-urlHisham Muhammad2016-05-271-4/+42
|\ | | | | Write rockspec infer scm url
| * write-rockspec: improve homepage detectionPeter Melnichenko2016-05-231-4/+13
| | | | | | | | | | | | | | | | * Perform detection later to take into account URL inferred from local scm repo. * Support more protocols instead of just 'git://'. * Support Bitbucket and Gitlab in addition to Github. * Strip trailing '.git'.