diff options
author | onefang | 2020-01-03 23:26:50 +1000 |
---|---|---|
committer | onefang | 2020-01-03 23:26:50 +1000 |
commit | 7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef (patch) | |
tree | 5eb1262746db26f8503ef88836d2a7a4eb0230e1 | |
parent | A few less steps in some of the time calcs. (diff) | |
download | apt-panopticon-7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef.zip apt-panopticon-7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef.tar.gz apt-panopticon-7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef.tar.bz2 apt-panopticon-7166e4f2255bae9f5ca3fcebf7c9112e9176c5ef.tar.xz |
This might finally fix the Updated test, but include some more debugging output, just in case.
I blame unclear Lua documantation.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 5 |
1 files changed, 4 insertions, 1 deletions
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 | |||
814 | local parseRelease = function(host) | 814 | local parseRelease = function(host) |
815 | local list = {inf = 'Release', parser = parsePackages, out = 'Packages', files = {}, nextf = 'debs'} | 815 | local list = {inf = 'Release', parser = parsePackages, out = 'Packages', files = {}, nextf = 'debs'} |
816 | local updated = false | 816 | local updated = false |
817 | local now = tonumber(os.date('!%s')) | 817 | local now = tonumber(os.date('%s')) |
818 | for i, n in pairs(releases) do | 818 | for i, n in pairs(releases) do |
819 | for l, o in pairs(releaseFiles) do | 819 | for l, o in pairs(releaseFiles) do |
820 | if repoExists(i .. o) then | 820 | if repoExists(i .. o) then |
@@ -858,6 +858,9 @@ local parseRelease = function(host) | |||
858 | local upd = pkt + APT.mirrors[host].Updated | 858 | local upd = pkt + APT.mirrors[host].Updated |
859 | local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. | 859 | local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. |
860 | if pkt > new then | 860 | if pkt > new then |
861 | D( 'pkt is ' .. os.date('!%F %T', pkt) .. ' new is ' .. os.date('!%F %T', new) .. | ||
862 | ' upd is ' .. os.date('!%F %T', upd) .. ' updd is ' .. os.date('!%F %T', updd) .. | ||
863 | ' now is ' .. os.date('!%F %T', now) .. ' Updated is ' .. APT.mirrors[host].Updated) | ||
861 | if updd >= now then | 864 | if updd >= now then |
862 | W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) | 865 | W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) |
863 | Updating = true | 866 | Updating = true |