diff options
-rw-r--r-- | src/luarocks/cfg.lua | 7 | ||||
-rw-r--r-- | src/luarocks/dir.lua | 1 | ||||
-rw-r--r-- | src/luarocks/fs.lua | 5 | ||||
-rw-r--r-- | src/luarocks/fs/unix.lua | 3 | ||||
-rw-r--r-- | src/luarocks/index.lua | 1 | ||||
-rw-r--r-- | src/luarocks/loader.lua | 6 | ||||
-rw-r--r-- | src/luarocks/manif.lua | 4 | ||||
-rw-r--r-- | src/luarocks/path.lua | 2 | ||||
-rw-r--r-- | src/luarocks/refresh_cache.lua | 1 | ||||
-rw-r--r-- | src/luarocks/tools/patch.lua | 2 | ||||
-rw-r--r-- | src/luarocks/tools/tar.lua | 1 | ||||
-rw-r--r-- | src/luarocks/tools/zip.lua | 2 | ||||
-rw-r--r-- | src/luarocks/util.lua | 7 | ||||
-rw-r--r-- | src/luarocks/validate.lua | 1 |
14 files changed, 32 insertions, 11 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 6007db2f..ec019761 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -1,7 +1,4 @@ | |||
1 | 1 | ||
2 | local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, type, assert = | ||
3 | rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, type, assert | ||
4 | |||
5 | --- Configuration for LuaRocks. | 2 | --- Configuration for LuaRocks. |
6 | -- Tries to load the user's configuration file and | 3 | -- Tries to load the user's configuration file and |
7 | -- defines defaults for unset values. See the | 4 | -- defines defaults for unset values. See the |
@@ -13,6 +10,10 @@ local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, | |||
13 | -- (see luarocks.site_config) or their user-specific configuration file | 10 | -- (see luarocks.site_config) or their user-specific configuration file |
14 | -- (~/.luarocks/config.lua on Unix or %APPDATA%/luarocks/config.lua on | 11 | -- (~/.luarocks/config.lua on Unix or %APPDATA%/luarocks/config.lua on |
15 | -- Windows). | 12 | -- Windows). |
13 | |||
14 | local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, type, assert = | ||
15 | rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, package, type, assert | ||
16 | |||
16 | module("luarocks.cfg") | 17 | module("luarocks.cfg") |
17 | 18 | ||
18 | -- Load site-local global configurations | 19 | -- Load site-local global configurations |
diff --git a/src/luarocks/dir.lua b/src/luarocks/dir.lua index 00a9317f..69968917 100644 --- a/src/luarocks/dir.lua +++ b/src/luarocks/dir.lua | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | --- Generic utilities for handling pathnames. | ||
2 | module("luarocks.dir", package.seeall) | 3 | module("luarocks.dir", package.seeall) |
3 | 4 | ||
4 | separator = "/" | 5 | separator = "/" |
diff --git a/src/luarocks/fs.lua b/src/luarocks/fs.lua index d2cb3ddb..467b1943 100644 --- a/src/luarocks/fs.lua +++ b/src/luarocks/fs.lua | |||
@@ -1,11 +1,12 @@ | |||
1 | 1 | ||
2 | local pairs = pairs | ||
3 | |||
4 | --- Proxy module for filesystem and platform abstractions. | 2 | --- Proxy module for filesystem and platform abstractions. |
5 | -- All code using "fs" code should require "luarocks.fs", | 3 | -- All code using "fs" code should require "luarocks.fs", |
6 | -- and not the various platform-specific implementations. | 4 | -- and not the various platform-specific implementations. |
7 | -- However, see the documentation of the implementation | 5 | -- However, see the documentation of the implementation |
8 | -- for the API reference. | 6 | -- for the API reference. |
7 | |||
8 | local pairs = pairs | ||
9 | |||
9 | module("luarocks.fs", package.seeall) | 10 | module("luarocks.fs", package.seeall) |
10 | 11 | ||
11 | local cfg = require("luarocks.cfg") | 12 | local cfg = require("luarocks.cfg") |
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua index 844a6fb0..279eca14 100644 --- a/src/luarocks/fs/unix.lua +++ b/src/luarocks/fs/unix.lua | |||
@@ -1,8 +1,9 @@ | |||
1 | 1 | ||
2 | --- Unix implementation of filesystem and platform abstractions. | ||
3 | |||
2 | local assert, type, table, io, package, math, os, ipairs = | 4 | local assert, type, table, io, package, math, os, ipairs = |
3 | assert, type, table, io, package, math, os, ipairs | 5 | assert, type, table, io, package, math, os, ipairs |
4 | 6 | ||
5 | --- Unix implementation of filesystem and platform abstractions. | ||
6 | module("luarocks.fs.unix", package.seeall) | 7 | module("luarocks.fs.unix", package.seeall) |
7 | 8 | ||
8 | local fs = require("luarocks.fs") | 9 | local fs = require("luarocks.fs") |
diff --git a/src/luarocks/index.lua b/src/luarocks/index.lua index 01ce266a..6aa7c831 100644 --- a/src/luarocks/index.lua +++ b/src/luarocks/index.lua | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | --- Module which builds the index.html page to be used in rocks servers. | ||
2 | module("luarocks.index", package.seeall) | 3 | module("luarocks.index", package.seeall) |
3 | 4 | ||
4 | local util = require("luarocks.util") | 5 | local util = require("luarocks.util") |
diff --git a/src/luarocks/loader.lua b/src/luarocks/loader.lua index cab7762e..362a986a 100644 --- a/src/luarocks/loader.lua +++ b/src/luarocks/loader.lua | |||
@@ -1,4 +1,10 @@ | |||
1 | 1 | ||
2 | --- A module which installs a Lua package loader that is LuaRocks-aware. | ||
3 | -- This loader uses dependency information from the LuaRocks tree to load | ||
4 | -- correct versions of modules. It does this by constructing a "context" | ||
5 | -- table in the environment, which records which versions of packages were | ||
6 | -- used to load previous modules, so that the loader chooses versions | ||
7 | -- that are declared to be compatible with the ones loaded earlier. | ||
2 | local global_env = _G | 8 | local global_env = _G |
3 | local package, require, ipairs, pairs, table, type, next, unpack = | 9 | local package, require, ipairs, pairs, table, type, next, unpack = |
4 | package, require, ipairs, pairs, table, type, next, unpack | 10 | package, require, ipairs, pairs, table, type, next, unpack |
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua index 9cacc3ff..f09abf45 100644 --- a/src/luarocks/manif.lua +++ b/src/luarocks/manif.lua | |||
@@ -1,4 +1,8 @@ | |||
1 | 1 | ||
2 | --- Module for handling manifest files and tables. | ||
3 | -- Manifest files describe the contents of a LuaRocks tree or server. | ||
4 | -- They are loaded into manifest tables, which are then used for | ||
5 | -- performing searches, matching dependencies, etc. | ||
2 | module("luarocks.manif", package.seeall) | 6 | module("luarocks.manif", package.seeall) |
3 | 7 | ||
4 | local manif_core = require("luarocks.manif_core") | 8 | local manif_core = require("luarocks.manif_core") |
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua index 99127235..03ed1b90 100644 --- a/src/luarocks/path.lua +++ b/src/luarocks/path.lua | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | --- Path and filename handling functions. | 2 | --- LuaRocks-specific path handling functions. |
3 | -- All paths are configured in this module, making it a single | 3 | -- All paths are configured in this module, making it a single |
4 | -- point where the layout of the local installation is defined in LuaRocks. | 4 | -- point where the layout of the local installation is defined in LuaRocks. |
5 | module("luarocks.path", package.seeall) | 5 | module("luarocks.path", package.seeall) |
diff --git a/src/luarocks/refresh_cache.lua b/src/luarocks/refresh_cache.lua index 2ea7e9f4..80730375 100644 --- a/src/luarocks/refresh_cache.lua +++ b/src/luarocks/refresh_cache.lua | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | --- Module implementing the luarocks-admin "refresh_cache" command. | ||
2 | module("luarocks.refresh_cache", package.seeall) | 3 | module("luarocks.refresh_cache", package.seeall) |
3 | 4 | ||
4 | local util = require("luarocks.util") | 5 | local util = require("luarocks.util") |
diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua index a2b76954..9a89aa48 100644 --- a/src/luarocks/tools/patch.lua +++ b/src/luarocks/tools/patch.lua | |||
@@ -1,4 +1,4 @@ | |||
1 | --- Patch utility to apply unified diffs | 1 | --- Patch utility to apply unified diffs. |
2 | -- | 2 | -- |
3 | -- http://lua-users.org/wiki/LuaPatch | 3 | -- http://lua-users.org/wiki/LuaPatch |
4 | -- | 4 | -- |
diff --git a/src/luarocks/tools/tar.lua b/src/luarocks/tools/tar.lua index e47172fa..ba01a413 100644 --- a/src/luarocks/tools/tar.lua +++ b/src/luarocks/tools/tar.lua | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | --- A pure-Lua implementation of untar (unpacking .tar archives) | ||
2 | module("luarocks.tools.tar", package.seeall) | 3 | module("luarocks.tools.tar", package.seeall) |
3 | 4 | ||
4 | local fs = require("luarocks.fs") | 5 | local fs = require("luarocks.fs") |
diff --git a/src/luarocks/tools/zip.lua b/src/luarocks/tools/zip.lua index 19f6af85..7534f097 100644 --- a/src/luarocks/tools/zip.lua +++ b/src/luarocks/tools/zip.lua | |||
@@ -1,4 +1,6 @@ | |||
1 | 1 | ||
2 | --- A Lua implementation of .zip file archiving (used for creating .rock files), | ||
3 | -- using only lua-zlib. | ||
2 | module("luarocks.tools.zip", package.seeall) | 4 | module("luarocks.tools.zip", package.seeall) |
3 | 5 | ||
4 | local zlib = require("zlib") | 6 | local zlib = require("zlib") |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 4495c024..292ca2ba 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -1,10 +1,11 @@ | |||
1 | 1 | ||
2 | local global_env = _G | 2 | --- Assorted utilities for managing tables, plus a scheduler for rollback functions. |
3 | |||
4 | --- Utility functions shared by other modules. | ||
5 | -- Does not requires modules directly (only as locals | 3 | -- Does not requires modules directly (only as locals |
6 | -- inside specific functions) to avoid interdependencies, | 4 | -- inside specific functions) to avoid interdependencies, |
7 | -- as this is used in the bootstrapping stage of luarocks.cfg. | 5 | -- as this is used in the bootstrapping stage of luarocks.cfg. |
6 | |||
7 | local global_env = _G | ||
8 | |||
8 | module("luarocks.util", package.seeall) | 9 | module("luarocks.util", package.seeall) |
9 | 10 | ||
10 | local scheduled_functions = {} | 11 | local scheduled_functions = {} |
diff --git a/src/luarocks/validate.lua b/src/luarocks/validate.lua index fbffadc7..03e90ecf 100644 --- a/src/luarocks/validate.lua +++ b/src/luarocks/validate.lua | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | --- Sandboxed test of build/install of all packages in a repository (unfinished and disabled). | ||
2 | module("luarocks.validate", package.seeall) | 3 | module("luarocks.validate", package.seeall) |
3 | 4 | ||
4 | local fs = require("luarocks.fs") | 5 | local fs = require("luarocks.fs") |