diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index d2fa9b9..8566dad 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -745,9 +745,9 @@ local downloadLock = "flock -n results/curl-" | |||
745 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -f -L --max-time " .. options.maxtime.value .. " -z 'results/stamp.old' -v -R " | 745 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -f -L --max-time " .. options.maxtime.value .. " -z 'results/stamp.old' -v -R " |
746 | local downloads = function(host, URL, release, list) | 746 | local downloads = function(host, URL, release, list) |
747 | if nil == URL then URL = "" end | 747 | if nil == URL then URL = "" end |
748 | local lock = "%s-" .. host .. ".lock" | 748 | local lock = "META-" .. host .. ".lock" |
749 | local log = " --stderr results/curl-%s_" .. host .. ".log" | 749 | local log = " --stderr results/curl-META-" .. host .. ".log" |
750 | local cm = "ionice -c3 nice -n 19 " .. downloadLock .. lock:format("META") .. " " .. download .. log:format("META") .. " -K results/" .. host .. ".curl" | 750 | local cm = "ionice -c3 nice -n 19 " .. downloadLock .. lock .. " " .. download .. log .. " -K results/" .. host .. ".curl" |
751 | if testing("IPv4") and (not testing("IPv6")) then cm = cm .. ' -4' end | 751 | if testing("IPv4") and (not testing("IPv6")) then cm = cm .. ' -4' end |
752 | if (not testing("IPv4")) and testing("IPv6") then cm = cm .. ' -6' end | 752 | if (not testing("IPv4")) and testing("IPv6") then cm = cm .. ' -6' end |
753 | f, e = io.open("results/" .. host .. ".curl", "a+") | 753 | f, e = io.open("results/" .. host .. ".curl", "a+") |
@@ -968,7 +968,8 @@ if 0 < #arg then | |||
968 | if 4 > (totalTimeouts) then | 968 | if 4 > (totalTimeouts) then |
969 | if origin and (options.roundRobin.value ~= pu.host) then | 969 | if origin and (options.roundRobin.value ~= pu.host) then |
970 | while 0 < checkExes(downloadLock .. "META-" .. pu.host .. ".lock") do os.execute("sleep 10") end | 970 | while 0 < checkExes(downloadLock .. "META-" .. pu.host .. ".lock") do os.execute("sleep 10") end |
971 | os.execute("rm -f results/" .. pu.host .. ".curl; rm results/curl-" .. "META-" .. pu.host .. ".lock") | 971 | os.execute( "rm -f results/" .. pu.host .. ".curl; rm results/curl-META-" .. pu.host .. ".lock; " .. |
972 | "mv results/curl-META-" .. pu.host .. ".log results/curl-Release-" .. pu.host .. ".log") | ||
972 | for i, n in pairs(releases) do | 973 | for i, n in pairs(releases) do |
973 | for l, o in pairs(releaseFiles) do | 974 | for l, o in pairs(releaseFiles) do |
974 | if repoExists(i .. o) then | 975 | if repoExists(i .. o) then |
@@ -998,7 +999,8 @@ if 0 < #arg then | |||
998 | 999 | ||
999 | downloads(pu.host, pu.path, "", "") | 1000 | downloads(pu.host, pu.path, "", "") |
1000 | while 0 < checkExes(downloadLock .. "META-" .. pu.host .. ".lock") do os.execute("sleep 10") end | 1001 | while 0 < checkExes(downloadLock .. "META-" .. pu.host .. ".lock") do os.execute("sleep 10") end |
1001 | os.execute("rm -f results/" .. pu.host .. ".curl; rm results/curl-" .. "META-" .. pu.host .. ".lock") | 1002 | os.execute( "rm -f results/" .. pu.host .. ".curl; rm results/curl-META-" .. pu.host .. ".lock; " .. |
1003 | "mv results/curl-META-" .. pu.host .. ".log results/curl-Packages-" .. pu.host .. ".log") | ||
1002 | 1004 | ||
1003 | for i, n in pairs(releases) do | 1005 | for i, n in pairs(releases) do |
1004 | local dfile, e = io.open('results/NEW_Release_' .. n .. '.txt', "r") | 1006 | local dfile, e = io.open('results/NEW_Release_' .. n .. '.txt', "r") |