summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes 'josch' Schauer <josch@mister-muffin.de>2016-02-11 12:55:16 +0100
committerHolger Levsen <holger@layer-acht.org>2016-02-11 12:58:53 +0100
commit11b16bf7be3e0509749ac9d5f560e85f7278b4fd (patch)
treeb45bee0d595b11ed561e6798feac5ba901f192c8
parenteaf9e2074edf4a0d3ce93744431351305deba1e1 (diff)
downloadjenkins.debian.net-11b16bf7be3e0509749ac9d5f560e85f7278b4fd.tar.xz
bin/find_dpkg_trigger_cycles.sh: improve curl error reporting
-rwxr-xr-xbin/find_dpkg_trigger_cycles.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh
index 14416a84..ce78f496 100755
--- a/bin/find_dpkg_trigger_cycles.sh
+++ b/bin/find_dpkg_trigger_cycles.sh
@@ -187,7 +187,9 @@ curl --retry 3 --retry-delay 10 --globoff "http://binarycontrol.debian.net/?q=&p
#
# 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 ) ) \
+ ( curl --retry 3 --retry-delay 10 --location --silent "$url" \
+ || { err="$?" && [ "$err" -eq 23 ]; } \
+ || ( echo "curl failed downloading $url for $pkg with exit $err">&2 && exec /srv/jenkins/bin/abort.sh ) ) \
| dpkg-deb --ctrl-tarfile /dev/stdin \
| tar -C "$tmpdir" --exclude=./md5sums -x
if [ ! -f "$tmpdir/triggers" ]; then