diff options
Diffstat (limited to 'bin/find_dpkg_trigger_cycles.sh')
-rwxr-xr-x | bin/find_dpkg_trigger_cycles.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh index 8e5f7448..36460dc8 100755 --- a/bin/find_dpkg_trigger_cycles.sh +++ b/bin/find_dpkg_trigger_cycles.sh @@ -146,6 +146,12 @@ printf "" > $DIRECTORY/interested-explicit printf "" > $DIRECTORY/activated-file printf "" > $DIRECTORY/activated-explicit +scratch=$(mktemp -d -t tmp.dpkg_trigger_cycles.XXXXXXXXXX) +function finish { + rm -rf "$scratch" +} +trap finish EXIT + # find all binary packages with /triggers$ curl --globoff "http://binarycontrol.debian.net/?q=&path=${DIST}%2F[^%2F]%2B%2Ftriggers%24&format=pkglist" \ | xargs apt-get $APT_OPTS --print-uris download \ @@ -153,7 +159,7 @@ curl --globoff "http://binarycontrol.debian.net/?q=&path=${DIST}%2F[^%2F]%2B%2Ft | sort \ | while read pkg url; do echo "working on $pkg..." >&2 - tmpdir=`mktemp -d` + tmpdir=`mktemp -d --tmpdir="$scratch"` ( curl --retry 2 --retry-delay 10 --location --silent "$url" || ( echo "curl failed with exit $?">&2; exit 1 ) ) \ | dpkg-deb --ctrl-tarfile /dev/stdin \ | tar -C "$tmpdir" --exclude=./md5sums -x |