[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] schroot-create: use mmdebstrap where available, else debootstrap
Holger Levsen
gitlab at salsa.debian.org
Wed Jan 15 12:08:52 GMT 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
1f55c92f by Holger Levsen at 2020-01-15T13:08:39+01:00
schroot-create: use mmdebstrap where available, else debootstrap
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/schroot-create.sh
Changes:
=====================================
bin/schroot-create.sh
=====================================
@@ -97,14 +97,23 @@ robust_chroot_apt() {
bootstrap() {
echo "Bootstraping $SUITE into $SCHROOT_TARGET now."
- sudo mmdebstrap $SUITE $SCHROOT_TARGET $MIRROR | tee $TMPLOG
+ if which mmdebstrap ; then
+ # not available on Ubuntu 16.04 LTS
+ DEBOOTSTRAP=mmdebstrap
+ else
+ DEBOOTSTRAP=deboostrap
+ # configure dpkg to be faster (mmdebstrap expects an empty directory and is fast by design)
+ mkdir -p "$SCHROOT_TARGET/etc/dpkg/dpkg.cfg.d"
+ echo force-unsafe-io > "$SCHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io"
+ fi
+ sudo $DEBOOTSTRAP $SUITE $SCHROOT_TARGET $MIRROR | tee $TMPLOG
local rt="${PIPESTATUS[0]}"
local RESULT=$(egrep "E: (Couldn't download packages|Invalid Release signature)" $TMPLOG || true)
if [ ! -z "$RESULT" ] || [ "$rt" -ne 0 ]; then
echo "$(date -u) - initial bootstrap failed, sleeping 5min before retrying..."
sudo rm -rf --one-file-system $SCHROOT_TARGET
sleep 5m
- sudo mmdebstrap $SUITE $SCHROOT_TARGET $MIRROR || ( echo "$(date -u ) - 2nd bootstrap failed, giving up..." ; exit 1 )
+ sudo $DEBOOTSTRAP $SUITE $SCHROOT_TARGET $MIRROR || ( echo "$(date -u ) - 2nd bootstrap failed, giving up..." ; exit 1 )
fi
rm -f $TMPLOG
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/1f55c92fcaae83dd0d593c33c5fd6810762f96c3
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/1f55c92fcaae83dd0d593c33c5fd6810762f96c3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20200115/243b59d3/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list