summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-05 02:26:06 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-05 02:26:06 +0200
commite4bb3bbfdd68aa39e8819f401b25aae744ba180c (patch)
treec0e6f6c732474807a24325cbcfc4cdb2b1b782cc /bin
parente63787d11d171df98781c0384d7bf57a8415af19 (diff)
downloadjenkins.debian.net-e4bb3bbfdd68aa39e8819f401b25aae744ba180c.tar.xz
reproducible: pbuilder setup: replace existing base.tgz only when a new one can be created
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_setup.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/reproducible_setup.sh b/bin/reproducible_setup.sh
index 845a516b..f36442ac 100755
--- a/bin/reproducible_setup.sh
+++ b/bin/reproducible_setup.sh
@@ -99,8 +99,7 @@ EOF
#
# actually setup pbuilder
#
-sudo rm /var/cache/pbuilder/base-reproducible.tgz || true
-sudo pbuilder --create --basetgz /var/cache/pbuilder/base-reproducible.tgz --distribution sid
-sudo pbuilder --execute --save-after-exec --basetgz /var/cache/pbuilder/base-reproducible.tgz -- ${TMPFILE}
+sudo pbuilder --create --basetgz /var/cache/pbuilder/base-reproducible-new.tgz --distribution sid
+sudo pbuilder --execute --save-after-exec --basetgz /var/cache/pbuilder/base-reproducible-new.tgz -- ${TMPFILE}
+sudo mv pbuilder/base-reproducible-new.tgz /var/cache/pbuilder/base-reproducible.tgz
rm ${TMPFILE}
-