[Qa-jenkins-scm] [jenkins.debian.net] 01/01: bin/find_dpkg_trigger_cycles.sh: Use true tmp dir and cleanup at the end
Holger Levsen
holger at layer-acht.org
Mon Nov 20 08:39:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 014cc2a6be7b01c306e200dbef420dd3aba6f6f6
Author: Johannes 'josch' Schauer <josch at mister-muffin.de>
Date: Mon Nov 20 09:11:08 2017 +0100
bin/find_dpkg_trigger_cycles.sh: Use true tmp dir and cleanup at the end
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/find_dpkg_trigger_cycles.sh | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh
index 938f994..c31ca01 100755
--- a/bin/find_dpkg_trigger_cycles.sh
+++ b/bin/find_dpkg_trigger_cycles.sh
@@ -106,11 +106,16 @@ set -e
ARCH="amd64"
CODENAME="$1"
-DIRECTORY="`pwd`/debian-$CODENAME-$ARCH"
+DIRECTORY=$(mktemp --directory tmp.jenkins_find_dpkg_trigger_cycles_${ARCH}_${CODENAME}_XXXXXXXXXX)
APT_OPTS="-y"
#APT_OPTS=$APT_OPTS" -o Acquire::Check-Valid-Until=false" # because we use snapshot
+function finish {
+ rm -rf "$DIRECTORY"
+}
+trap finish EXIT
+
mkdir -p $DIRECTORY
mkdir -p $DIRECTORY/etc/apt/
mkdir -p $DIRECTORY/etc/apt/trusted.gpg.d/
@@ -185,12 +190,6 @@ 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$
#
# We cannot use "apt-get --print-uris download" and use the python module
@@ -203,7 +202,7 @@ curl --retry 3 --retry-delay 10 --globoff "http://binarycontrol.debian.net/?q=&p
| sort -u \
| while read pkg url; do
echo "working on $pkg..." >&2
- tmpdir=`mktemp -d --tmpdir="$scratch" -t dpkg-trigger-cycles-curl-XXXXXXXX`
+ tmpdir=$(mktemp -d --tmpdir="$DIRECTORY" 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list