diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-22 20:38:05 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-22 20:38:05 +0000 |
commit | e659e1ebb57ca22ef9c943bd1b92aa3d8a620907 (patch) | |
tree | a362f7935056351ab27a9fe4e4ee496b6b196822 /debian | |
parent | 91708724401f61b05f432185176066d1f5ec2ec0 (diff) | |
download | pbuilder-e659e1ebb57ca22ef9c943bd1b92aa3d8a620907.tar pbuilder-e659e1ebb57ca22ef9c943bd1b92aa3d8a620907.tar.gz |
d/t/build-procenv: use archive.u.c for amd64/i386 and ports.u.c for everything else to fix the tests on ubuntu
Diffstat (limited to 'debian')
-rw-r--r-- | debian/tests/build-procenv | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/debian/tests/build-procenv b/debian/tests/build-procenv index 218db38..df1c4d7 100644 --- a/debian/tests/build-procenv +++ b/debian/tests/build-procenv @@ -13,8 +13,8 @@ die() exit 1 } -# The package we'll ask sbuild to build (we know its buildable since -# it's already in the archive :-) +# The package we'll ask pbuilder to build (we know its buildable since +# it's already in the archive :-)) # # The advantage of choosing this particular package being that it runs # *itself* at the end of its build. @@ -27,7 +27,8 @@ unset TMPDIR distro=$(lsb_release --id --short|tr '[A-Z]' '[a-z]' || :) [ -z "$distro" ] && die "cannot establish distribution" - +arch=$(dpkg --print-architecture 2>/dev/null) +[ -z "$arch" ] && die "cannot establish architecture" host_release=$(lsb_release --codename --short || :) [ -z "$host_release" ] && die "cannot establish release running on host" @@ -37,12 +38,15 @@ if [ "$distro" = debian ] ; then mirror="http://httpredir.debian.org/debian" keyring="/usr/share/keyrings/debian-archive-keyring.gpg" elif [ "$distro" = ubuntu ] ; then + case "$arch" in + amd64|i386) mirror="http://archive.ubuntu.com/ubuntu" ;; + *) mirror="http://ports.ubuntu.com" ;; + esac release=$(distro-info --devel) components="main universe" - mirror="http://archive.ubuntu.com/ubuntu" keyring="/usr/share/keyrings/ubuntu-archive-keyring.gpg" else - die "need to know where archive is for distro '$distro'" + die "need to know where archive is for distro '$distro' on arch '$arch'" fi # Have to redirect stderr to avoid ADT thinking the test has failed @@ -69,9 +73,6 @@ dsc=$(ls ${pkg}*.dsc) echo "INFO: Building package '$pkg' for release '$release' from '$dsc'" pbuilder --build --debug "$dsc" 2>&1 -arch=$(dpkg --print-architecture 2>/dev/null) -[ -z "$arch" ] && die "cannot establish architecture" - pkg_and_version=$(echo "$dsc"|sed 's/\.dsc$//g') deb=${resultdir}/${pkg_and_version}_${arch}.deb |