aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xapt-panopticon.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index ef16ecc..b62dbc6 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -676,13 +676,11 @@ local parseDebs = function(host)
676 local v, p, sz, sha = l:match(' | (.+) | (pool/.+%.deb) | (%d.+) | (%x.+) |') 676 local v, p, sz, sha = l:match(' | (.+) | (pool/.+%.deb) | (%d.+) | (%x.+) |')
677 if nil ~= p then 677 if nil ~= p then
678 if APT.checkFile('results/' .. host .. "/merged/" .. p) then 678 if APT.checkFile('results/' .. host .. "/merged/" .. p) then
679-- local status, fsz = APT.execute('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5', false)
680 local fsz = APT.exe('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5'):Do().result 679 local fsz = APT.exe('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5'):Do().result
681 if APT.testing("Integrity") then 680 if APT.testing("Integrity") then
682 if sz ~= fsz:sub(2, -2) then -- The sub bit is to slice off the EOLs at each end. 681 if sz ~= fsz:sub(2, -2) then -- The sub bit is to slice off the EOLs at each end.
683 E('Package size mismatch - results/' .. host .. "/merged/" .. p .. ' should be ' .. sz .. ', but is ' .. fsz:sub(2, -2) .. '.', 'http', 'Integrity', host) 682 E('Package size mismatch - results/' .. host .. "/merged/" .. p .. ' should be ' .. sz .. ', but is ' .. fsz:sub(2, -2) .. '.', 'http', 'Integrity', host)
684 else 683 else
685-- local status, fsha = APT.execute('sha256sum results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 1')
686 local fsha = APT.exe('sha256sum results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 1'):log():Do().result 684 local fsha = APT.exe('sha256sum results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 1'):log():Do().result
687 if sha ~= fsha:sub(2, -2) then E('Package SHA256 sum mismatch - results/' .. host .. "/merged/" .. p, 'http', 'Integrity', host) end 685 if sha ~= fsha:sub(2, -2) then E('Package SHA256 sum mismatch - results/' .. host .. "/merged/" .. p, 'http', 'Integrity', host) end
688-- TODO - maybe check the PGP key, though packages are mostly not signed. 686-- TODO - maybe check the PGP key, though packages are mostly not signed.
@@ -934,13 +932,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them.
934 end 932 end
935 D('*&gt;* Resumed coroutine NO LONGER waiting on - 0 < APT.checkExes(' .. downloadLock .. list.out .. '-' .. host .. '.log.txt') 933 D('*&gt;* Resumed coroutine NO LONGER waiting on - 0 < APT.checkExes(' .. downloadLock .. list.out .. '-' .. host .. '.log.txt')
936 934
937 -- Should not be needed, but maybe this is why sometimes I don't see the speeds, though the file is there when I look later.
938 local f = 'results/curl-' .. list.out .. "-" .. host .. ".log.txt" 935 local f = 'results/curl-' .. list.out .. "-" .. host .. ".log.txt"
939-- while not APT.checkFile(f) do
940-- D('*&lt;* About to yield coroutine while waiting on - not APT.checkFile(' .. f .. ')')
941-- coroutine.yield()
942-- D('*&gt;* Resumed coroutine while waiting on - not APT.checkFile(' .. f .. ')')
943-- end
944 936
945--[[ TODO - should try to figure out which server the file actually got downloaded from, and attribute the speed and errors to that server. 937--[[ TODO - should try to figure out which server the file actually got downloaded from, and attribute the speed and errors to that server.
946 Which means parsing the curl logs, not just a simple match(). 938 Which means parsing the curl logs, not just a simple match().