diff options
Diffstat (limited to 'test/integration')
17 files changed, 385 insertions, 57 deletions
diff --git a/test/integration/Packages-pdiff-usage-new b/test/integration/Packages-pdiff-usage-new index 9157596a7..4f374b37f 100644 --- a/test/integration/Packages-pdiff-usage-new +++ b/test/integration/Packages-pdiff-usage-new @@ -1,16 +1,3 @@ -Package: newstuff -Version: 1.0 -Architecture: i386 -Maintainer: Joe Sixpack <joe@example.org> -Installed-Size: 101 -Filename: pool/newstuff_1.0_i386.deb -Size: 101100 -MD5sum: 311aeeadf78324aaff1ceaf3e1f76671 -SHA1: 3c695e028f7a1ae324deeddaaa1242desa81088c -SHA256: b46fd154615edefab321cc56a5cc0e7deaef23e2da3e4f129727fd660f28f050 -Description: some cool and shiny new stuff - This package will appear in the next mirror update - Package: apt Priority: important Section: admin @@ -35,3 +22,16 @@ Description: Advanced front-end for dpkg . APT features complete installation ordering, multiple source capability and several other unique features, see the Users Guide in apt-doc. + +Package: newstuff +Version: 1.0 +Architecture: i386 +Maintainer: Joe Sixpack <joe@example.org> +Installed-Size: 101 +Filename: pool/newstuff_1.0_i386.deb +Size: 101100 +MD5sum: 311aeeadf78324aaff1ceaf3e1f76671 +SHA1: 3c695e028f7a1ae324deeddaaa1242desa81088c +SHA256: b46fd154615edefab321cc56a5cc0e7deaef23e2da3e4f129727fd660f28f050 +Description: some cool and shiny new stuff + This package will appear in the next mirror update diff --git a/test/integration/framework b/test/integration/framework index a2e71760e..2ea1844f0 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -102,7 +102,7 @@ aptitude() { addtrap() { CURRENTTRAP="$CURRENTTRAP $1" - trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + trap "$CURRENTTRAP exit;" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM } setupenvironment() { @@ -149,6 +149,7 @@ setupenvironment() { echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf + echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf echo 'quiet::NoUpdate "true";' >> aptconfig.conf export LC_ALL=C @@ -156,13 +157,26 @@ setupenvironment() { msgdone "info" } +getarchitecture() { + if [ "$1" = "native" -o -z "$1" ]; then + eval `aptconfig shell ARCH APT::Architecture` + if [ -n "$ARCH" ]; then + echo $ARCH + else + dpkg-architecture -qDEB_BUILD_ARCH + fi + else + echo $1 + fi +} + configarchitecture() { local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf rm -f $CONFFILE - echo "APT::Architecture \"$1\";" > $CONFFILE + echo "APT::Architecture \"$(getarchitecture $1)\";" > $CONFFILE shift while [ -n "$1" ]; do - echo "APT::Architectures:: \"$1\";" >> $CONFFILE + echo "APT::Architectures:: \"$(getarchitecture $1)\";" >> $CONFFILE shift done } @@ -275,7 +289,7 @@ Package: $NAME" > ${BUILDDIR}/debian/control echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist done - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do rm -rf ${BUILDDIR}/debian/tmp mkdir -p ${BUILDDIR}/debian/tmp/DEBIAN ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} ${BUILDDIR}/debian/tmp/usr/bin cp ${BUILDDIR}/debian/copyright ${BUILDDIR}/debian/changelog ${BUILDDIR}/FEATURES ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} @@ -298,6 +312,7 @@ buildpackage() { local BUILDDIR=$1 local RELEASE=$2 local SECTION=$3 + local ARCH=$(getarchitecture $4) msgninfo "Build package $(echo "$BUILDDIR" | grep -o '[^/]*$') for ${RELEASE} in ${SECTION}… " cd $BUILDDIR if [ "$ARCH" = "all" ]; then @@ -408,7 +423,7 @@ insertpackage() { local DEPENDENCIES="$5" local PRIORITY="${6:-optional}" local ARCHS="" - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do if [ "$arch" = "all" ]; then ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" else @@ -465,7 +480,7 @@ insertinstalledpackage() { local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" local FILE="rootdir/var/lib/dpkg/status" - for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g' | sed -e "s#^native\$#$(getarchitecture 'native')#"); do echo "Package: $NAME Status: install ok installed Priority: $PRIORITY @@ -715,8 +730,7 @@ N: Can't select versions from package '$1' as it is purely virtual" N: No packages found" local COMPAREFILE=$(mktemp) addtrap "rm $COMPAREFILE;" - local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH_CPU) - eval `apt-config shell ARCH APT::Architecture` + local ARCH="$(getarchitecture 'native')" echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' > $COMPAREFILE aptcache show -q=0 $PACKAGE 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail } diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download index 7db93c32f..4edb7c173 100755 --- a/test/integration/test-apt-get-download +++ b/test/integration/test-apt-get-download @@ -13,13 +13,12 @@ buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' setupaptarchive testdownload() { - msgtest 'Test download of package file' $1 - if [ -z "$3" ]; then - aptget download ${2} - else - aptget download ${2}/${3} + local APT="$2" + if [ -n "$3" ]; then + APT="${APT}/${3}" fi - test -f $1 && msgpass || msgfail + msgtest "Test download of package file $1 with" "$APT" + aptget -qq download ${APT} && test -f $1 && msgpass || msgfail } testdownload apt_1.0_all.deb apt stable diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages index 3e2693f85..e0dd7737f 100755 --- a/test/integration/test-bug-590041-prefer-non-virtual-packages +++ b/test/integration/test-bug-590041-prefer-non-virtual-packages @@ -3,7 +3,7 @@ set -e . $(readlink -f $(dirname $0))/framework setupenvironment -configarchitecture "i386" "armel" +configarchitecture 'i386' 'armel' pkglibc6="Package: libc6 Architecture: armel diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index 5c103da6f..bb1ac0e54 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -13,7 +13,7 @@ setupflataptarchive testaptgetupdate() { rm -rf rootdir/var/lib/apt aptget update 2>> testaptgetupdate.diff >> testaptgetupdate.diff || true - sed -i -e '/^Fetched / d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff + sed -i -e '/^Fetched / d' -e '/Ign / d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff GIVEN="$1" shift msgtest "Test for correctness of" "apt-get update with $*" @@ -78,7 +78,6 @@ testoverfile() { createemptyfile 'en' testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Reading package lists..." "empty file en.$COMPRESS over file" createemptyarchive 'en' @@ -89,12 +88,10 @@ Reading package lists..." "empty archive en.$COMPRESS over file" # FIXME: Why omits the file transport the Packages Get line? #Get:3 file: Packages [] testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Reading package lists..." "empty archive Packages.$COMPRESS over file" createemptyfile 'Packages' testaptgetupdate "Get:1 file: InRelease [] -Ign file: Translation-en Err file: Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:$(readlink -f aptarchive/Packages.$COMPRESS) Empty files can't be valid archives @@ -109,7 +106,6 @@ testoverhttp() { testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages [] Get:3 http://localhost Translation-en -Ign http://localhost Translation-en Reading package lists..." "empty file en.$COMPRESS over http" createemptyarchive 'en' @@ -121,14 +117,12 @@ Reading package lists..." "empty archive en.$COMPRESS over http" createemptyarchive 'Packages' testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages [] -Ign http://localhost Translation-en Reading package lists..." "empty archive Packages.$COMPRESS over http" createemptyfile 'Packages' #FIXME: we should response with a good error message instead testaptgetupdate "Get:1 http://localhost InRelease [] Get:2 http://localhost Packages -Ign http://localhost Translation-en Err http://localhost Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages) Empty files can't be valid archives diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo new file mode 100755 index 000000000..6ebc4a3bb --- /dev/null +++ b/test/integration/test-bug-596498-trusted-unsigned-repo @@ -0,0 +1,47 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable' + +setupaptarchive + +aptgetupdate() { + rm -rf rootdir/var/lib/apt/ rootdir/var/cache/apt/*.bin + aptget update -qq +} + +PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)" +DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list' + +testequal "$PKGTEXT +Download complete and in download only mode" aptget install cool --assume-no -d + +sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +WARNING: The following packages cannot be authenticated! + cool +Install these packages without verification [y/N]? N +E: Some packages could not be authenticated" aptget install cool --assume-no -d + +find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete +sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +WARNING: The following packages cannot be authenticated! + cool +Install these packages without verification [y/N]? N +E: Some packages could not be authenticated" aptget install cool --assume-no -d + +sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE +aptgetupdate + +testequal "$PKGTEXT +Download complete and in download only mode" aptget install cool --assume-no -d diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation index 44ab91900..03fddbfda 100755 --- a/test/integration/test-bug-601016-description-translation +++ b/test/integration/test-bug-601016-description-translation @@ -4,7 +4,7 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +configarchitecture 'i386' 'amd64' # we need a valid locale here, otherwise the language configuration # will be overridden by LC_ALL=C @@ -22,8 +22,22 @@ Size: 2140230 MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08 Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c" +PACKAGESTANZA2='Package: apt +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team <deity@lists.debian.org> +Architecture: amd64 +Version: 0.8.7 +Filename: pool/main/a/apt/apt_0.8.7_amd64.deb +Size: 2210342 +MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c' echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 Description: Advanced front-end for dpkg" > aptarchive/Packages echo "Package: apt @@ -53,6 +67,13 @@ Description-${LOCALE}: Mächtige Oberfläche für dpkg APT-Dselect-Methode. Beides sind einfache und sicherere Wege, um Pakete zu installieren und Upgrades durchzuführen. " +LOCALESTANZA2="$PACKAGESTANZA2 +Description-${LOCALE}: Mächtige Oberfläche für dpkg + Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff + auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die + APT-Dselect-Methode. Beides sind einfache und sicherere Wege, + um Pakete zu installieren und Upgrades durchzuführen. +" testrun() { echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages @@ -60,6 +81,8 @@ testrun() { rm -rf rootdir/var/lib/apt/lists setupaptarchive testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE} + testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE} + testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE} testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE} LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE} @@ -73,6 +96,9 @@ testrun() { testrun echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 Description: Advanced front-end for dpkg" > aptarchive/Packages echo "Package: apt @@ -88,5 +114,11 @@ Description-en: Advanced front-end for dpkg It provides the apt-get utility and APT dselect method that provides a simpler, safer way to install and upgrade packages. " +ENGLISHSTANZA2="$PACKAGESTANZA2 +Description-en: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. +" testrun diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index b8cfe59e2..dd9efb785 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -4,9 +4,7 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" "amd64" - -buildsimplenativepackage 'peace-dpkg' 'all' '1.0' 'stable' +configarchitecture 'i386' 'amd64' buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable' buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable' @@ -17,9 +15,6 @@ buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' setupaptarchive -aptget install peace-dpkg:i386 -y -qq 2>&1 > /dev/null -testdpkginstalled peace-dpkg - aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null testdpkginstalled libc6 testequal 'Reading package lists... diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep index a05f03df4..7333054cc 100755 --- a/test/integration/test-bug-618288-multiarch-same-lockstep +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -17,7 +17,8 @@ buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' setupaptarchive -testequal 'Reading package lists... +# order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together +testequalor2 'Reading package lists... Building dependency tree... The following packages will be upgraded: apt:i386 apt2 libsame libsame:i386 @@ -29,4 +30,16 @@ Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] Conf apt2 (2 unstable [amd64]) [apt:i386 ] Inst apt:i386 [1] (2 unstable [i386]) +Conf apt:i386 (2 unstable [i386])' 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + apt:i386 apt2 libsame libsame:i386 +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst libsame [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ] +Inst libsame:i386 [1] (2 unstable [i386]) [apt2:amd64 apt:i386 ] +Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] +Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] +Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] +Conf apt2 (2 unstable [amd64]) [apt:i386 ] +Inst apt:i386 [1] (2 unstable [i386]) Conf apt:i386 (2 unstable [i386])' aptget dist-upgrade -s diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop new file mode 100755 index 000000000..7b5724d74 --- /dev/null +++ b/test/integration/test-conflicts-loop @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'openjdk-6-jre' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre-headless (<< 6b17~pre3-1), openjdk-6-jre-lib (<< 6b17~pre3-1)' +insertinstalledpackage 'openjdk-6-jre-lib' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre-lib' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jre-headless (<< 6b17~pre3-1)' +insertinstalledpackage 'openjdk-6-jre-headless' 'i386' '6b16-1.8-0ubuntu1' +insertpackage 'unstable' 'openjdk-6-jre-headless' 'i386' '6b20-1.9.8-0ubuntu1~10.04.1' 'Conflicts: openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jre-lib (<< 6b17~pre3-1)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib +3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. + openjdk-6-jre-lib conflicts with openjdk-6-jre + openjdk-6-jre conflicts with openjdk-6-jre-headless + openjdk-6-jre-headless conflicts with openjdk-6-jre +Remv openjdk-6-jre [6b16-1.8-0ubuntu1] + openjdk-6-jre-headless conflicts with openjdk-6-jre-lib +Remv openjdk-6-jre-lib [6b16-1.8-0ubuntu1] +Inst openjdk-6-jre-headless [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) + openjdk-6-jre conflicts with openjdk-6-jre-lib +Inst openjdk-6-jre [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Inst openjdk-6-jre-lib [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre-lib (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386]) +Conf openjdk-6-jre-headless (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])' aptget dist-upgrade -s -o APT::Immediate-Configure-All=true diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index 82ba9e592..0e0e9618d 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -4,12 +4,12 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture "i386" +configarchitecture 'native' -buildsimplenativepackage "old-pkg" "i386" "1.0" "stable" +buildsimplenativepackage "old-pkg" "native" "1.0" "stable" buildsimplenativepackage "unrelated" "all" "0.5" "unstable" -setupsimplenativepackage "new-pkg" "i386" "2.0" "unstable" "Provides: old-pkg +setupsimplenativepackage "new-pkg" "native" "2.0" "unstable" "Provides: old-pkg Replaces: old-pkg Conflicts: old-pkg (<< 2.0)" BUILDDIR="incoming/new-pkg-2.0" @@ -43,12 +43,12 @@ Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE $CMD 2>&1 | tail -n 4 | diff $COMPAREFILE - && msgpass || msgfail rm $COMPAREFILE -sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' +sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e "s#:$(getarchitecture 'native') #:native #" testfileequal "rootdir/var/log/apt/history.log" " -Install: old-pkg:i386 (1.0) +Install: old-pkg:native (1.0) -Install: new-pkg:i386 (2.0, automatic) -Upgrade: old-pkg:i386 (1.0, 2.0) +Install: new-pkg:native (2.0, automatic) +Upgrade: old-pkg:native (1.0, 2.0) Disappeared: old-pkg (1.0)" testmarkedauto # new-pkg should have get the manual flag from old-pkg diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups index d88ad0000..20b314074 100755 --- a/test/integration/test-handling-broken-orgroups +++ b/test/integration/test-handling-broken-orgroups @@ -58,7 +58,7 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: coolstuff-broken : Depends: cool2 but it is not installable or stuff2 but it is not installable -E: Broken packages' aptget install coolstuff-broken -s +E: Unable to correct problems, you have held broken packages.' aptget install coolstuff-broken -s testequal 'Reading package lists... Building dependency tree... @@ -105,4 +105,4 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: coolstuff-provided-broken : Depends: cool2 but it is not installable or stuff-abi-2 -E: Broken packages' aptget install coolstuff-provided-broken -s +E: Unable to correct problems, you have held broken packages.' aptget install coolstuff-provided-broken -s diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign new file mode 100755 index 000000000..332466d96 --- /dev/null +++ b/test/integration/test-multiarch-foreign @@ -0,0 +1,150 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' 'armel' + +insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo' +insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign' + +insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider' +insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider +Multi-Arch: foreign' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + cool-foo:i386 foo +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1.0 unstable [amd64]) +Inst cool-foo:i386 (1.0 unstable [i386]) +Conf foo (1.0 unstable [amd64]) +Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + cool-foo foo +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1.0 unstable [amd64]) +Inst cool-foo (1.0 unstable [amd64]) +Conf foo (1.0 unstable [amd64]) +Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + cool-foo foo +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst foo (1.0 unstable [amd64]) +Inst cool-foo (1.0 unstable [amd64]) +Conf foo (1.0 unstable [amd64]) +Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + cool-foo foo:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst foo:i386 (1.0 unstable [i386]) +Inst cool-foo (1.0 unstable [amd64]) +Conf foo:i386 (1.0 unstable [i386]) +Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + cool-foo foo:armel +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst foo:armel (1.0 unstable [armel]) +Inst cool-foo (1.0 unstable [amd64]) +Conf foo:armel (1.0 unstable [armel]) +Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s + + + + + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + bar +The following NEW packages will be installed: + bar cool-bar:i386 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar (1.0 unstable [amd64]) +Inst cool-bar:i386 (1.0 unstable [i386]) +Conf bar (1.0 unstable [amd64]) +Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + bar +The following NEW packages will be installed: + bar cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar (1.0 unstable [amd64]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar (1.0 unstable [amd64]) +Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + bar cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar (1.0 unstable [amd64]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar (1.0 unstable [amd64]) +Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + bar:i386 cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar:i386 (1.0 unstable [i386]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar:i386 (1.0 unstable [i386]) +Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + bar:armel cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar:armel (1.0 unstable [armel]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar:armel (1.0 unstable [armel]) +Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'bar' instead of 'bar-provider' +The following NEW packages will be installed: + bar cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar (1.0 unstable [amd64]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar (1.0 unstable [amd64]) +Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0 + +testequal "Reading package lists... +Building dependency tree... +Note, selecting 'bar:i386' instead of 'bar-provider:i386' +The following NEW packages will be installed: + bar:i386 cool-bar +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst bar:i386 (1.0 unstable [i386]) +Inst cool-bar (1.0 unstable [amd64]) +Conf bar:i386 (1.0 unstable [i386]) +Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s -q=0 diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation new file mode 100755 index 000000000..b4f2061ec --- /dev/null +++ b/test/integration/test-package-reinstallation @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'libc-bin' 'i386' '2.13-8' 'Replaces: libc6' +insertpackage 'unstable' 'libc-bin' 'i386' '2.13-8' 'Replaces: libc6' +insertinstalledpackage 'libc6' 'i386' '2.13-8' 'Depends: libc-bin (= 2.13-8)' +insertpackage 'unstable' 'libc6' 'i386' '2.13-8' 'Depends: libc-bin (= 2.13-8)' +insertinstalledpackage 'apt' 'i386' '0.8.15' 'Depends: libc6' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. +Inst libc-bin [2.13-8] (2.13-8 unstable [i386]) +Conf libc-bin (2.13-8 unstable [i386]) +Inst libc6 [2.13-8] (2.13-8 unstable [i386]) +Conf libc6 (2.13-8 unstable [i386])' aptget install --reinstall libc6 libc-bin -s diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade new file mode 100755 index 000000000..70384ce29 --- /dev/null +++ b/test/integration/test-provides-gone-with-upgrade @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertinstalledpackage 'apt' 'i386' '0.8.14' 'Provides: libapt-pkg4.10' +insertpackage 'unstable' 'apt' 'i386' '0.8.15' 'Depends: libapt-pkg4.10' +insertpackage 'unstable' 'libapt-pkg4.10' 'i386' '0.8.15' 'Breaks: apt (<< 0.8.15) +Replaces: apt (<< 0.8.15)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + libapt-pkg4.10 +The following packages will be upgraded: + apt +1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt [0.8.14] (0.8.15 unstable [i386]) [] +Inst libapt-pkg4.10 (0.8.15 unstable [i386]) +Conf libapt-pkg4.10 (0.8.15 unstable [i386]) +Conf apt (0.8.15 unstable [i386])' aptget dist-upgrade -s diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index b6dbe99db..0970cb935 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -416,4 +416,4 @@ The following information may help to resolve the situation: The following packages have unmet dependencies: uninstallablepkg : Depends: libmtp8 (>= 10:0.20.1) but it is not going to be installed Depends: amarok-utils (= 2.3.2-2+exp) but 2.3.1-1+sid is to be installed -E: Broken packages" aptget install uninstallablepkg/experimental --trivial-only -V -q=0 +E: Unable to correct problems, you have held broken packages." aptget install uninstallablepkg/experimental --trivial-only -V -q=0 diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge index 93b67fc02..f55c6e909 100755 --- a/test/integration/test-ubuntu-bug-761175-remove-purge +++ b/test/integration/test-ubuntu-bug-761175-remove-purge @@ -4,14 +4,14 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture 'i386' +configarchitecture 'native' -setupsimplenativepackage 'compiz-core' 'i386' '1.0' 'unstable' +setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable' BUILDDIR='incoming/compiz-core-1.0' mkdir -p ${BUILDDIR}/debian/compiz-core/etc echo 'foo=bar;' > ${BUILDDIR}/compiz.conf echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install -buildpackage "$BUILDDIR" 'unstable' 'main' +buildpackage "$BUILDDIR" 'unstable' 'main' 'native' rm -rf "$BUILDDIR" setupaptarchive @@ -27,7 +27,7 @@ aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail testdpkgnotinstalled compiz-core msgtest 'Check that conffiles are still around for' 'compiz-core' -dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail +dpkg -l compiz-core | grep -q '^rc' && msgpass || msgfail testequal 'Reading package lists... Building dependency tree... |