aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-25 23:11:53 +1000
committeronefang2019-12-25 23:11:53 +1000
commit14881493390cb2b41ea2b04c4be478dfd373f2d3 (patch)
tree5078fb33bc5d8cbb212a0237b38dfd86a2b0692c
parentTODO++ (diff)
downloadapt-panopticon-14881493390cb2b41ea2b04c4be478dfd373f2d3.zip
apt-panopticon-14881493390cb2b41ea2b04c4be478dfd373f2d3.tar.gz
apt-panopticon-14881493390cb2b41ea2b04c4be478dfd373f2d3.tar.bz2
apt-panopticon-14881493390cb2b41ea2b04c4be478dfd373f2d3.tar.xz
Don't log some APT.execute() calls.
-rw-r--r--apt-panopticommon.lua5
-rwxr-xr-xapt-panopticon.lua6
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
426end 426end
427 427
428APT.execute = function (s) 428APT.execute = function (s, logit)
429 D(" executing - &nbsp; <code>" .. s .. "</code>") 429 if nil == logit then logit = true end
430 if logit then D(" executing - &nbsp; <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
492end 492end
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)