aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for release 2.4.4v2.4.4Hisham Muhammad2018-03-121-1/+1
|
* Fix .def generation on Windows. (#767)dwenegar2018-03-121-1/+3
| | | | | According to the Lua's manual: > Once it finds a C library, this searcher first uses a dynamic link facility to link the application with the library. Then it tries to find a C function inside the library to be used as the loader. The name of this C function is the string "luaopen_" concatenated with a copy of the module name where each dot is replaced by an underscore. Moreover, if the module name has a hyphen, its prefix up to (and including) the first hyphen is removed. For instance, if the module name is a.v1-b.c, the function name will be luaopen_b_c.
* Differentiate "not found" and "fail" when deleting.Hisham Muhammad2018-03-121-4/+10
| | | | | Do not halt a deletion process when trying to delete something that was not found.
* Fix detection of directories on WindowsSebastian Thomschke2018-03-121-1/+1
| | | | | | | | | | | | | | | | Function tools.delete performs a test to determine if a path is a file or a directory to select the appropriate delete command rmdir vs del. The current test however results in rmdir being used on files too, which then results in a build abortion with error "The directory name is invalid.". E.g. if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\" ( echo "I am a folder" ) else ( echo "I am a file" ) wrongly prints "I am a folder" (tested on Windows 10) Whereas if exist "c:\luarocks\share\lua\5.2\luasocket_3_0rc1_2-socket.lua\*" ( echo "I am a folder" ) else ( echo "I am a file" ) correctly prints "I am a file" (tested on Windows 10) This fixes #670 (Also see https://stackoverflow.com/a/1466528/1793220 )
* read just one line when checking md5Michal Cichra2018-03-121-1/+1
| | | | in some cases reading the whole file fails (on macOS High Sierra, LuaJIT) this is timing dependent and waiting between spawning and reading solves the issue as well
* Prepare for release 2.4.3.v2.4.32.4.3Hisham Muhammad2017-09-121-2/+2
|
* Improve error checking in ownership check.Hisham2017-09-124-7/+23
| | | | See #664.
* Oops! Fix warning message.Hisham2017-09-121-1/+3
|
* Check ownership of cache directory and emit a warning.Hisham2017-09-126-9/+47
| | | | | This prevents `sudo luarocks` to take over ownership of the user's ~/.cache/luarocks directory.
* Add sanity check for lua.hHisham Muhammad2017-09-121-0/+9
|
* Make sure target directory exists when saving API config.Hisham2017-09-121-0/+5
| | | | Closes #676.
* Fix clobbered varible.Hisham2017-09-121-7/+7
|
* Check for specific directories instead of the root dir.Hisham2017-09-121-19/+20
| | | | | Fixes problem in macOS 10.12. See http://lua-users.org/lists/lua-l/2016-12/msg00001.html
* List commands in `luarocks show`Peter Melnichenko2017-09-121-4/+16
|
* Fix module paths `luarocks show` displays for "asset" filesPeter Melnichenko2017-09-122-4/+28
| | | | | | | | 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.
* Formatting fix for recent addition to `make` help messagePeter Melnichenko2017-09-121-1/+2
|
* Additional help-info added to luarocks help make about --only-deps flag.Philipp Pa2017-08-241-0/+2
|
* Forget deprecated options from command line help.Nicolas Cornu2017-07-071-1/+1
|
* Get rid of an implicit number to string conversionPeter Melnichenko2017-03-141-2/+2
| | | | Clearly tostring was implied instead of tonumber.
* Avoid breaking test in release branches.Hisham2016-12-011-1/+1
|
* Merge pull request #644 from mpeterv/fix-conflict-resolveHisham Muhammad2016-11-032-183/+205
|\ | | | | Fix conflict resolution on deploy/remove w.r.t. C/Lua modules with same name
| * Fix and refactor conflict resolution on deploy/deletePeter Melnichenko2016-11-012-183/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Use ("%q"):format() for quoting in persistPeter Melnichenko2016-11-021-1/+1
| |
* | Fix persist for multiline strings ending with closing bracket prefixPeter Melnichenko2016-11-021-1/+2
|/
* Use optional lpeg feature when available.Hisham2016-11-011-0/+1
|
* Remove dead codeHisham2016-11-011-3/+0
|
* Get rid of repeated missing deps checksPeter Melnichenko2016-10-306-52/+87
| | | | | | | | | | | 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.
* Merge pull request #638 from mpeterv/remove-without-manifest-rebuildHisham Muhammad2016-10-292-64/+122
|\ | | | | Remove packages without manifest rebuild
| * Update manifest after removal without rebuildingPeter Melnichenko2016-10-282-9/+84
| | | | | | | | | | | | | | 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.
| * manif.update_manifest: do not update manifest if rebuiltPeter Melnichenko2016-10-281-8/+4
| |
| * manif.update_manifest: load manifest as localPeter Melnichenko2016-10-281-1/+1
| |
| * Rename a variable in manif.update_manifestPeter Melnichenko2016-10-281-6/+6
| | | | | | | | | | `repo` sometimes means root dir and sometimes means rock dir. At least do not reuse the same variable for both.
| * Refactor store_results in luarocks.manif (2)Peter Melnichenko2016-10-281-21/+8
| | | | | | | | | | Do not accept a hook function to call after storing results. Simply call it on the outside after calling store_results.
| * Refactor store_results in luarocks.manifPeter Melnichenko2016-10-281-22/+22
| | | | | | | | | | | | 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.
* | Improve performance of manif_core.get_versionsPeter Melnichenko2016-10-291-11/+10
|/ | | | | | | | | | 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`.
* Fix absolute path detection on WindowsPeter Melnichenko2016-10-281-8/+31
| | | | | | 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.
* 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`.