diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-07 11:03:04 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-07 11:03:04 +0300 |
commit | 1a8a11a3549647d438fa57235081ab044d84f787 (patch) | |
tree | 97b7806f2f9615793ea638250610837eeab92d6a | |
parent | 0ccfb5e546f0153f3121882db1848d9e0c8a8ec8 (diff) | |
download | luarocks-1a8a11a3549647d438fa57235081ab044d84f787.tar.gz luarocks-1a8a11a3549647d438fa57235081ab044d84f787.tar.bz2 luarocks-1a8a11a3549647d438fa57235081ab044d84f787.zip |
test
-rw-r--r-- | spec/util/quick.lua | 2 | ||||
-rw-r--r-- | src/luarocks/remove.lua | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/spec/util/quick.lua b/spec/util/quick.lua index a525aa96..34ede636 100644 --- a/spec/util/quick.lua +++ b/spec/util/quick.lua | |||
@@ -410,7 +410,7 @@ function quick.compile(filename, env) | |||
410 | for i, line in ipairs(op.data) do | 410 | for i, line in ipairs(op.data) do |
411 | write(([=[ line = %q ]=]):format(line)) | 411 | write(([=[ line = %q ]=]):format(line)) |
412 | write(([=[ s, e = string.find(file_data, line, 1, true) ]=])) | 412 | write(([=[ s, e = string.find(file_data, line, 1, true) ]=])) |
413 | write(([=[ assert(s, error_message(%d, "FILE_CONTENTS " .. name .. " did not match: " .. line, file_data)) ]=]):format(op.start + i)) | 413 | write(([=[ assert(s, error_message(%d, "FILE_CONTENTS " .. name .. " did not 2match: " .. line, file_data)) ]=]):format(op.start + i)) |
414 | write(([=[ block_at = e + 1 ]=]):format(i)) | 414 | write(([=[ block_at = e + 1 ]=]):format(i)) |
415 | end | 415 | end |
416 | write([=[ end ]=]) | 416 | write([=[ end ]=]) |
diff --git a/src/luarocks/remove.lua b/src/luarocks/remove.lua index b6b858f2..be8517f6 100644 --- a/src/luarocks/remove.lua +++ b/src/luarocks/remove.lua | |||
@@ -10,22 +10,6 @@ local cfg = require("luarocks.core.cfg") | |||
10 | local manif = require("luarocks.manif") | 10 | local manif = require("luarocks.manif") |
11 | local queries = require("luarocks.queries") | 11 | local queries = require("luarocks.queries") |
12 | 12 | ||
13 | |||
14 | function tprint (tbl, indent) | ||
15 | if not indent then indent = 0 end | ||
16 | for k, v in pairs(tbl) do | ||
17 | formatting = string.rep(" ", indent) .. k .. ": " | ||
18 | if type(v) == "table" then | ||
19 | print(formatting) | ||
20 | tprint(v, indent+1) | ||
21 | elseif type(v) == 'boolean' then | ||
22 | print(formatting .. tostring(v)) | ||
23 | else | ||
24 | print(formatting .. v) | ||
25 | end | ||
26 | end | ||
27 | end | ||
28 | |||
29 | --- Obtain a list of packages that depend on the given set of packages | 13 | --- Obtain a list of packages that depend on the given set of packages |
30 | -- (where all packages of the set are versions of one program). | 14 | -- (where all packages of the set are versions of one program). |
31 | -- @param name string: the name of a program | 15 | -- @param name string: the name of a program |
@@ -48,7 +32,6 @@ local function check_dependents(name, versions, deps_mode) | |||
48 | for rock_name, rock_versions in pairs(local_rocks) do | 32 | for rock_name, rock_versions in pairs(local_rocks) do |
49 | for rock_version, _ in pairs(rock_versions) do | 33 | for rock_version, _ in pairs(rock_versions) do |
50 | local rockspec, err = fetch.load_rockspec(path.rockspec_file(rock_name, rock_version)) | 34 | local rockspec, err = fetch.load_rockspec(path.rockspec_file(rock_name, rock_version)) |
51 | tprint(rockspec) | ||
52 | if rockspec then | 35 | if rockspec then |
53 | local _, missing = deps.match_deps(rockspec.dependencies.queries, rockspec.rocks_provided, deps_mode, skip_set) | 36 | local _, missing = deps.match_deps(rockspec.dependencies.queries, rockspec.rocks_provided, deps_mode, skip_set) |
54 | if missing[name] then | 37 | if missing[name] then |