From 7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 3 Jan 2020 23:26:50 +1000 Subject: This might finally fix the Updated test, but include some more debugging output, just in case. I blame unclear Lua documantation. --- apt-panopticon.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 5797f91..0f7cf99 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -814,7 +814,7 @@ end local parseRelease = function(host) local list = {inf = 'Release', parser = parsePackages, out = 'Packages', files = {}, nextf = 'debs'} local updated = false - local now = tonumber(os.date('!%s')) + local now = tonumber(os.date('%s')) for i, n in pairs(releases) do for l, o in pairs(releaseFiles) do if repoExists(i .. o) then @@ -858,6 +858,9 @@ local parseRelease = function(host) local upd = pkt + APT.mirrors[host].Updated local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. if pkt > new then + D( 'pkt is ' .. os.date('!%F %T', pkt) .. ' new is ' .. os.date('!%F %T', new) .. + ' upd is ' .. os.date('!%F %T', upd) .. ' updd is ' .. os.date('!%F %T', updd) .. + ' now is ' .. os.date('!%F %T', now) .. ' Updated is ' .. APT.mirrors[host].Updated) if updd >= now then W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) Updating = true -- cgit v1.1