aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/build.lua3
-rw-r--r--src/luarocks/install.lua3
-rw-r--r--src/luarocks/remove.lua3
-rw-r--r--src/luarocks/util.lua20
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.
22To override this check and force the removal, use --force. 22To override this check and force the removal, use --force.
23To perform a forced removal without reporting dependency issues, 23To perform a forced removal without reporting dependency issues,
24use --force=fast. 24use --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
9module("luarocks.util", package.seeall) 9module("luarocks.util", package.seeall)
10 10
11local cfg = require("luarocks.cfg")
12
11local scheduled_functions = {} 13local scheduled_functions = {}
12local debug = require("debug") 14local debug = require("debug")
13 15
@@ -371,6 +373,24 @@ function this_program(default)
371 return last:sub(2) 373 return last:sub(2)
372end 374end
373 375
376function 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]]
392end
393
374function see_help(command, program) 394function see_help(command, program)
375 return "See '"..this_program(program or "luarocks")..' help '..command.."'." 395 return "See '"..this_program(program or "luarocks")..' help '..command.."'."
376end 396end