diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-07-18 17:44:07 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:49:17 +0300 |
commit | 0555546ceeebe47899bf755b01f459eff0cebe08 (patch) | |
tree | b64cd713eb5a188afb5759f628b4e59145beba27 | |
parent | 909df28e57d03c39d8affbd733f01a7fe76a6d04 (diff) | |
download | luarocks-0555546ceeebe47899bf755b01f459eff0cebe08.tar.gz luarocks-0555546ceeebe47899bf755b01f459eff0cebe08.tar.bz2 luarocks-0555546ceeebe47899bf755b01f459eff0cebe08.zip |
actually new manif file
-rw-r--r-- | src/luarocks/core/manif.lua | 6 | ||||
-rw-r--r-- | src/luarocks/core/path.lua | 1 | ||||
-rw-r--r-- | src/luarocks/core/util.lua | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/luarocks/core/manif.lua b/src/luarocks/core/manif.lua index c64795dc..197b4725 100644 --- a/src/luarocks/core/manif.lua +++ b/src/luarocks/core/manif.lua | |||
@@ -49,8 +49,8 @@ local manifest_cache = {} | |||
49 | 49 | ||
50 | function manif.cache_manifest(repo_url, lua_version, manifest) | 50 | function manif.cache_manifest(repo_url, lua_version, manifest) |
51 | lua_version = lua_version or cfg.lua_version | 51 | lua_version = lua_version or cfg.lua_version |
52 | manifest_cache.repository[repo_url] = manifest_cache.repository[repo_url] or {} | 52 | manifest_cache[repo_url] = manifest_cache[repo_url] or {} |
53 | manifest_cache.repository[repo_url][lua_version] = manifest | 53 | manifest_cache[repo_url][lua_version] = manifest |
54 | end | 54 | end |
55 | 55 | ||
56 | 56 | ||
@@ -59,7 +59,7 @@ end | |||
59 | 59 | ||
60 | function manif.get_cached_manifest(repo_url, lua_version) | 60 | function manif.get_cached_manifest(repo_url, lua_version) |
61 | lua_version = lua_version or cfg.lua_version | 61 | lua_version = lua_version or cfg.lua_version |
62 | return manifest_cache.repository[repo_url] and manifest_cache.repository[repo_url][lua_version] | 62 | return manifest_cache[repo_url] and manifest_cache[repo_url][lua_version] |
63 | end | 63 | end |
64 | 64 | ||
65 | 65 | ||
diff --git a/src/luarocks/core/path.lua b/src/luarocks/core/path.lua index 20a90f79..c9bcfe5c 100644 --- a/src/luarocks/core/path.lua +++ b/src/luarocks/core/path.lua | |||
@@ -1,5 +1,4 @@ | |||
1 | local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local package = _tl_compat and _tl_compat.package or package; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table | 1 | local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local package = _tl_compat and _tl_compat.package or package; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table |
2 | |||
3 | local path = {} | 2 | local path = {} |
4 | 3 | ||
5 | 4 | ||
diff --git a/src/luarocks/core/util.lua b/src/luarocks/core/util.lua index 8c995fa6..6011e51e 100644 --- a/src/luarocks/core/util.lua +++ b/src/luarocks/core/util.lua | |||
@@ -4,6 +4,7 @@ local util = {} | |||
4 | 4 | ||
5 | 5 | ||
6 | 6 | ||
7 | |||
7 | local dir_sep = package.config:sub(1, 1) | 8 | local dir_sep = package.config:sub(1, 1) |
8 | 9 | ||
9 | 10 | ||
@@ -120,6 +121,15 @@ end | |||
120 | 121 | ||
121 | 122 | ||
122 | 123 | ||
124 | |||
125 | function util.matchquote(s) | ||
126 | return (s:gsub("[?%-+*%[%].%%()$^]", "%%%1")) | ||
127 | end | ||
128 | |||
129 | |||
130 | |||
131 | |||
132 | |||
123 | function util.deep_merge(dst, src) | 133 | function util.deep_merge(dst, src) |
124 | for k, v in pairs(src) do | 134 | for k, v in pairs(src) do |
125 | if type(v) == "table" then | 135 | if type(v) == "table" then |