From a223e29a13b5ef14efdd7b26b01f574095d9e463 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 3 Jan 2020 02:04:03 +1000 Subject: Not being able to download an updated file while the mirror is still updating is only a warning. --- apt-panopticon.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 2ffda50..e9b1015 100755 --- a/apt-panopticon.lua +++ b/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 = '   ->   ' @@ -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 -- cgit v1.1