[Qa-jenkins-scm] [jenkins.debian.net] 01/03: chroot-run: automatically enables backports when the requested suite ends in '-backports'

Mattia Rizzolo mattia at debian.org
Fri Dec 29 16:45:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository jenkins.debian.net.

commit b97e336185306e4d0231ca12f954daa785f4217a
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Fri Dec 29 17:43:33 2017 +0100

    chroot-run: automatically enables backports when the requested suite ends in '-backports'
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/chroot-run.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh
index 1e9acb1..efb31cf 100755
--- a/bin/chroot-run.sh
+++ b/bin/chroot-run.sh
@@ -17,7 +17,7 @@ if [ "$ARTIFACTS" != "true" ] ; then
 	ARTIFACTS=false
 fi
 
-# $1 = base distro
+# $1 = base distro (if the '-backports' is used, then it automatically bpo)
 # $2 $3 ... = command to run inside a clean chroot running the distro in $1
 
 if [ $# -lt 2 ]; then
@@ -25,13 +25,22 @@ if [ $# -lt 2 ]; then
 	exit 1
 fi
 
-DISTRO="$1"
+if [ -z "${1%%*-backports}" ]; then
+	DISTRO="${1%-backports}"
+	BACKPORTS=yes
+else
+	DISTRO="$1"
+fi
 shift
 
 if [ "$1" = "backports" ] ; then
+	BACKPORTS=yes
+	shift
+fi
+
+if [ "$BACKPORTS" = "yes" ]; then
 	BACKPORTS="deb $MIRROR ${DISTRO}-backports main"
 	BACKPORTSSRC="deb-src $MIRROR ${DISTRO}-backports main"
-	shift
 fi
 
 if [ "$1" = "minimal" ] ; then

-- 
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