[DRE-commits] [pkg-ruby-extras] 02/02: build-and-upload: map codenames to aliases if lxc container not found

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Dec 18 12:17:19 UTC 2017


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

terceiro pushed a commit to branch master
in repository pkg-ruby-extras.

commit ea03fece1349cde49414bf87f46856577a912ecf
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Mon Dec 18 10:15:35 2017 -0200

    build-and-upload: map codenames to aliases if lxc container not found
---
 build-and-upload | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build-and-upload b/build-and-upload
index 57b513c..4cd4311 100755
--- a/build-and-upload
+++ b/build-and-upload
@@ -80,6 +80,18 @@ check_package() {
       fi
       autopkgtest_dist=${autopkgtest_dist%%-security}
       autopkgtest_dist=${autopkgtest_dist%%-backports}
+      if [ ! -d /var/lib/lxc/autopkgtest-"$autopkgtest_dist"-"$arch" ]; then
+        if which distro-info >/dev/null; then
+          autopkgtest_dist=$(distro-info --alias=$autopkgtest_dist)
+          echo "I: lxc container autopkgtest-$autopkgtest_dist-$arch not found"
+          echo "I: Trying autopkgtest-$autopkgtest_dist-$arch instead"
+        else
+          echo ""
+          echo "E: lxc container autopkgtest-$autopkgtest_dist-$arch not found"
+          echo "I: Install distro-info so we can also try mapping codenames (toy story characters) to aliases (stable, testing, etc)"
+          exit 1
+        fi
+      fi
       rc=0
       autopkgtest --user debci --apt-upgrade --shell-fail "$changes" -- lxc --sudo autopkgtest-"$autopkgtest_dist"-"$arch" || rc=$?
       if [ $rc -ne 0 -a $rc -ne 2 ]; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pkg-ruby-extras.git



More information about the Pkg-ruby-extras-commits mailing list