diff options
Diffstat (limited to '')
-rw-r--r-- | apt-panopticommon.lua | 5 | ||||
-rwxr-xr-x | apt-panopticon.lua | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index 55f0e40..1405622 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua | |||
@@ -425,8 +425,9 @@ APT.testing = function(t, host) | |||
425 | return false | 425 | return false |
426 | end | 426 | end |
427 | 427 | ||
428 | APT.execute = function (s) | 428 | APT.execute = function (s, logit) |
429 | D(" executing - <code>" .. s .. "</code>") | 429 | if nil == logit then logit = true end |
430 | if logit then D(" executing - <code>" .. s .. "</code>") end | ||
430 | --[[ Damn os.execute() | 431 | --[[ Damn os.execute() |
431 | Lua 5.1 says it returns "a status code, which is system-dependent" | 432 | Lua 5.1 says it returns "a status code, which is system-dependent" |
432 | Lua 5.2 says it returns true/nil, "exit"/"signal", the status code. | 433 | Lua 5.2 says it returns true/nil, "exit"/"signal", the status code. |
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 72ac6ae..5493683 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -486,8 +486,8 @@ local postDownload = function(host, r, k) | |||
486 | " results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. ".old" .. | 486 | " results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. ".old" .. |
487 | " results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. "; fi") | 487 | " results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. "; fi") |
488 | if APT.checkFile('results/' .. host .. '/merged/dists/' .. r .. '/' .. k) then | 488 | if APT.checkFile('results/' .. host .. '/merged/dists/' .. r .. '/' .. k) then |
489 | if ".gz" == k:sub(-3, -1) then APT.execute("ionice -c3 nice -n 19 gzip -dfk results/" .. host .. "/merged/dists/" .. r .. '/' .. k) end | 489 | if ".gz" == k:sub(-3, -1) then APT.execute("ionice -c3 nice -n 19 gzip -dfk results/" .. host .. "/merged/dists/" .. r .. '/' .. k, false) end |
490 | if ".xz" == k:sub(-3, -1) then APT.execute("ionice -c3 nice -n 19 xz -dfk results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. " 2>/dev/null") end | 490 | if ".xz" == k:sub(-3, -1) then APT.execute("ionice -c3 nice -n 19 xz -dfk results/" .. host .. "/merged/dists/" .. r .. '/' .. k .. " 2>/dev/null", false) end |
491 | end | 491 | end |
492 | end | 492 | end |
493 | 493 | ||
@@ -632,7 +632,7 @@ local parseDebs = function(host) | |||
632 | local v, p, sz, sha = l:match(' | (.+) | (pool/.+%.deb) | (%d.+) | (%x.+) |') | 632 | local v, p, sz, sha = l:match(' | (.+) | (pool/.+%.deb) | (%d.+) | (%x.+) |') |
633 | if nil ~= p then | 633 | if nil ~= p then |
634 | if APT.checkFile('results/' .. host .. "/merged/" .. p) then | 634 | if APT.checkFile('results/' .. host .. "/merged/" .. p) then |
635 | local status, fsz = APT.execute('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5') | 635 | local status, fsz = APT.execute('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5', false) |
636 | if APT.testing("Integrity") then | 636 | if APT.testing("Integrity") then |
637 | if sz ~= fsz:sub(2, -2) then -- The sub bit is to slice off the EOLs at each end. | 637 | if sz ~= fsz:sub(2, -2) then -- The sub bit is to slice off the EOLs at each end. |
638 | E('Package size mismatch - results/' .. host .. "/merged/" .. p .. ' should be ' .. sz .. ', but is ' .. fsz:sub(2, -2) .. '.', 'http', 'Integrity', host) | 638 | E('Package size mismatch - results/' .. host .. "/merged/" .. p .. ' should be ' .. sz .. ', but is ' .. fsz:sub(2, -2) .. '.', 'http', 'Integrity', host) |