(try to) fix travis-ci build failures
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 12 May 2014 19:25:43 +0000 (21:25 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 29 May 2014 09:23:31 +0000 (11:23 +0200)
dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific
dependencies, so we try to detect if we face such a dpkg in the test.

In the other test the order depends on libdb, which changes per arch, so
we just run it through our sorting binary and be happy (hopefully).

Git-Dch: Ignore

test/integration/framework
test/integration/test-apt-ftparchive-src-cachedb
test/integration/test-bug-747261-arch-specific-conflicts

index eda3ceb..4f0a699 100644 (file)
@@ -36,7 +36,7 @@ msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}"; }
 msgtest() {
        while [ -n "$1" ]; do
                echo -n "${CINFO}$1${CCMD} "
-               echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} "
+               echo -n "$(echo "$2" | sed -e 's#^apt\([cgfs]\)#apt-\1#')${CINFO} "
                shift
                if [ -n "$1" ]; then shift; else break; fi
        done
@@ -114,6 +114,7 @@ aptget() { runapt apt-get "$@"; }
 aptftparchive() { runapt apt-ftparchive "$@"; }
 aptkey() { runapt apt-key "$@"; }
 aptmark() { runapt apt-mark "$@"; }
+aptsortpkgs() { runapt apt-sortpkgs "$@"; }
 apt() { runapt apt "$@"; }
 apthelper() { runapt "${APTHELPERBINDIR}/apt-helper" "$@"; }
 aptwebserver() { runapt "${APTWEBSERVERBINDIR}/aptwebserver" "$@"; }
index 1af1936..adcca62 100755 (executable)
@@ -3,9 +3,9 @@ set -e
 
 assert_correct_sources_file() {
     testequal "Package: bar
-Binary: bar
-Version: 1.0
 Architecture: all
+Version: 1.0
+Binary: bar
 Format: 3.0 (native)
 Directory: pool/main
 Files:
@@ -24,9 +24,9 @@ Checksums-Sha512:
  cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 bar_1.0.tar.gz
 
 Package: foo
-Binary: foo
-Version: 1.0
 Architecture: all
+Version: 1.0
+Binary: foo
 Format: 3.0 (native)
 Directory: pool/main
 Files:
@@ -43,7 +43,7 @@ Checksums-Sha256:
 Checksums-Sha512:
  3da0240fd764657c2f3661b4d750578a9a99b0580591b133756379d48117ebda87a5ed2467f513200d6e7eaf51422cbe91c15720eef7fb4bba2cc8ff81ebc547 171 foo_1.0.dsc
  cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 foo_1.0.tar.gz
-" cat ./aptarchive/dists/test/main/source/Sources
+" aptsortpkgs ./aptarchive/dists/test/main/source/Sources
 }
 
 create_source_files() {
index bfb2d08..be971b8 100755 (executable)
@@ -6,6 +6,21 @@ TESTDIR=$(readlink -f $(dirname $0))
 setupenvironment
 configarchitecture 'amd64' 'sparc' 'armel'
 
+msgtest 'Check that dpkg supports' 'arch-specific dependencies'
+set +e
+# this fails always, the question is just how it fails
+dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null 2>/dev/null >/dev/null
+RETURNCODE=$?
+set -e
+if [ "$RETURNCODE" != '1' ]; then
+       dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null || true
+       echo "Command had returncode: $RETURNCODE"
+       msgskip
+       exit 0
+else
+       msgpass
+fi
+
 buildsimplenativepackage 'libc6' 'amd64,sparc,armel' '1' 'stable' 'Multi-Arch: same'
 buildsimplenativepackage 'libc6-i386' 'amd64' '1' 'stable' 'Conflicts: libc6:sparc'