diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-07 13:37:23 -0200 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-07 13:37:23 -0200 |
| commit | 2511c8377f6c924625b10d6e6cc77c5053890b94 (patch) | |
| tree | 2a7503203e199f2e2e42db20572312bb73467b99 /src | |
| parent | 2e48fb362177369036f26f9c66f74d801fe5931d (diff) | |
| download | luarocks-2511c8377f6c924625b10d6e6cc77c5053890b94.tar.gz luarocks-2511c8377f6c924625b10d6e6cc77c5053890b94.tar.bz2 luarocks-2511c8377f6c924625b10d6e6cc77c5053890b94.zip | |
Add help on --deps-mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/build.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/install.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/remove.lua | 3 | ||||
| -rw-r--r-- | src/luarocks/util.lua | 20 |
4 files changed, 26 insertions, 3 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua index ec269023..72b5649e 100644 --- a/src/luarocks/build.lua +++ b/src/luarocks/build.lua | |||
| @@ -31,7 +31,8 @@ or the name of a rock to be fetched from a repository. | |||
| 31 | rock after building a new one. This behavior can | 31 | rock after building a new one. This behavior can |
| 32 | be made permanent by setting keep_other_versions=true | 32 | be made permanent by setting keep_other_versions=true |
| 33 | in the configuration file. | 33 | in the configuration file. |
| 34 | ]] | 34 | |
| 35 | ]]..util.deps_mode_help() | ||
| 35 | 36 | ||
| 36 | --- Install files to a given location. | 37 | --- Install files to a given location. |
| 37 | -- Takes a table where the array part is a list of filenames to be copied. | 38 | -- Takes a table where the array part is a list of filenames to be copied. |
diff --git a/src/luarocks/install.lua b/src/luarocks/install.lua index b28e6282..7458ec8e 100644 --- a/src/luarocks/install.lua +++ b/src/luarocks/install.lua | |||
| @@ -25,7 +25,8 @@ or a filename of a locally available rock. | |||
| 25 | rock after installing a new one. This behavior can | 25 | rock after installing a new one. This behavior can |
| 26 | be made permanent by setting keep_other_versions=true | 26 | be made permanent by setting keep_other_versions=true |
| 27 | in the configuration file. | 27 | in the configuration file. |
| 28 | ]] | 28 | ]]..util.deps_mode_help() |
| 29 | |||
| 29 | 30 | ||
| 30 | --- Install a binary rock. | 31 | --- Install a binary rock. |
| 31 | -- @param rock_file string: local or remote filename of a rock. | 32 | -- @param rock_file string: local or remote filename of a rock. |
diff --git a/src/luarocks/remove.lua b/src/luarocks/remove.lua index f2f6997b..8f751a93 100644 --- a/src/luarocks/remove.lua +++ b/src/luarocks/remove.lua | |||
| @@ -22,7 +22,8 @@ Will only perform the removal if it does not break dependencies. | |||
| 22 | To override this check and force the removal, use --force. | 22 | To override this check and force the removal, use --force. |
| 23 | To perform a forced removal without reporting dependency issues, | 23 | To perform a forced removal without reporting dependency issues, |
| 24 | use --force=fast. | 24 | use --force=fast. |
| 25 | ]] | 25 | |
| 26 | ]]..util.deps_mode_help() | ||
| 26 | 27 | ||
| 27 | --- Obtain a list of packages that depend on the given set of packages | 28 | --- Obtain a list of packages that depend on the given set of packages |
| 28 | -- (where all packages of the set are versions of one program). | 29 | -- (where all packages of the set are versions of one program). |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 1a60fd9c..4b138516 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
| @@ -8,6 +8,8 @@ local global_env = _G | |||
| 8 | 8 | ||
| 9 | module("luarocks.util", package.seeall) | 9 | module("luarocks.util", package.seeall) |
| 10 | 10 | ||
| 11 | local cfg = require("luarocks.cfg") | ||
| 12 | |||
| 11 | local scheduled_functions = {} | 13 | local scheduled_functions = {} |
| 12 | local debug = require("debug") | 14 | local debug = require("debug") |
| 13 | 15 | ||
| @@ -371,6 +373,24 @@ function this_program(default) | |||
| 371 | return last:sub(2) | 373 | return last:sub(2) |
| 372 | end | 374 | end |
| 373 | 375 | ||
| 376 | function deps_mode_help(program) | ||
| 377 | return [[ | ||
| 378 | --deps-mode=<mode> How to handle dependencies. Four modes are supported: | ||
| 379 | * all - use all trees from the rocks_trees list | ||
| 380 | for finding dependencies | ||
| 381 | * one - use only the current tree (possibly set | ||
| 382 | with --tree) | ||
| 383 | * order - use trees based on order (use the current | ||
| 384 | tree and all trees below it on the rocks_trees list) | ||
| 385 | * none - ignore dependencies altogether. | ||
| 386 | The default mode may be set with the deps_mode entry | ||
| 387 | in the configuration file. | ||
| 388 | The current default is "]]..cfg.deps_mode..[[". | ||
| 389 | Type ']]..this_program(program or "luarocks")..[[' with no arguments to see | ||
| 390 | your list of rocks trees. | ||
| 391 | ]] | ||
| 392 | end | ||
| 393 | |||
| 374 | function see_help(command, program) | 394 | function see_help(command, program) |
| 375 | return "See '"..this_program(program or "luarocks")..' help '..command.."'." | 395 | return "See '"..this_program(program or "luarocks")..' help '..command.."'." |
| 376 | end | 396 | end |
