From 0491ba3d56b377db5f8b205ffc1a44c147b08952 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 2 Jan 2020 18:00:06 +1000 Subject: Clean out commented stuff that is no longer needed. --- apt-panopticon.lua | 8 -------- 1 file changed, 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) local v, p, sz, sha = l:match(' | (.+) | (pool/.+%.deb) | (%d.+) | (%x.+) |') if nil ~= p then if APT.checkFile('results/' .. host .. "/merged/" .. p) then --- local status, fsz = APT.execute('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5', false) local fsz = APT.exe('ls -l results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 5-5'):Do().result if APT.testing("Integrity") then if sz ~= fsz:sub(2, -2) then -- The sub bit is to slice off the EOLs at each end. E('Package size mismatch - results/' .. host .. "/merged/" .. p .. ' should be ' .. sz .. ', but is ' .. fsz:sub(2, -2) .. '.', 'http', 'Integrity', host) else --- local status, fsha = APT.execute('sha256sum results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 1') local fsha = APT.exe('sha256sum results/' .. host .. "/merged/" .. p .. ' | cut -d " " -f 1'):log():Do().result if sha ~= fsha:sub(2, -2) then E('Package SHA256 sum mismatch - results/' .. host .. "/merged/" .. p, 'http', 'Integrity', host) end -- 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. end D('*>* Resumed coroutine NO LONGER waiting on - 0 < APT.checkExes(' .. downloadLock .. list.out .. '-' .. host .. '.log.txt') - -- 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. local f = 'results/curl-' .. list.out .. "-" .. host .. ".log.txt" --- while not APT.checkFile(f) do --- D('*<* About to yield coroutine while waiting on - not APT.checkFile(' .. f .. ')') --- coroutine.yield() --- D('*>* Resumed coroutine while waiting on - not APT.checkFile(' .. f .. ')') --- end --[[ TODO - should try to figure out which server the file actually got downloaded from, and attribute the speed and errors to that server. Which means parsing the curl logs, not just a simple match(). -- cgit v1.1