summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJohannes 'josch' Schauer <josch@mister-muffin.de>2016-02-11 12:48:50 +0100
committerHolger Levsen <holger@layer-acht.org>2016-02-11 12:58:48 +0100
commiteaf9e2074edf4a0d3ce93744431351305deba1e1 (patch)
tree8254292bbee9622f16c76b9b76fd5104deb09c35 /bin
parent73e9aa8e2bcd78e2f29d726e0af21a106fcdf6db (diff)
downloadjenkins.debian.net-eaf9e2074edf4a0d3ce93744431351305deba1e1.tar.xz
bin/find_dpkg_trigger_cycles.sh: add comment to explain curl usage in pipeline
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find_dpkg_trigger_cycles.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh
index 12c02c71..14416a84 100755
--- a/bin/find_dpkg_trigger_cycles.sh
+++ b/bin/find_dpkg_trigger_cycles.sh
@@ -176,6 +176,15 @@ curl --retry 3 --retry-delay 10 --globoff "http://binarycontrol.debian.net/?q=&p
| while read pkg url; do
echo "working on $pkg..." >&2
tmpdir=`mktemp -d --tmpdir="$scratch" -t dpkg-trigger-cycles-curl-XXXXXXXX`
+ # we use curl as part of a pipeline to dpkg-deb instead of first
+ # downloading to a temporary file and then using dpkg-deb on it,
+ # because we do not want to download the full .deb (which could be very
+ # large) but only the beginning of it until dpkg-deb has the
+ # control.tar.gz extracted. After that, dpkg-deb will close the pipe
+ # and thus signal curl to stop downloading. Downloading the full
+ # binary package would be unnecessarily wasteful thousands of binary
+ # packages in terms of bandwidth and disk requirements.
+ #
# curl is allowed to fail with exit status 23 because we want to stop
# downloading immediately after control.tar.gz has been extracted
( curl --retry 3 --retry-delay 10 --location --silent "$url" || [ "$?" -eq 23 ] || ( echo "curl failed">&2 && exec /srv/jenkins/bin/abort.sh ) ) \