diff options
-rwxr-xr-x | apt-panopticon.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index c15c369..fee4e28 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -816,9 +816,10 @@ local parseRelease = function(host) | |||
816 | pkt = tonumber(pkt:sub(2, -2)) | 816 | pkt = tonumber(pkt:sub(2, -2)) |
817 | local status, new = APT.execute([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. host .. [[/merged/dists/]] .. n .. [[/Release.SORTED | cut -d ' ' -f 2-)" '+%s']], false) | 817 | local status, new = APT.execute([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. host .. [[/merged/dists/]] .. n .. [[/Release.SORTED | cut -d ' ' -f 2-)" '+%s']], false) |
818 | new = tonumber(new:sub(2, -2)) | 818 | new = tonumber(new:sub(2, -2)) |
819 | local upd = pkt + APT.mirrors[host].Updated | 819 | local upd = pkt + APT.mirrors[host].Updated |
820 | local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. | ||
820 | if pkt > new then | 821 | if pkt > new then |
821 | if upd >= now then | 822 | if updd >= now then |
822 | W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) | 823 | W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) |
823 | else | 824 | else |
824 | 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) | 825 | 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) |