Browse Source

Clean out commented stuff that is no longer needed.

master
onefang 1 year ago
parent
commit
0491ba3d56
1 changed files with 0 additions and 8 deletions
  1. +0
    -8
      apt-panopticon.lua

+ 0
- 8
apt-panopticon.lua View File

@@ -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('*&gt;* 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('*&lt;* About to yield coroutine while waiting on - not APT.checkFile(' .. f .. ')')
-- coroutine.yield()
-- D('*&gt;* 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().


Loading…
Cancel
Save