diff options
Diffstat (limited to 'test/integration')
23 files changed, 597 insertions, 162 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/framework b/test/integration/framework index d7526a100..5a0e1070f 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -29,7 +29,8 @@ 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 2 + shift + if [ -n "$1" ]; then shift; else break; fi done echo -n "…${CNORMAL} " >&2; } @@ -106,6 +107,10 @@ aptitude() { LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* fi } +gdb() { + echo "gdb: run »$*«" + APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1 +} addtrap() { CURRENTTRAP="$CURRENTTRAP $1" @@ -114,9 +119,9 @@ addtrap() { 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;" @@ -126,25 +131,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 @@ -156,7 +155,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 - echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it… + if ! $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; 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 @@ -170,13 +171,17 @@ getarchitecture() { if [ -n "$ARCH" ]; then echo $ARCH else - dpkg-architecture -qDEB_BUILD_ARCH + 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 @@ -186,6 +191,32 @@ configarchitecture() { 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 2>&1 > /dev/null; 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() { @@ -350,7 +381,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 @@ -432,7 +463,7 @@ insertpackage() { local ARCHS="" 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 @@ -486,7 +517,8 @@ insertinstalledpackage() { local VERSION="$3" local DEPENDENCIES="$4" local PRIORITY="${5:-optional}" - local FILE="rootdir/var/lib/dpkg/status" + 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 @@ -502,6 +534,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 } @@ -525,7 +562,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 @@ -542,9 +579,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)" diff --git a/test/integration/skip-bug-602412-dequote-redirect b/test/integration/skip-bug-602412-dequote-redirect index a63d36246..689b671ce 100755 --- a/test/integration/skip-bug-602412-dequote-redirect +++ b/test/integration/skip-bug-602412-dequote-redirect @@ -19,18 +19,20 @@ echo "server.modules = ( \"mod_redirect\" ) server.document-root = \"$(readlink -f ./aptarchive)\" server.port = 8080 server.stat-cache-engine = \"disable\" -url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\" )" > lighttpd.conf +url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\", + \"^/dists/(.*)$\" => \"/newdists/\$1\" )" > lighttpd.conf mv aptarchive/pool aptarchive/newpool +mv aptarchive/dists aptarchive/newdists + lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid' lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null & addtrap "kill $!;" -local APTARCHIVE="file://$(readlink -f ./aptarchive)" +APTARCHIVE="file://$(readlink -f ./aptarchive)" for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" done -aptget update -qq || msgdie 'apt-get update failed' -aptget install unrelated --download-only -qq || msgdie 'downloading package failed' - +aptget update || msgdie 'apt-get update failed' +aptget install unrelated --download-only || msgdie 'downloading package failed' 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-673536-pre-depends-breaks-loop b/test/integration/test-673536-pre-depends-breaks-loop new file mode 100755 index 000000000..e9d3c4de6 --- /dev/null +++ b/test/integration/test-673536-pre-depends-breaks-loop @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'native' + +buildsimplenativepackage 'basic' 'native' '1' 'stable' +buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common' +buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)' + +setupaptarchive + +# we check with 'real' packages here as the simulation reports a 'Conf broken' +# which is technical correct for the simulation, but testing errormsg is ugly + +aptget install basic=1 -qq > /dev/null +testdpkginstalled basic +testdpkgnotinstalled common + +aptget dist-upgrade -qq > /dev/null +testdpkginstalled basic common 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-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index bb1ac0e54..63883b380 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -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 } 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 dd9efb785..530012e5d 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -16,7 +16,7 @@ buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' setupaptarchive 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... @@ -75,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... @@ -125,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... @@ -168,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-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-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 30df48604..a128366c5 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -18,8 +18,10 @@ insertpackage 'unstable' 'libfwibble-dev' 'amd64,armel' '1.0' 'Depends: libfwibb 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' +insertpackage 'unstable' 'arm-stuff' 'armel' '1.0' +insertpackage 'unstable' 'linux-stuff' 'amd64,armel' '1.0' -insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev' +insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-arm] | linux-stuff [ linux-any]' setupaptarchive @@ -27,7 +29,8 @@ testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1 -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + linux-stuff +0 upgraded, 9 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]) @@ -36,6 +39,7 @@ 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]) +Inst linux-stuff (1.0 unstable [amd64]) Conf amdboot (1.0 unstable [amd64]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) @@ -43,15 +47,17 @@ Conf foreigner (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) 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 +Conf libfwibble-dev (1.0 unstable [amd64]) +Conf linux-stuff (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 - libfwibble-dev:armel libfwibble1:armel -0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. + amdboot arm-stuff:armel cool doxygen foreigner libc6 libc6:armel libc6-dev + libc6-dev:armel libfwibble-dev:armel libfwibble1:armel +0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Inst amdboot (1.0 unstable [amd64]) +Inst arm-stuff:armel (1.0 unstable [armel]) Inst cool (1.0 unstable [amd64]) Inst doxygen (1.0 unstable [amd64]) Inst foreigner (1.0 unstable [amd64]) @@ -62,6 +68,7 @@ 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 arm-stuff:armel (1.0 unstable [armel]) Conf cool (1.0 unstable [amd64]) Conf doxygen (1.0 unstable [amd64]) Conf foreigner (1.0 unstable [amd64]) @@ -77,10 +84,11 @@ 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 libfwibble-dev - libfwibble1 -0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. + amdboot:amd64 arm-stuff cool doxygen foreigner libc6 libc6-dev + libfwibble-dev libfwibble1 +0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Inst amdboot:amd64 (1.0 unstable [amd64]) +Inst arm-stuff (1.0 unstable [armel]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst foreigner (1.0 unstable [armel]) @@ -89,6 +97,7 @@ 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 arm-stuff (1.0 unstable [armel]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf foreigner (1.0 unstable [armel]) @@ -101,8 +110,8 @@ 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 libfwibble-dev:amd64 libfwibble1:amd64 -0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. + libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64 +0 upgraded, 11 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]) @@ -113,6 +122,7 @@ 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]) +Inst linux-stuff:amd64 (1.0 unstable [amd64]) Conf amdboot:amd64 (1.0 unstable [amd64]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) @@ -122,7 +132,8 @@ Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [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 +Conf libfwibble-dev:amd64 (1.0 unstable [amd64]) +Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64 configarchitecture 'amd64' 'armel' @@ -132,28 +143,31 @@ insertinstalledpackage 'foreigner' 'armel' '0.5' testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: - amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 -0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded. + amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 linux-stuff +0 upgraded, 7 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]) +Inst linux-stuff (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]) Conf libfwibble1 (1.0 unstable [amd64]) -Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s +Conf libfwibble-dev (1.0 unstable [amd64]) +Conf linux-stuff (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 + amdboot arm-stuff:armel doxygen libc6 libc6:armel libc6-dev libc6-dev:armel libfwibble-dev:armel libfwibble1:armel -0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. +0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded. Inst amdboot (1.0 unstable [amd64]) +Inst arm-stuff:armel (1.0 unstable [armel]) Inst doxygen (1.0 unstable [amd64]) Inst libc6 (1.0 unstable [amd64]) Inst libc6:armel (1.0 unstable [armel]) @@ -162,6 +176,7 @@ 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 arm-stuff:armel (1.0 unstable [armel]) Conf doxygen (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf libc6:armel (1.0 unstable [armel]) @@ -178,10 +193,12 @@ 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 libfwibble-dev libfwibble1 -0 upgraded, 7 newly installed, 1 to remove and 1 not upgraded. + amdboot:amd64 arm-stuff cool doxygen libc6 libc6-dev libfwibble-dev + libfwibble1 +0 upgraded, 8 newly installed, 1 to remove and 1 not upgraded. Remv cool:amd64 [0.5] Inst amdboot:amd64 (1.0 unstable [amd64]) +Inst arm-stuff (1.0 unstable [armel]) Inst cool (1.0 unstable [armel]) Inst doxygen (1.0 unstable [armel]) Inst libc6 (1.0 unstable [armel]) @@ -189,6 +206,7 @@ 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 arm-stuff (1.0 unstable [armel]) Conf cool (1.0 unstable [armel]) Conf doxygen (1.0 unstable [armel]) Conf libc6 (1.0 unstable [armel]) @@ -200,8 +218,8 @@ 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 - libfwibble-dev:amd64 libfwibble1:amd64 -0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded. + libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64 +0 upgraded, 9 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]) @@ -210,6 +228,7 @@ 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]) +Inst linux-stuff: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]) @@ -217,6 +236,5 @@ Conf libc6 (1.0 unstable [armel]) Conf libc6-dev:amd64 (1.0 unstable [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 - - +Conf libfwibble-dev:amd64 (1.0 unstable [amd64]) +Conf linux-stuff: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-conflicts-loop b/test/integration/test-conflicts-loop index 25f005969..4407fbd9d 100755 --- a/test/integration/test-conflicts-loop +++ b/test/integration/test-conflicts-loop @@ -19,10 +19,10 @@ 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: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] diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages index 0e0e9618d..d2ac4edc6 100755 --- a/test/integration/test-disappearing-packages +++ b/test/integration/test-disappearing-packages @@ -39,7 +39,7 @@ 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 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-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks new file mode 100755 index 000000000..f8b4544a0 --- /dev/null +++ b/test/integration/test-ignore-provides-if-versioned-breaks @@ -0,0 +1,150 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' 'amd64' + +insertpackage 'unstable' 'unrlated' 'all' '1.0' + +insertinstalledpackage 'foo' 'i386' '2.0' +insertpackage 'unstable' 'foo' 'i386' '4.0' +insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo' +insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Breaks: foo (<< 3.0)' +insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Breaks: foo (<< 2.0)' +insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Breaks: foo' + +insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign' +insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Breaks: foo-foreign (<< 3.0)' +insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Breaks: foo-foreign (<< 2.0)' +insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Breaks: foo-foreign' + +insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same' +insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Breaks: foo-same (<< 3.0)' +insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Breaks: foo-same (<< 2.0)' +insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Breaks: foo-same' + + + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-breaker-none : Breaks: foo +E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-breaker-2 foo-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-breaker-2 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo-breaker-2 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + foo-breaker-3 foo-provider +The following packages will be upgraded: + foo +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo [2.0] (4.0 unstable [i386]) +Inst foo-breaker-3 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo (4.0 unstable [i386]) +Conf foo-breaker-3 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -s + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-foreign-breaker-none : Breaks: foo-foreign +E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-foreign-breaker-2 foo-foreign-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-foreign-breaker-2 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign-breaker-2 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-foreign:amd64 +The following NEW packages will be installed: + foo-foreign-breaker-3 foo-foreign-provider +The following packages will be upgraded: + foo-foreign:amd64 +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64]) +Inst foo-foreign-breaker-3 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign:amd64 (4.0 unstable [amd64]) +Conf foo-foreign-breaker-3 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -s + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-same-breaker-none : Breaks: foo-same +E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-same-breaker-2 foo-same-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-same-breaker-2 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-2 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-same:amd64 foo-same +The following NEW packages will be installed: + foo-same-breaker-3 foo-same-provider +The following packages will be upgraded: + foo-same:amd64 foo-same +2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ] +Inst foo-same [2.0] (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) +Conf foo-same (4.0 unstable [i386]) +Inst foo-same-breaker-3 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-3 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts new file mode 100755 index 000000000..44eafcff1 --- /dev/null +++ b/test/integration/test-ignore-provides-if-versioned-conflicts @@ -0,0 +1,150 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' 'amd64' + +insertpackage 'unstable' 'unrlated' 'all' '1.0' + +insertinstalledpackage 'foo' 'i386' '2.0' +insertpackage 'unstable' 'foo' 'i386' '4.0' +insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo' +insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Conflicts: foo (<< 3.0)' +insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Conflicts: foo (<< 2.0)' +insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Conflicts: foo' + +insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign' +insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign' +insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Conflicts: foo-foreign (<< 3.0)' +insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Conflicts: foo-foreign (<< 2.0)' +insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Conflicts: foo-foreign' + +insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same' +insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same' +insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Conflicts: foo-same (<< 3.0)' +insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Conflicts: foo-same (<< 2.0)' +insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Conflicts: foo-same' + + + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-breaker-none : Conflicts: foo +E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-breaker-2 foo-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-breaker-2 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo-breaker-2 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + foo-breaker-3 foo-provider +The following packages will be upgraded: + foo +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo [2.0] (4.0 unstable [i386]) +Inst foo-breaker-3 (1.0 unstable [i386]) +Inst foo-provider (1.0 unstable [i386]) +Conf foo (4.0 unstable [i386]) +Conf foo-breaker-3 (1.0 unstable [i386]) +Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -s + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-foreign-breaker-none : Conflicts: foo-foreign +E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-foreign-breaker-2 foo-foreign-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-foreign-breaker-2 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign-breaker-2 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-foreign:amd64 +The following NEW packages will be installed: + foo-foreign-breaker-3 foo-foreign-provider +The following packages will be upgraded: + foo-foreign:amd64 +1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. +Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64]) +Inst foo-foreign-breaker-3 (1.0 unstable [i386]) +Inst foo-foreign-provider (1.0 unstable [i386]) +Conf foo-foreign:amd64 (4.0 unstable [amd64]) +Conf foo-foreign-breaker-3 (1.0 unstable [i386]) +Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -s + +testequal 'Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + foo-same-breaker-none : Conflicts: foo-same +E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + foo-same-breaker-2 foo-same-provider +0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded. +Inst foo-same-breaker-2 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-2 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo-same:amd64 foo-same +The following NEW packages will be installed: + foo-same-breaker-3 foo-same-provider +The following packages will be upgraded: + foo-same:amd64 foo-same +2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ] +Inst foo-same [2.0] (4.0 unstable [i386]) +Conf foo-same:amd64 (4.0 unstable [amd64]) +Conf foo-same (4.0 unstable [i386]) +Inst foo-same-breaker-3 (1.0 unstable [i386]) +Inst foo-same-provider (1.0 unstable [i386]) +Conf foo-same-breaker-3 (1.0 unstable [i386]) +Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -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-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-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first index a9a4069cf..269038d0f 100755 --- a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first +++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first @@ -14,7 +14,7 @@ insertpackage 'unstable' 'apt' 'i386' '2' 'Depends: libsame (= 2)' setupaptarchive -testequal 'Reading package lists... +testequalor2 'Reading package lists... Building dependency tree... The following extra packages will be installed: apt:i386 libsame:i386 @@ -28,4 +28,18 @@ Inst libsame (2 unstable [amd64]) [apt:i386 ] Conf libsame:i386 (2 unstable [i386]) [apt:i386 ] Conf libsame (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 extra packages will be installed: + apt:i386 libsame:i386 +The following NEW packages will be installed: + libsame +The following packages will be upgraded: + apt:i386 libsame:i386 +2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt:i386 [1] (2 unstable [i386]) [] +Inst libsame:i386 [1] (2 unstable [i386]) +Inst libsame (2 unstable [amd64]) +Conf libsame:i386 (2 unstable [i386]) +Conf libsame (2 unstable [amd64]) Conf apt:i386 (2 unstable [i386])' aptget install libsame:amd64 -s diff --git a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering new file mode 100755 index 000000000..462acad00 --- /dev/null +++ b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'custom' 'amd64' '1.0' 'Pre-Depends: grub-pc | grub' +insertinstalledpackage 'grub' 'amd64' '1.0' +insertpackage 'unstable' 'custom' 'amd64' '2.0' 'Pre-Depends: grub-pc | grub' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + custom +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst custom [1.0] (2.0 unstable [amd64]) +Conf custom (2.0 unstable [amd64])' aptget dist-upgrade -s |