Browse Source

Not being able to download an updated file while the mirror is still updating is only a warning.

master
onefang 3 years ago
parent
commit
a223e29a13
  1. 8
      apt-panopticon.lua

8
apt-panopticon.lua

@ -155,6 +155,7 @@ local url = require 'socket.url'
local ip = ""
local cor = nil
local Updating = false
local downloadLock = "flock -n results/curl-"
local arw = ' &nbsp; <font color="magenta"><b>-></b></font> &nbsp; '
@ -693,7 +694,11 @@ local parseDebs = function(host)
end
os.execute('rm -f results/' .. host .. "/merged/" .. p)
else
E('Failed to download ' .. host .. "/merged/" .. p, 'http', 'Updated', host)
if Updating then
W('Not yet able to download, awaiting update for ' .. host .. "/merged/" .. p, 'http', 'Updated', host)
else
E('Failed to download ' .. host .. "/merged/" .. p, 'http', 'Updated', host)
end
end
end
end
@ -857,6 +862,7 @@ local parseRelease = function(host)
if pkt > new then
if updd >= now then
W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host)
Updating = true
else
E('Release ' .. n .. ' not updated, should have updated @ ' .. os.date('!%F %T', upd) .. ', but was last updated @ ' .. os.date('!%F %T', new), 'http', 'Updated', host)
end

Loading…
Cancel
Save