summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/Packages-bug-64141-install-dependencies-for-on-hold42
-rw-r--r--test/integration/Packages-pdiff-usage-new26
-rw-r--r--test/integration/framework109
-rwxr-xr-xtest/integration/skip-avoid-avoiding-breaks-predepends21
-rw-r--r--test/integration/status-bug-64141-install-dependencies-for-on-hold33
-rwxr-xr-xtest/integration/test-apt-get-download11
-rwxr-xr-xtest/integration/test-bug-549968-install-depends-of-not-installed6
-rwxr-xr-xtest/integration/test-bug-590041-prefer-non-virtual-packages2
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files20
-rwxr-xr-xtest/integration/test-bug-596498-trusted-unsigned-repo47
-rwxr-xr-xtest/integration/test-bug-601016-description-translation34
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove4
-rwxr-xr-xtest/integration/test-bug-612099-multiarch-conflicts30
-rwxr-xr-xtest/integration/test-bug-612958-use-dpkg-multiarch-config18
-rwxr-xr-xtest/integration/test-bug-613420-new-garbage-dependency2
-rwxr-xr-xtest/integration/test-bug-618288-multiarch-same-lockstep31
-rwxr-xr-xtest/integration/test-bug-624218-Translation-file-handling9
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction87
-rwxr-xr-xtest/integration/test-bug-64141-install-dependencies-for-on-hold20
-rwxr-xr-xtest/integration/test-bug-657695-resolver-breaks-on-virtuals51
-rwxr-xr-xtest/integration/test-conflicts-loop36
-rwxr-xr-xtest/integration/test-disappearing-packages16
-rwxr-xr-xtest/integration/test-dpkg-assert-multi-arch97
-rwxr-xr-xtest/integration/test-handling-broken-orgroups4
-rwxr-xr-xtest/integration/test-hashsum-verification2
-rwxr-xr-xtest/integration/test-implicit-conflicts-real-not-virtual56
-rwxr-xr-xtest/integration/test-multiarch-foreign150
-rwxr-xr-xtest/integration/test-ordering-ignore-not-matching-breaks56
-rwxr-xr-xtest/integration/test-package-reinstallation23
-rwxr-xr-xtest/integration/test-pdiff-usage2
-rwxr-xr-xtest/integration/test-pin-non-existent-package20
-rwxr-xr-xtest/integration/test-provides-gone-with-upgrade26
-rwxr-xr-xtest/integration/test-release-candidate-switching2
-rwxr-xr-xtest/integration/test-releasefile-verification2
-rwxr-xr-xtest/integration/test-suggest-installed-multiarch-silbing80
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge8
-rwxr-xr-xtest/integration/test-ubuntu-bug-859188-multiarch-reinstall28
37 files changed, 979 insertions, 232 deletions
diff --git a/test/integration/Packages-bug-64141-install-dependencies-for-on-hold b/test/integration/Packages-bug-64141-install-dependencies-for-on-hold
deleted file mode 100644
index 7005fa4f4..000000000
--- a/test/integration/Packages-bug-64141-install-dependencies-for-on-hold
+++ /dev/null
@@ -1,42 +0,0 @@
-Package: apt
-Priority: important
-Section: admin
-Installed-Size: 6048
-Maintainer: APT Development Team <deity@lists.debian.org>
-Architecture: i386
-Version: 0.8.10
-Provides: libapt-pkg4.10
-Depends: libc6 (>= 2.10), libdb4.8
-Breaks: oldcrap
-Filename: pool/main/a/apt/apt_0.8.10_i386.deb
-Size: 2160758
-MD5sum: 5aa2234f7b91056d430669cddf6e6e50
-Description: Advanced front-end for dpkg
-
-Package: libc6
-Priority: required
-Section: libs
-Installed-Size: 9356
-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
-Architecture: i386
-Source: eglibc
-Version: 2.11.2-7
-Provides: glibc-2.11-1
-Filename: pool/main/e/eglibc/libc6_2.11.2-7_i386.deb
-Size: 3880868
-MD5sum: c48fd2854fc62125824267d086600793
-Description: Embedded GNU C Library: Shared libraries
-
-Package: libdb4.8
-Priority: standard
-Section: libs
-Installed-Size: 1488
-Maintainer: Clint Adams <clint@gnu.org>
-Architecture: i386
-Source: db4.8
-Version: 4.8.30-3
-Depends: libc6 (>= 2.3.6-6~)
-Filename: pool/main/d/db4.8/libdb4.8_4.8.30-3_i386.deb
-Size: 681988
-MD5sum: 0d58c15898a95436d2ec480aa22693ff
-Description: Berkeley v4.8 Database Libraries [runtime]
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..0670d6a78 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -25,7 +25,15 @@ msgnwarn() { echo -n "${CWARNING}W: $1${CNORMAL}" >&2; }
msgnmsg() { echo -n "${CMSG}$1${CNORMAL}" >&2; }
msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}" >&2; }
msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}" >&2; }
-msgtest() { echo -n "${CINFO}$1 ${CCMD}$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} …${CNORMAL} " >&2; }
+msgtest() {
+ while [ -n "$1" ]; do
+ echo -n "${CINFO}$1${CCMD} " >&2;
+ echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " >&2;
+ shift
+ if [ -n "$1" ]; then shift; else break; fi
+ done
+ echo -n "…${CNORMAL} " >&2;
+}
msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; }
msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; }
msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; }
@@ -102,14 +110,14 @@ 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() {
TMPWORKINGDIRECTORY=$(mktemp -d)
- local TESTDIR=$(readlink -f $(dirname $0))
+ TESTDIRECTORY=$(readlink -f $(dirname $0))
msgninfo "Preparing environment for ${CCMD}$(basename $0)${CINFO} in ${TMPWORKINGDIRECTORY}… "
- BUILDDIRECTORY="${TESTDIR}/../../build/bin"
+ BUILDDIRECTORY="${TESTDIRECTORY}/../../build/bin"
test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first"
local OLDWORKINGDIRECTORY=$(pwd)
addtrap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY;"
@@ -119,25 +127,19 @@ setupenvironment() {
mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d
mkdir -p var/cache var/lib var/log
mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers
- local STATUSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/status-/' -e 's/^skip-/status-/')
- if [ -f "${TESTDIR}/${STATUSFILE}" ]; then
- cp "${TESTDIR}/${STATUSFILE}" var/lib/dpkg/status
- else
- touch var/lib/dpkg/status
- fi
touch var/lib/dpkg/available
mkdir -p usr/lib/apt
ln -s ${BUILDDIRECTORY}/methods usr/lib/apt/methods
cd ..
local PACKAGESFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Packages-/' -e 's/^skip-/Packages-/')
- if [ -f "${TESTDIR}/${PACKAGESFILE}" ]; then
- cp "${TESTDIR}/${PACKAGESFILE}" aptarchive/Packages
+ if [ -f "${TESTDIRECTORY}/${PACKAGESFILE}" ]; then
+ cp "${TESTDIRECTORY}/${PACKAGESFILE}" aptarchive/Packages
fi
local SOURCESSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Sources-/' -e 's/^skip-/Sources-/')
- if [ -f "${TESTDIR}/${SOURCESSFILE}" ]; then
- cp "${TESTDIR}/${SOURCESSFILE}" aptarchive/Sources
+ if [ -f "${TESTDIRECTORY}/${SOURCESSFILE}" ]; then
+ cp "${TESTDIRECTORY}/${SOURCESSFILE}" aptarchive/Sources
fi
- cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/
+ cp $(find $TESTDIRECTORY -name '*.pub' -o -name '*.sec') keys/
ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf
@@ -149,6 +151,9 @@ 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
+ if ! $(which dpkg) --assert-multi-arch; then
+ echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
+ fi
echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
echo 'quiet::NoUpdate "true";' >> aptconfig.conf
export LC_ALL=C
@@ -156,15 +161,58 @@ 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 --print-architecture
+ fi
+ else
+ echo $1
+ fi
+}
+
+getarchitectures() {
+ echo "$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
+}
+
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
+ configdpkg
+}
+
+configdpkg() {
+ if [ ! -e rootdir/var/lib/dpkg/status ]; then
+ local STATUSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/status-/' -e 's/^skip-/status-/')
+ if [ -f "${TESTDIRECTORY}/${STATUSFILE}" ]; then
+ cp "${TESTDIRECTORY}/${STATUSFILE}" rootdir/var/lib/dpkg/status
+ else
+ echo -n > rootdir/var/lib/dpkg/status
+ fi
+ fi
+ if $(which dpkg) --assert-multi-arch; then
+ local ARCHS="$(getarchitectures)"
+ if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
+ DPKGARCH="$(dpkg --print-architecture)"
+ for ARCH in ${ARCHS}; do
+ if [ "${ARCH}" != "${DPKGARCH}" ]; then dpkg --add-architecture ${ARCH}; fi
+ done
+ if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
+ # dpkg doesn't really check the version as long as it is fully installed,
+ # but just to be sure we choose one above the required version
+ insertinstalledpackage 'dpkg' "all" '1.16.2+fake'
+ fi
+ fi
+ fi
}
setupsimplenativepackage() {
@@ -275,7 +323,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 +346,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
@@ -328,7 +377,7 @@ createaptftparchiveconfig() {
local ARCHS="$(find pool/ -name '*.deb' | grep -oE '_[a-z0-9-]+\.deb$' | sort | uniq | sed -e '/^_all.deb$/ d' -e 's#^_\([a-z0-9-]*\)\.deb$#\1#' | tr '\n' ' ')"
if [ -z "$ARCHS" ]; then
# the pool is empty, so we will operate on faked packages - let us use the configured archs
- ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
+ ARCHS="$(getarchitectures)"
fi
echo -n 'Dir {
ArchiveDir "' >> ftparchive.conf
@@ -408,9 +457,9 @@ 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' ' ')"
+ ARCHS="$(getarchitectures)"
else
ARCHS="$arch"
fi
@@ -464,8 +513,9 @@ insertinstalledpackage() {
local VERSION="$3"
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
+ local FILE='rootdir/var/lib/dpkg/status'
+ local INFO='rootdir/var/lib/dpkg/info'
+ 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
@@ -480,6 +530,11 @@ Version: $VERSION" >> $FILE
YOU did something horribly wrong! They are autogenerated
und used only by testcases for APT and surf no other propose…
" >> $FILE
+ if [ "$(dpkg-query -W --showformat='${Multi-Arch}')" = 'same' ]; then
+ echo -n > ${INFO}/${NAME}:${arch}.list
+ else
+ echo -n > ${INFO}/${NAME}.list
+ fi
done
}
@@ -503,7 +558,7 @@ buildaptarchivefromfiles() {
msgninfo "\t${line} file… "
cat ${line} | gzip > ${line}.gz
cat ${line} | bzip2 > ${line}.bz2
- cat ${line} | lzma > ${line}.lzma
+ cat ${line} | xz --format=lzma > ${line}.lzma
cat ${line} | xz > ${line}.xz
msgdone "info"
done
@@ -520,9 +575,6 @@ generatereleasefiles() {
# both should be given in notation date/touch can understand
msgninfo "\tGenerate Release files… "
if [ -e aptarchive/dists ]; then
- for dir in $(find ./aptarchive/dists -mindepth 3 -maxdepth 3 -type d -name 'i18n'); do
- aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
- done
for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
local CODENAME="$(getcodenamefromsuite $SUITE)"
@@ -715,8 +767,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/skip-avoid-avoiding-breaks-predepends b/test/integration/skip-avoid-avoiding-breaks-predepends
new file mode 100755
index 000000000..a47e8bc2b
--- /dev/null
+++ b/test/integration/skip-avoid-avoiding-breaks-predepends
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+insertinstalledpackage 'looping' 'native' '1'
+insertinstalledpackage 'loop1' 'native' '1' 'Depends: loop2 (= 1)'
+insertinstalledpackage 'loop2' 'native' '1' 'Depends: loop1 (= 1)'
+
+buildsimplenativepackage 'looping' 'native' '1.15.7.2' 'stable' 'Breaks: loop2 (<= 1)'
+buildsimplenativepackage 'loop1' 'native' '2' 'stable' 'Depends: loop2 (= 2)'
+buildsimplenativepackage 'loop2' 'native' '2' 'stable' 'Depends: loop1 (= 2)
+Pre-Depends: looping (>= 1.15)'
+
+setupaptarchive
+
+aptget dist-upgrade -y -o Debug::pkgOrderList=1 #-qq 2>&1 > /dev/null
+testdpkginstalled looping loop1 loop2
diff --git a/test/integration/status-bug-64141-install-dependencies-for-on-hold b/test/integration/status-bug-64141-install-dependencies-for-on-hold
deleted file mode 100644
index c82ebd19c..000000000
--- a/test/integration/status-bug-64141-install-dependencies-for-on-hold
+++ /dev/null
@@ -1,33 +0,0 @@
-Package: apt
-Status: install ok installed
-Priority: important
-Section: admin
-Installed-Size: 6048
-Maintainer: APT Development Team <deity@lists.debian.org>
-Architecture: i386
-Version: 0.8.9
-Provides: libapt-pkg4.10
-Depends: libc6 (>= 2.3.4)
-Description: Advanced front-end for dpkg
-
-Package: libc6
-Status: install ok installed
-Priority: required
-Section: libs
-Installed-Size: 9356
-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
-Architecture: i386
-Source: eglibc
-Version: 2.3.5-7
-Provides: glibc-2.11-1
-Description: Embedded GNU C Library: Shared libraries
-
-Package: oldcrap
-Status: install ok installed
-Priority: extra
-Section: oldlibs
-Installed-Size: 1
-Maintainer: Joe Sixpack <joe@example.org>
-Architecture: all
-Version: 1-1
-Description: Old crappy nothing package
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-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed
index 78c0801f2..8c434b3ce 100755
--- a/test/integration/test-bug-549968-install-depends-of-not-installed
+++ b/test/integration/test-bug-549968-install-depends-of-not-installed
@@ -14,13 +14,13 @@ setupaptarchive
# We check the Markers here as the autoremove nuker will also
# prevent it, but to late - its better to fail earlier
-testequal 'Reading package lists...
+testequal "Reading package lists...
Building dependency tree...
MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1
Ignore MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) as its mode (Keep) is protected
-Package extracoolstuff is not installed, so not removed
+Package 'extracoolstuff' is not installed, so not removed
The following NEW packages will be installed:
coolstuff
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst coolstuff (1.0 unstable [all])
-Conf coolstuff (1.0 unstable [all])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s
+Conf coolstuff (1.0 unstable [all])" aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s
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..63883b380 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 $*"
@@ -28,10 +28,10 @@ testaptgetupdate() {
createemptyarchive() {
find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
if [ "en" = "$1" ]; then
- echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS
+ echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
fi
touch aptarchive/Packages
- echo -n "" | $COMPRESSOR > aptarchive/${1}.$COMPRESS
+ echo -n "" | $COMPRESSOR_CMD > aptarchive/${1}.$COMPRESS
generatereleasefiles
signreleasefiles
rm -f aptarchive/Packages
@@ -40,7 +40,7 @@ createemptyarchive() {
createemptyfile() {
find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
if [ "en" = "$1" ]; then
- echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS
+ echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
fi
touch aptarchive/Packages aptarchive/${1}.$COMPRESS
generatereleasefiles
@@ -50,6 +50,7 @@ createemptyfile() {
setupcompressor() {
COMPRESSOR="$1"
+ COMPRESSOR_CMD="$1"
case $COMPRESSOR in
gzip) COMPRESS="gz";;
bzip2) COMPRESS="bz2";;
@@ -66,10 +67,13 @@ Dir::Bin::xz \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor
echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor
elif [ -e "/usr/bin/${COMPRESSOR}" ]; then
echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor
+ elif [ "${COMPRESSOR}" = 'lzma' ]; then
+ echo "Dir::Bin::xz \"/usr/bin/xz\";" >> rootdir/etc/apt/apt.conf.d/00compressor
+ COMPRESSOR_CMD='xz --format=lzma'
else
msgtest "Test for availability of compressor" "${COMPRESSOR}"
msgfail
- exit 1
+ #exit 1
fi
}
@@ -78,7 +82,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 +92,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 +110,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 +121,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-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index 2875d547a..5820fb0dc 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -16,7 +16,7 @@ Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
libvtk5.4
-Use 'apt-get autoremove' to remove them.
+Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
libavcodec52
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
@@ -28,7 +28,7 @@ Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
libvtk5.4
-Use 'apt-get autoremove' to remove them.
+Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libavcodec52 libopenal-dev libvtk5.4
The following NEW packages will be installed:
diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts
index b8cfe59e2..530012e5d 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,11 +15,8 @@ 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
+testdpkginstalled libc6:i386
testequal 'Reading package lists...
Building dependency tree...
Reading state information...
@@ -80,8 +75,13 @@ The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6 [1.0] (2.0 testing [all])
Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s
-aptget upgrade -y -qq 2>&1 > /dev/null
-testdpkginstalled libc6
+# FIXME: on amd64 systems this test wouldn't run with a real upgrade
+# as APT (here i386) disagree about the native architecture, so
+# we fake it here:
+#aptget upgrade -y -qq 2>&1 > /dev/null
+aptget purge libc6 -y -qq 2>&1 >/dev/null
+aptget install libc6:i386 -y -qq 2>&1 >/dev/null
+testdpkginstalled libc6:all
testequal 'Reading package lists...
Building dependency tree...
@@ -130,7 +130,7 @@ buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-sa
setupaptarchive
aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null
-testdpkginstalled libc6-same
+testdpkginstalled libc6-same:i386
testequal 'Reading package lists...
Building dependency tree...
@@ -173,8 +173,14 @@ The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Inst libc6-same [1.0] (2.0 testing [all])
Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s
-aptget upgrade -y -qq 2>&1 > /dev/null
-testdpkginstalled libc6-same
+# FIXME: on amd64 systems this test wouldn't run with a real upgrade
+# as APT (here i386) disagree about the native architecture, so
+# we fake it here:
+#aptget upgrade -y -qq 2>&1 > /dev/null
+aptget purge libc6-same -y -qq 2>&1 >/dev/null
+aptget install libc6-same:i386 -y -qq 2>&1 >/dev/null
+testdpkginstalled libc6-same:all
+
testequal "Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config
index 4f31c3953..18b964636 100755
--- a/test/integration/test-bug-612958-use-dpkg-multiarch-config
+++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config
@@ -56,4 +56,22 @@ testfail 'dpkg config' 'armel'
echo '#! /bin/sh
echo "amd64 armel"' > ./dpkg-printer
+testpass 'dpkg config' 'i386'
+testpass 'dpkg config' 'amd64'
+testpass 'dpkg config' 'armel'
+
+echo '#! /bin/sh
+echo "amd64
+armel"' > ./dpkg-printer
+
+testpass 'dpkg config' 'i386'
+testpass 'dpkg config' 'amd64'
testpass 'dpkg config' 'armel'
+
+echo '#! /bin/sh
+echo "amd64
+i386"' > ./dpkg-printer
+
+testpass 'dpkg config' 'i386'
+testpass 'dpkg config' 'amd64'
+testfail 'dpkg config' 'armel'
diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency
index 34cf38cbc..7a08871ca 100755
--- a/test/integration/test-bug-613420-new-garbage-dependency
+++ b/test/integration/test-bug-613420-new-garbage-dependency
@@ -22,7 +22,7 @@ testequal "Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
- openoffice.org-officebean libreoffice-officebean
+ libreoffice-officebean openoffice.org-officebean
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libreoffice-core libreoffice-officebean openoffice.org-officebean
diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep
index a05f03df4..fde075172 100755
--- a/test/integration/test-bug-618288-multiarch-same-lockstep
+++ b/test/integration/test-bug-618288-multiarch-same-lockstep
@@ -16,17 +16,22 @@ buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' ''
buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required'
setupaptarchive
+aptget dist-upgrade -s 2>&1 > output.apt
-testequal '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:i386 [1] (2 unstable [i386]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:amd64 apt:i386 ]
-Inst libsame [1] (2 unstable [amd64]) [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
+# order in switch libsame:{amd64,i386} are unpacked is irrelevant, as both are installed - but we need to do it together
+LS_U_AMD="$(grep -o -n '^Inst libsame ' output.apt | cut -d: -f1)"
+LS_U_INT="$(grep -o -n '^Inst libsame:i386 ' output.apt | cut -d: -f1)"
+LS_C_AMD="$(grep -o -n '^Conf libsame ' output.apt | cut -d: -f1)"
+LS_C_INT="$(grep -o -n '^Conf libsame:i386 ' output.apt | cut -d: -f1)"
+
+msgtest 'Test if libsame:amd64 unpack before configure'
+test "$LS_U_AMD" -lt "$LS_C_AMD" && msgpass || msgfail
+
+msgtest 'Test if libsame:i386 unpack before configure'
+test "$LS_U_INT" -lt "$LS_C_INT" && msgpass || msgfail
+
+msgtest 'Test if libsame:amd64 unpack is before libsame:i386 configure'
+test "$LS_U_AMD" -lt "$LS_C_INT" && msgpass || msgfail
+
+msgtest 'Test if libsame:i386 unpack is before libsame:amd64 configure'
+test "$LS_U_INT" -lt "$LS_C_AMD" && msgpass || msgfail
diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling
index a1e708d2e..d146b943c 100755
--- a/test/integration/test-bug-624218-Translation-file-handling
+++ b/test/integration/test-bug-624218-Translation-file-handling
@@ -42,16 +42,9 @@ msgtest 'Download of nothing if none is forced' 'with Index'
aptget update -o Acquire::Languages=none | grep -q -e 'Translation' && msgfail || msgpass
rm -rf rootdir/var/lib/apt/lists
-sed -i '/i18n\/Index$/ d' $(find aptarchive -name 'Release')
+sed -i '/i18n\/Translation-.*$/ d' $(find aptarchive -name 'Release')
signreleasefiles
-# we have to try as not every archive includes the i18n Index in the Release file - if it has one at all
-msgtest 'Download no Translation- if forced language is non-existent' 'with not-announced Index'
-aptget update -o Acquire::Languages=ast_DE | grep -q -e 'Translation-' && msgfail || msgpass
-rm -rf rootdir/var/lib/apt/lists
-
-find aptarchive -name 'Index' -delete
-
msgtest 'Download of en as forced language' 'without Index'
aptget update -o Acquire::Languages=en | grep -q -e 'Translation-en ' && msgpass || msgfail
rm -rf rootdir/var/lib/apt/lists
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 4299f052f..30df48604 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -6,43 +6,51 @@ TESTDIR=$(readlink -f $(dirname $0))
setupenvironment
configarchitecture 'amd64' 'armel'
-insertinstalledpackage 'build-essential' 'all' '11.5'
+insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
-insertpackage 'unstable' 'doxygen' 'amd64,armel' '1.0'
+insertpackage 'unstable' 'doxygen' 'amd64,armel' '1.0' 'Multi-Arch: foreign'
insertpackage 'unstable' 'libc6' 'amd64,armel' '1.0' 'Multi-Arch: same'
insertpackage 'unstable' 'libc6-dev' 'amd64,armel' '1.0' 'Depends: libc6
Multi-Arch: same'
+insertpackage 'unstable' 'libfwibble1' 'amd64,armel' '1.0' 'Depends: libc6
+Multi-Arch: same'
+insertpackage 'unstable' 'libfwibble-dev' 'amd64,armel' '1.0' 'Depends: libfwibble1'
insertpackage 'unstable' 'cool' 'amd64,armel' '1.0' 'Multi-Arch: allowed'
insertpackage 'unstable' 'amdboot' 'amd64' '1.0'
insertpackage 'unstable' 'foreigner' 'amd64,armel' '1.0' 'Multi-Arch: foreign'
-insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner'
+insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev'
setupaptarchive
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot cool doxygen foreigner libc6 libc6-dev
-0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
+ amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1
+0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst cool (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
Inst foreigner (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [amd64])
+Inst libfwibble1 (1.0 unstable [amd64])
+Inst libfwibble-dev (1.0 unstable [amd64])
Conf amdboot (1.0 unstable [amd64])
Conf cool (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
Conf foreigner (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
-Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+Conf libc6-dev (1.0 unstable [amd64])
+Conf libfwibble1 (1.0 unstable [amd64])
+Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot cool doxygen foreigner libc6 libc6:armel libc6-dev libc6-dev:armel
-0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+ libfwibble-dev:armel libfwibble1:armel
+0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst cool (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
@@ -51,6 +59,8 @@ Inst libc6 (1.0 unstable [amd64])
Inst libc6:armel (1.0 unstable [armel])
Inst libc6-dev (1.0 unstable [amd64])
Inst libc6-dev:armel (1.0 unstable [armel])
+Inst libfwibble1:armel (1.0 unstable [armel])
+Inst libfwibble-dev:armel (1.0 unstable [armel])
Conf amdboot (1.0 unstable [amd64])
Conf cool (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
@@ -58,34 +68,41 @@ Conf foreigner (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
Conf libc6:armel (1.0 unstable [armel])
Conf libc6-dev (1.0 unstable [amd64])
-Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
+Conf libc6-dev:armel (1.0 unstable [armel])
+Conf libfwibble1:armel (1.0 unstable [armel])
+Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
configarchitecture 'armel' 'amd64'
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen foreigner libc6 libc6-dev
-0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
+ amdboot:amd64 cool doxygen foreigner libc6 libc6-dev libfwibble-dev
+ libfwibble1
+0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst foreigner (1.0 unstable [armel])
Inst libc6 (1.0 unstable [armel])
Inst libc6-dev (1.0 unstable [armel])
+Inst libfwibble1 (1.0 unstable [armel])
+Inst libfwibble-dev (1.0 unstable [armel])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf foreigner (1.0 unstable [armel])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s
+Conf libc6-dev (1.0 unstable [armel])
+Conf libfwibble1 (1.0 unstable [armel])
+Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64
- libc6-dev
-0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+ libc6-dev libfwibble-dev:amd64 libfwibble1:amd64
+0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
@@ -94,6 +111,8 @@ Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libfwibble1:amd64 (1.0 unstable [amd64])
+Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
@@ -101,7 +120,9 @@ Conf foreigner (1.0 unstable [armel])
Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
Conf libc6-dev:amd64 (1.0 unstable [amd64])
-Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64
+Conf libc6-dev (1.0 unstable [armel])
+Conf libfwibble1:amd64 (1.0 unstable [amd64])
+Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
configarchitecture 'amd64' 'armel'
@@ -111,34 +132,43 @@ insertinstalledpackage 'foreigner' 'armel' '0.5'
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot doxygen libc6 libc6-dev
-0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
+ amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1
+0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [amd64])
+Inst libfwibble1 (1.0 unstable [amd64])
+Inst libfwibble-dev (1.0 unstable [amd64])
Conf amdboot (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
-Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+Conf libc6-dev (1.0 unstable [amd64])
+Conf libfwibble1 (1.0 unstable [amd64])
+Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot doxygen libc6 libc6:armel libc6-dev libc6-dev:armel
-0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
+ libfwibble-dev:armel libfwibble1:armel
+0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [amd64])
Inst libc6:armel (1.0 unstable [armel])
Inst libc6-dev (1.0 unstable [amd64])
Inst libc6-dev:armel (1.0 unstable [armel])
+Inst libfwibble1:armel (1.0 unstable [armel])
+Inst libfwibble-dev:armel (1.0 unstable [armel])
Conf amdboot (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
Conf libc6:armel (1.0 unstable [armel])
Conf libc6-dev (1.0 unstable [amd64])
-Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
+Conf libc6-dev:armel (1.0 unstable [armel])
+Conf libfwibble1:armel (1.0 unstable [armel])
+Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
configarchitecture 'armel' 'amd64'
@@ -148,36 +178,45 @@ Building dependency tree...
The following packages will be REMOVED:
cool:amd64
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen libc6 libc6-dev
-0 upgraded, 5 newly installed, 1 to remove and 1 not upgraded.
+ amdboot:amd64 cool doxygen libc6 libc6-dev libfwibble-dev libfwibble1
+0 upgraded, 7 newly installed, 1 to remove and 1 not upgraded.
Remv cool:amd64 [0.5]
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst libc6 (1.0 unstable [armel])
Inst libc6-dev (1.0 unstable [armel])
+Inst libfwibble1 (1.0 unstable [armel])
+Inst libfwibble-dev (1.0 unstable [armel])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf libc6 (1.0 unstable [armel])
-Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s
+Conf libc6-dev (1.0 unstable [armel])
+Conf libfwibble1 (1.0 unstable [armel])
+Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev
-0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
+ libfwibble-dev:amd64 libfwibble1:amd64
+0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [armel])
Inst libc6:amd64 (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [armel])
Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
+Inst libfwibble1:amd64 (1.0 unstable [amd64])
+Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [armel])
Conf libc6:amd64 (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [armel])
Conf libc6-dev:amd64 (1.0 unstable [amd64])
-Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64
+Conf libc6-dev (1.0 unstable [armel])
+Conf libfwibble1:amd64 (1.0 unstable [amd64])
+Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
diff --git a/test/integration/test-bug-64141-install-dependencies-for-on-hold b/test/integration/test-bug-64141-install-dependencies-for-on-hold
index 4633ffcc3..e2d206fdd 100755
--- a/test/integration/test-bug-64141-install-dependencies-for-on-hold
+++ b/test/integration/test-bug-64141-install-dependencies-for-on-hold
@@ -4,7 +4,19 @@ set -e
TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture "i386"
+configarchitecture 'native' 'strange-arch'
+
+insertpackage 'unstable' 'unrelated' 'strange-arch' '1'
+
+insertinstalledpackage 'apt' 'native' '0.8.9' 'Depends: libc6 (>= 2.3.4)'
+insertinstalledpackage 'libc6' 'native' '2.4.1-1'
+insertinstalledpackage 'oldcrap' 'all' '1-1'
+
+insertpackage 'unstable' 'apt' 'native' '0.8.10' 'Depends: libc6 (>= 2.10), libdb4.8
+Breaks: oldcrap'
+insertpackage 'unstable' 'libc6' 'native' '2.11.2-7'
+insertpackage 'unstable' 'libdb4.8' 'native' '4.8.30-3'
+
setupaptarchive
testequal 'Reading package lists...
@@ -16,11 +28,10 @@ The following NEW packages will be installed:
The following packages will be upgraded:
apt libc6
2 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
-Need to get 0 B/6724 kB of archives.
-After this operation, 1523 kB of additional disk space will be used.
+After this operation, 0 B of additional disk space will be used.
E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
-echo 'apt hold' | dpkg --set-selections
+aptmark hold apt -qq
testequal 'Reading package lists...
Building dependency tree...
@@ -29,6 +40,5 @@ The following packages have been kept back:
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
-Need to get 0 B/3881 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only -o Test='hold-back-apt'
diff --git a/test/integration/test-bug-657695-resolver-breaks-on-virtuals b/test/integration/test-bug-657695-resolver-breaks-on-virtuals
new file mode 100755
index 000000000..e9b27cfcd
--- /dev/null
+++ b/test/integration/test-bug-657695-resolver-breaks-on-virtuals
@@ -0,0 +1,51 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'xserver-xorg-core' 'amd64' '2:1.7.6-2ubuntu7.10'
+for i in $(seq 1 50); do
+ insertinstalledpackage "xserver-xorg-video-driver$i" 'amd64' '1.0' 'Provides: xserver-xorg-video-6'
+done
+
+insertpackage 'unstable' 'xserver-xorg-core' 'amd64' '2:1.11.3-0ubuntu9' 'Breaks: xserver-xorg-video-6'
+
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ xserver-xorg-video-driver1 xserver-xorg-video-driver10
+ xserver-xorg-video-driver11 xserver-xorg-video-driver12
+ xserver-xorg-video-driver13 xserver-xorg-video-driver14
+ xserver-xorg-video-driver15 xserver-xorg-video-driver16
+ xserver-xorg-video-driver17 xserver-xorg-video-driver18
+ xserver-xorg-video-driver19 xserver-xorg-video-driver2
+ xserver-xorg-video-driver20 xserver-xorg-video-driver21
+ xserver-xorg-video-driver22 xserver-xorg-video-driver23
+ xserver-xorg-video-driver24 xserver-xorg-video-driver25
+ xserver-xorg-video-driver26 xserver-xorg-video-driver27
+ xserver-xorg-video-driver28 xserver-xorg-video-driver29
+ xserver-xorg-video-driver3 xserver-xorg-video-driver30
+ xserver-xorg-video-driver31 xserver-xorg-video-driver32
+ xserver-xorg-video-driver33 xserver-xorg-video-driver34
+ xserver-xorg-video-driver35 xserver-xorg-video-driver36
+ xserver-xorg-video-driver37 xserver-xorg-video-driver38
+ xserver-xorg-video-driver39 xserver-xorg-video-driver4
+ xserver-xorg-video-driver40 xserver-xorg-video-driver41
+ xserver-xorg-video-driver42 xserver-xorg-video-driver43
+ xserver-xorg-video-driver44 xserver-xorg-video-driver45
+ xserver-xorg-video-driver46 xserver-xorg-video-driver47
+ xserver-xorg-video-driver48 xserver-xorg-video-driver49
+ xserver-xorg-video-driver5 xserver-xorg-video-driver50
+ xserver-xorg-video-driver6 xserver-xorg-video-driver7
+ xserver-xorg-video-driver8 xserver-xorg-video-driver9
+The following packages will be upgraded:
+ xserver-xorg-core
+1 upgraded, 0 newly installed, 50 to remove and 0 not upgraded.
+After this operation, 2150 kB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only
diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop
new file mode 100755
index 000000000..4407fbd9d
--- /dev/null
+++ b/test/integration/test-conflicts-loop
@@ -0,0 +1,36 @@
+#!/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
+ openjdk-6-jre-lib:i386 conflicts with openjdk-6-jre:i386
+ openjdk-6-jre:i386 conflicts with openjdk-6-jre-headless:i386
+ openjdk-6-jre-headless:i386 conflicts with openjdk-6-jre:i386
+3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Remv openjdk-6-jre [6b16-1.8-0ubuntu1]
+ openjdk-6-jre-headless:i386 conflicts with openjdk-6-jre-lib:i386
+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:i386 conflicts with openjdk-6-jre-lib:i386
+ openjdk-6-jre:i386 conflicts with openjdk-6-jre-lib:i386
+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..d2ac4edc6 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"
@@ -39,16 +39,16 @@ COMPAREFILE=$(mktemp)
echo "The following package disappeared from your system as
all files have been overwritten by other packages:
old-pkg
-Note: This is done automatic and on purpose by dpkg." > $COMPAREFILE
+Note: This is done automatically 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-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch
new file mode 100755
index 000000000..177d7489b
--- /dev/null
+++ b/test/integration/test-dpkg-assert-multi-arch
@@ -0,0 +1,97 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+buildsimplenativepackage 'native-pkg' 'amd64' '1.0' 'stable'
+buildsimplenativepackage 'foreign-pkg' 'i386' '0.5' 'stable' 'Multi-Arch: foreign'
+buildsimplenativepackage 'same-lib' 'amd64,i386' '0.5' 'stable' 'Multi-Arch: same'
+buildsimplenativepackage 'all-pkg' 'all' '2.0' 'stable'
+buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' 'Multi-Arch: foreign'
+
+setupaptarchive
+
+testqualifier() {
+ msgtest 'Test with' $1 'for correct qualifier mode' $2
+ GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -v -- '--unpack' | sed -e 's/^.*--[^u][^ ]* \([^ ]*\).*$/\1/')"
+ if [ "$GIVEN" = "$2" ]; then
+ msgpass
+ else
+ echo
+ echo "$GIVEN"
+ msgfail
+ fi
+}
+
+# non-multiarch or "ubuntus" old multiarchified dpkg
+echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper
+echo '#! /bin/sh
+if echo "$*" | grep -q -- "--assert-multi-arch"; then
+ echo >&2 'dpkg: Fehler: unbekannte Option --assert-multi-arch'
+ echo >&1 'dpkg: Info: unbekannte Option --assert-multi-arch'
+ return 2;
+fi
+return $*' > ./dpkg-wrapper
+chmod +x ./dpkg-wrapper
+
+testqualifier 'native-pkg' 'native-pkg'
+testqualifier 'native-pkg:amd64' 'native-pkg'
+testqualifier 'foreign-pkg' 'foreign-pkg:i386'
+testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386'
+testqualifier 'same-lib' 'same-lib'
+testqualifier 'same-lib:amd64' 'same-lib'
+testqualifier 'same-lib:i386' 'same-lib:i386'
+testqualifier 'all-pkg' 'all-pkg'
+testqualifier 'all-pkg:amd64' 'all-pkg'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg'
+insertinstalledpackage 'all-pkg' 'amd64' '1.0'
+insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg' 'all-pkg'
+testqualifier 'all-pkg:amd64' 'all-pkg'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg'
+insertinstalledpackage 'always-all-pkg' 'all' '1.0'
+insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg-' 'all-pkg'
+testqualifier 'all-foreign-pkg-' 'all-foreign-pkg'
+testqualifier 'always-all-pkg-' 'always-all-pkg'
+testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg'
+
+# multiarch dpkg (new interface version)
+
+rm rootdir/var/lib/dpkg/status
+touch rootdir/var/lib/dpkg/status
+echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper
+echo '#! /bin/sh
+if echo "$*" | grep -q -- "--assert-multi-arch"; then
+ return 0;
+fi
+return $*' > ./dpkg-wrapper
+
+testqualifier 'native-pkg' 'native-pkg:amd64'
+testqualifier 'native-pkg:amd64' 'native-pkg:amd64'
+testqualifier 'foreign-pkg' 'foreign-pkg:i386'
+testqualifier 'foreign-pkg:i386' 'foreign-pkg:i386'
+testqualifier 'same-lib' 'same-lib:amd64'
+testqualifier 'same-lib:amd64' 'same-lib:amd64'
+testqualifier 'same-lib:i386' 'same-lib:i386'
+testqualifier 'all-pkg' 'all-pkg:all'
+testqualifier 'all-pkg:amd64' 'all-pkg:all'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all'
+insertinstalledpackage 'all-pkg' 'amd64' '1.0'
+insertinstalledpackage 'all-foreign-pkg' 'amd64' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg' 'all-pkg:all'
+testqualifier 'all-pkg:amd64' 'all-pkg:all'
+testqualifier 'all-foreign-pkg' 'all-foreign-pkg:all'
+testqualifier 'all-foreign-pkg:amd64' 'all-foreign-pkg:all'
+insertinstalledpackage 'always-all-pkg' 'all' '1.0'
+insertinstalledpackage 'always-all-foreign-pkg' 'all' '1.0' 'Multi-Arch: foreign'
+testqualifier 'all-pkg-' 'all-pkg:amd64'
+testqualifier 'all-foreign-pkg-' 'all-foreign-pkg:amd64'
+testqualifier 'always-all-pkg-' 'always-all-pkg:all'
+testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg:all'
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-hashsum-verification b/test/integration/test-hashsum-verification
index 3ac9eccfb..99ea8bffa 100755
--- a/test/integration/test-hashsum-verification
+++ b/test/integration/test-hashsum-verification
@@ -23,7 +23,7 @@ prepare() {
find aptarchive -name 'Release' -delete
cat aptarchive/Packages | gzip > aptarchive/Packages.gz
cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
- cat aptarchive/Packages | lzma > aptarchive/Packages.lzma
+ cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma
# create Release file with incorret checksums
cat > aptarchive/Release <<EOF
Date: Fri, 05 Aug 2011 09:22:08 UTC
diff --git a/test/integration/test-implicit-conflicts-real-not-virtual b/test/integration/test-implicit-conflicts-real-not-virtual
new file mode 100755
index 000000000..c9fca4edf
--- /dev/null
+++ b/test/integration/test-implicit-conflicts-real-not-virtual
@@ -0,0 +1,56 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertpackage 'unstable-mp' 'crda' 'i386,amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
+Multi-Arch: foreign'
+insertpackage 'unstable-m' 'crda' 'i386,amd64' '1.1.1-1ubuntu4m' 'Multi-Arch: foreign'
+insertpackage 'unstable-p' 'crda' 'i386,amd64' '1.1.1-1ubuntu4p' 'Provides: wireless-crda'
+insertpackage 'unstable' 'wireless-crda' 'i386,amd64' '1.16'
+
+
+insertinstalledpackage 'wireless-crda' 'amd64' '1.14'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4m unstable-m [amd64])
+Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4p unstable-p [amd64])
+Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4mp unstable-mp [amd64])
+Conf crda (1.1.1-1ubuntu4mp unstable-mp [amd64])' aptget install crda -s -t unstable-mp
+
+rm rootdir/var/lib/dpkg/status
+insertinstalledpackage 'crda' 'amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
+Conflicts: wireless-crda (<< 1.15)
+Replaces: wireless-crda ( << 1.15)
+Multi-arch: foreign'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ wireless-crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst wireless-crda (1.16 unstable [amd64])
+Conf wireless-crda (1.16 unstable [amd64])' aptget install wireless-crda -s -t unstable
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-ordering-ignore-not-matching-breaks b/test/integration/test-ordering-ignore-not-matching-breaks
new file mode 100755
index 000000000..c9fca4edf
--- /dev/null
+++ b/test/integration/test-ordering-ignore-not-matching-breaks
@@ -0,0 +1,56 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertpackage 'unstable-mp' 'crda' 'i386,amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
+Multi-Arch: foreign'
+insertpackage 'unstable-m' 'crda' 'i386,amd64' '1.1.1-1ubuntu4m' 'Multi-Arch: foreign'
+insertpackage 'unstable-p' 'crda' 'i386,amd64' '1.1.1-1ubuntu4p' 'Provides: wireless-crda'
+insertpackage 'unstable' 'wireless-crda' 'i386,amd64' '1.16'
+
+
+insertinstalledpackage 'wireless-crda' 'amd64' '1.14'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4m unstable-m [amd64])
+Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4p unstable-p [amd64])
+Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst crda (1.1.1-1ubuntu4mp unstable-mp [amd64])
+Conf crda (1.1.1-1ubuntu4mp unstable-mp [amd64])' aptget install crda -s -t unstable-mp
+
+rm rootdir/var/lib/dpkg/status
+insertinstalledpackage 'crda' 'amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
+Conflicts: wireless-crda (<< 1.15)
+Replaces: wireless-crda ( << 1.15)
+Multi-arch: foreign'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ wireless-crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst wireless-crda (1.16 unstable [amd64])
+Conf wireless-crda (1.16 unstable [amd64])' aptget install wireless-crda -s -t unstable
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-pdiff-usage b/test/integration/test-pdiff-usage
index 0a8293018..29301d07d 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -21,7 +21,7 @@ testequal "$(cat ${PKGFILE})
cp ${PKGFILE}-new aptarchive/Packages
cat aptarchive/Packages | gzip > aptarchive/Packages.gz
cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
-cat aptarchive/Packages | lzma > aptarchive/Packages.lzma
+cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma
rm -rf aptarchive/Packages.diff
mkdir -p aptarchive/Packages.diff
PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
diff --git a/test/integration/test-pin-non-existent-package b/test/integration/test-pin-non-existent-package
index c91e77844..35de22115 100755
--- a/test/integration/test-pin-non-existent-package
+++ b/test/integration/test-pin-non-existent-package
@@ -6,7 +6,7 @@ TESTDIR=$(readlink -f $(dirname $0))
setupenvironment
configarchitecture "i386"
-insertpackage 'unstable' 'apt' 'i386' '0.8.15'
+insertpackage 'unstable' 'rapt' 'i386' '0.8.15'
insertpackage 'unstable' 'arch' 'i386' '1.0'
setupaptarchive
@@ -22,40 +22,40 @@ testcandidate() {
fi
}
-testcandidate apt '0.8.15'
+testcandidate rapt '0.8.15'
testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
testequal 'Reading package lists...
Building dependency tree...
-0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only
-echo 'Package: apt
+echo 'Package: rapt
Pin: release a=unstable
Pin-Priority: -1' > rootdir/etc/apt/preferences
-testcandidate apt '(none)'
+testcandidate rapt '(none)'
testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
testequal 'Reading package lists...
Building dependency tree...
-0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only
echo '
Package: doesntexist
Pin: release a=unstable
Pin-Priority: 1000' >> rootdir/etc/apt/preferences
-testcandidate apt '(none)'
+testcandidate rapt '(none)'
echo '
-Package: apt
+Package: rapt
Pin: release a=unstable
Pin-Priority: 1000' >> rootdir/etc/apt/preferences
-testcandidate apt '(none)'
+testcandidate rapt '(none)'
testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
testequal 'Reading package lists...
Building dependency tree...
-0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only
echo 'Package: arch:amd64
Pin: release a=unstable
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-releasefile-verification b/test/integration/test-releasefile-verification
index 4f65cfa3b..d3ea91de5 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -24,7 +24,7 @@ prepare() {
find aptarchive -name 'Release' -delete
cat aptarchive/Packages | gzip > aptarchive/Packages.gz
cat aptarchive/Packages | bzip2 > aptarchive/Packages.bz2
- cat aptarchive/Packages | lzma > aptarchive/Packages.lzma
+ cat aptarchive/Packages | xz --format=lzma > aptarchive/Packages.lzma
generatereleasefiles "$DATE"
}
diff --git a/test/integration/test-suggest-installed-multiarch-silbing b/test/integration/test-suggest-installed-multiarch-silbing
new file mode 100755
index 000000000..d55d250aa
--- /dev/null
+++ b/test/integration/test-suggest-installed-multiarch-silbing
@@ -0,0 +1,80 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386' 'armel'
+
+insertinstalledpackage 'foo' 'i386' '1'
+insertpackage 'unstable' 'foo' 'amd64,i386' '1'
+
+insertinstalledpackage 'foo2' 'i386' '1'
+insertpackage 'unstable' 'foo2' 'i386' '1'
+
+insertinstalledpackage 'foo3' 'amd64' '1'
+insertpackage 'unstable' 'foo3' 'amd64,i386' '1'
+
+insertinstalledpackage 'samefoo' 'i386,amd64' '1' 'Multi-Arch: same'
+insertpackage 'unstable' 'samefoo' 'amd64,i386,armel' '1' 'Multi-Arch: same'
+
+insertinstalledpackage 'samefoo2' 'i386' '1' 'Multi-Arch: same'
+insertpackage 'unstable' 'samefoo2' 'amd64,i386,armel' '1' 'Multi-Arch: same'
+
+insertinstalledpackage 'mozplugger' 'i386' '1' 'Depends: iceweasel | fireweasel'
+insertinstalledpackage 'fireweasel' 'i386' '1'
+insertpackage 'unstable' 'mozplugger' 'i386,amd64' '1' 'Depends: iceweasel | fireweasel'
+
+setupaptarchive
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'foo' is not installed, so not removed. Did you mean 'foo:i386'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove foo -s
+
+testequal "Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ foo2:i386
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Remv foo2:i386 [1]" aptget remove foo2 -s
+
+testequal "Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ foo3
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Remv foo3 [1]" aptget remove foo3 -s
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'foo3:i386' is not installed, so not removed. Did you mean 'foo3'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove foo3:i386 -s
+
+testequalor2 "Reading package lists...
+Building dependency tree...
+Package 'samefoo:armel' is not installed, so not removed. Did you mean 'samefoo'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." "Reading package lists...
+Building dependency tree...
+Package 'samefoo:armel' is not installed, so not removed. Did you mean 'samefoo:i386'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo:armel -s
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'samefoo2' is not installed, so not removed. Did you mean 'samefoo2:i386'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo2 -s
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'samefoo2:armel' is not installed, so not removed. Did you mean 'samefoo2:i386'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove samefoo2:armel -s
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'iceweasel' is not installed, so not removed
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove iceweasel -s
+
+testequal "Reading package lists...
+Building dependency tree...
+Package 'fireweasel' is not installed, so not removed. Did you mean 'fireweasel:i386'?
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove fireweasel:amd64 -s
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...
diff --git a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall
new file mode 100755
index 000000000..0fdf97485
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386' 'armel'
+
+buildsimplenativepackage 'libsame' 'amd64,i386,armel' '1.0' 'unstable' 'Multi-Arch: same'
+
+# FIXME: hack around dpkg's current inability to handle multiarch, a clean install would be better…
+insertinstalledpackage 'libsame' 'amd64,i386' '1.0' 'Multi-Arch: same'
+sed -e 's#/installed#/unstable#' -e 's#Installed-Size: 42#Installed-Size: 1#' -i rootdir/var/lib/dpkg/status
+
+setupaptarchive
+
+REINSTALL='Reading package lists...
+Building dependency tree...
+0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
+Inst libsame [1.0] (1.0 unstable [amd64])
+Inst libsame:i386 [1.0] (1.0 unstable [i386])
+Conf libsame (1.0 unstable [amd64])
+Conf libsame:i386 (1.0 unstable [i386])'
+
+testequal "$REINSTALL" aptget install --reinstall libsame -s
+testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s
+testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s
+testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s