aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-01-03 02:04:03 +1000
committeronefang2020-01-03 02:04:03 +1000
commita223e29a13b5ef14efdd7b26b01f574095d9e463 (patch)
tree18ec52cbffe59653dc913a33b3899e48ba711126
parentMay need to wait on the file to avoid missing speeds after all. (diff)
downloadapt-panopticon-a223e29a13b5ef14efdd7b26b01f574095d9e463.zip
apt-panopticon-a223e29a13b5ef14efdd7b26b01f574095d9e463.tar.gz
apt-panopticon-a223e29a13b5ef14efdd7b26b01f574095d9e463.tar.bz2
apt-panopticon-a223e29a13b5ef14efdd7b26b01f574095d9e463.tar.xz
Not being able to download an updated file while the mirror is still updating is only a warning.
-rwxr-xr-xapt-panopticon.lua8
1 files changed, 7 insertions, 1 deletions
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'
155 155
156local ip = "" 156local ip = ""
157local cor = nil 157local cor = nil
158local Updating = false
158 159
159local downloadLock = "flock -n results/curl-" 160local downloadLock = "flock -n results/curl-"
160local arw = ' &nbsp; <font color="magenta"><b>-></b></font> &nbsp; ' 161local arw = ' &nbsp; <font color="magenta"><b>-></b></font> &nbsp; '
@@ -693,7 +694,11 @@ local parseDebs = function(host)
693 end 694 end
694 os.execute('rm -f results/' .. host .. "/merged/" .. p) 695 os.execute('rm -f results/' .. host .. "/merged/" .. p)
695 else 696 else
696 E('Failed to download ' .. host .. "/merged/" .. p, 'http', 'Updated', host) 697 if Updating then
698 W('Not yet able to download, awaiting update for ' .. host .. "/merged/" .. p, 'http', 'Updated', host)
699 else
700 E('Failed to download ' .. host .. "/merged/" .. p, 'http', 'Updated', host)
701 end
697 end 702 end
698 end 703 end
699 end 704 end
@@ -857,6 +862,7 @@ local parseRelease = function(host)
857 if pkt > new then 862 if pkt > new then
858 if updd >= now then 863 if updd >= now then
859 W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) 864 W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host)
865 Updating = true
860 else 866 else
861 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) 867 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)
862 end 868 end