diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-07 02:22:51 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-07 02:22:51 +0300 |
commit | da127f95b260e034042cbcdd87529d7efdb1125e (patch) | |
tree | e3a769f31b8dbfe6c90a670c527b88dfb7620686 | |
parent | 39e57ade36880e2b2bbbe7eae3e6b27d5e86ad78 (diff) | |
download | luarocks-da127f95b260e034042cbcdd87529d7efdb1125e.tar.gz luarocks-da127f95b260e034042cbcdd87529d7efdb1125e.tar.bz2 luarocks-da127f95b260e034042cbcdd87529d7efdb1125e.zip |
deps test
-rw-r--r-- | src/luarocks/deps.lua | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index d764bef7..8a370ad9 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
@@ -125,42 +125,7 @@ local function match_dep(depq, | |||
125 | 125 | ||
126 | return latest_vstring, locations[latest_vstring], depq, provided | 126 | return latest_vstring, locations[latest_vstring], depq, provided |
127 | end | 127 | end |
128 | local function printTable( t ) | ||
129 | |||
130 | local printTable_cache = {} | ||
131 | |||
132 | local function sub_printTable( t, indent ) | ||
133 | |||
134 | if ( printTable_cache[tostring(t)] ) then | ||
135 | print( indent .. "*" .. tostring(t) ) | ||
136 | else | ||
137 | printTable_cache[tostring(t)] = true | ||
138 | if ( type( t ) == "table" ) then | ||
139 | for pos,val in pairs( t ) do | ||
140 | if ( type(val) == "table" ) then | ||
141 | print( indent .. "[" .. pos .. "] => " .. tostring( t ).. " {" ) | ||
142 | sub_printTable( val, indent .. string.rep( " ", string.len(pos)+8 ) ) | ||
143 | print( indent .. string.rep( " ", string.len(pos)+6 ) .. "}" ) | ||
144 | elseif ( type(val) == "string" ) then | ||
145 | print( indent .. "[" .. pos .. '] => "' .. val .. '"' ) | ||
146 | else | ||
147 | print( indent .. "[" .. pos .. "] => " .. tostring(val) ) | ||
148 | end | ||
149 | end | ||
150 | else | ||
151 | print( indent..tostring(t) ) | ||
152 | end | ||
153 | end | ||
154 | end | ||
155 | 128 | ||
156 | if ( type(t) == "table" ) then | ||
157 | print( tostring(t) .. " {" ) | ||
158 | sub_printTable( t, " " ) | ||
159 | print( "}" ) | ||
160 | else | ||
161 | sub_printTable( t, " " ) | ||
162 | end | ||
163 | end | ||
164 | local function match_all_deps(dependencies, | 129 | local function match_all_deps(dependencies, |
165 | get_versions) | 130 | get_versions) |
166 | local matched, missing, no_upgrade = {}, {}, {} | 131 | local matched, missing, no_upgrade = {}, {}, {} |
@@ -176,7 +141,6 @@ local function match_all_deps(dependencies, | |||
176 | if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then | 141 | if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then |
177 | no_upgrade[depq.name] = depq | 142 | no_upgrade[depq.name] = depq |
178 | else | 143 | else |
179 | printTable(depq) | ||
180 | -- missing[depq.name] = depq | 144 | -- missing[depq.name] = depq |
181 | end | 145 | end |
182 | end | 146 | end |