diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 21e7599..fd757ec 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -48,6 +48,12 @@ options = | |||
48 | "Updated", | 48 | "Updated", |
49 | }, | 49 | }, |
50 | }, | 50 | }, |
51 | maxtime = | ||
52 | { | ||
53 | typ = "number", | ||
54 | help = "", | ||
55 | value = 300, | ||
56 | }, | ||
51 | timeout = | 57 | timeout = |
52 | { | 58 | { |
53 | typ = "number", | 59 | typ = "number", |
@@ -679,6 +685,7 @@ local postDownload = function(host, r, k) | |||
679 | if options.referenceSite.value == host then | 685 | if options.referenceSite.value == host then |
680 | if "Packages." == file:sub(1, 9) then | 686 | if "Packages." == file:sub(1, 9) then |
681 | -- TODO - compare the SHA256 sums in pkgmaster's Release for both the packed and unpacked versions. | 687 | -- TODO - compare the SHA256 sums in pkgmaster's Release for both the packed and unpacked versions. |
688 | -- Also note that this might get only a partial download due to maxtime. | ||
682 | local Pp, e = io.open('results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed', "w+") | 689 | local Pp, e = io.open('results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed', "w+") |
683 | if nil == Pp then W('opening results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed' .. ' file - ' .. e) else | 690 | if nil == Pp then W('opening results/' .. host .. '/merged/dists/'.. r .. dir .. 'Packages.parsed' .. ' file - ' .. e) else |
684 | local pp = {} | 691 | local pp = {} |
@@ -734,7 +741,7 @@ local postDownload = function(host, r, k) | |||
734 | end | 741 | end |
735 | 742 | ||
736 | local downloadLock = "flock -n results/curl-" | 743 | local downloadLock = "flock -n results/curl-" |
737 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -f -L -z 'results/stamp.old' -v -R " | 744 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -f -L --max-time " .. options.maxtime.value .. " -z 'results/stamp.old' -v -R " |
738 | local downloads = function(host, URL, release, list) | 745 | local downloads = function(host, URL, release, list) |
739 | if nil == URL then URL = "" end | 746 | if nil == URL then URL = "" end |
740 | local lock = "%s-" .. host .. ".lock" | 747 | local lock = "%s-" .. host .. ".lock" |