diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/Packages-bug-593360-modifiers-in-names | 42 | ||||
-rw-r--r-- | test/integration/Packages-bug-604222-new-and-autoremove | 68 | ||||
-rwxr-xr-x | test/integration/create-test-data | 16 | ||||
-rw-r--r-- | test/integration/deb-bug-330162-encoded-tar-header.deb | bin | 0 -> 544 bytes | |||
-rw-r--r-- | test/integration/framework | 95 | ||||
-rw-r--r-- | test/integration/status-bug-601961-install-info | 42 | ||||
-rw-r--r-- | test/integration/status-bug-604222-new-and-autoremove | 10 | ||||
-rwxr-xr-x | test/integration/test-bug-330162-encoded-tar-header | 11 | ||||
-rwxr-xr-x | test/integration/test-bug-593360-modifiers-in-names | 64 | ||||
-rwxr-xr-x | test/integration/test-bug-595691-empty-and-broken-archive-files | 1 | ||||
-rwxr-xr-x | test/integration/test-bug-601961-install-info | 38 | ||||
-rwxr-xr-x | test/integration/test-bug-604222-new-and-autoremove | 66 | ||||
-rwxr-xr-x | test/integration/test-bug-604401-files-are-directories | 66 | ||||
-rwxr-xr-x | test/integration/test-release-candidate-switching | 419 |
14 files changed, 913 insertions, 25 deletions
diff --git a/test/integration/Packages-bug-593360-modifiers-in-names b/test/integration/Packages-bug-593360-modifiers-in-names new file mode 100644 index 000000000..d2ac8d4e1 --- /dev/null +++ b/test/integration/Packages-bug-593360-modifiers-in-names @@ -0,0 +1,42 @@ +Package: g++ +Priority: optional +Section: devel +Installed-Size: 40 +Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org> +Architecture: i386 +Source: gcc-defaults (1.96) +Version: 4:4.4.5-1 +Filename: pool/main/g/gcc-defaults/g++_4.4.5-1_i386.deb +Size: 1372 +MD5sum: 37e129a4b130e8b96a9b9d5b26a3fffa +SHA1: d98768d1547389a563e60433268143f42578c3e6 +SHA256: 18d933972392d233127bdd766cfcaaaa2e35f57de47c7af678d599be9613d562 +Description: The GNU C++ compiler + +Package: apt +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team <deity@lists.debian.org> +Architecture: all +Version: 0.8.8 +Filename: pool/main/a/apt/apt_0.8.8_i386.deb +Size: 2140632 +MD5sum: 4283aa3bb751253faf1b2204e0229e4f +SHA1: 59d432f56901faa86e814a436b8da010ee1c7b8a +SHA256: 072dcf4359dce9698aeaa54366eb20513f860c2bb6d44a95973c0b2ad413bfab +Description: Advanced front-end for dpkg + +Package: apt+ +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team <deity@lists.debian.org> +Architecture: all +Version: 0.8.8 +Filename: pool/main/a/apt/apt_0.8.8_i386.deb +Size: 2140632 +MD5sum: 4283aa3bb751253faf1b2204e0229e4f +SHA1: 59d432f56901faa86e814a436b8da010ee1c7b8a +SHA256: 072dcf4359dce9698aeaa54366eb20513f860c2bb6d44a95973c0b2ad413bfab +Description: Advanced front-end for dpkg diff --git a/test/integration/Packages-bug-604222-new-and-autoremove b/test/integration/Packages-bug-604222-new-and-autoremove new file mode 100644 index 000000000..fdff9d702 --- /dev/null +++ b/test/integration/Packages-bug-604222-new-and-autoremove @@ -0,0 +1,68 @@ +Package: dummy-archive +Priority: extra +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team <deity@lists.debian.org> +Architecture: i386 +Version: 0.invalid.0 +Source: dummy-archive +Depends: libavcodec52, libvtk5-dev | libopenal-dev +Filename: pool/main/d/dummy/dummy_5.4.2-8_i386.deb +Size: 2280898 +MD5sum: 569719746f7ec4b96209a6152af20c00 +Description: some dummy package + +Package: libvtk5-dev +Priority: optional +Section: libdevel +Installed-Size: 13812 +Maintainer: A. Maitland Bottoms <bottoms@debian.org> +Architecture: i386 +Source: vtk +Version: 5.4.2-8 +Depends: libvtk5.4 (= 5.4.2-8) +Filename: pool/main/v/vtk/libvtk5-dev_5.4.2-8_i386.deb +Size: 2280898 +MD5sum: 569719746f7ec4b96209a6152af20c00 +Description: VTK header files for building C++ code + +Package: libvtk5.4 +Priority: optional +Section: libs +Installed-Size: 39372 +Maintainer: A. Maitland Bottoms <bottoms@debian.org> +Architecture: i386 +Source: vtk +Version: 5.4.2-8 +Depends: libavcodec52 (>= 4:0.5.1-1) +Filename: pool/main/v/vtk/libvtk5.4_5.4.2-8_i386.deb +Size: 13070848 +MD5sum: 3ba7abc3d58ec44e35ae71879406563d +Description: Visualization Toolkit - A high level 3D visualization library + +Package: libopenal-dev +Priority: optional +Section: libdevel +Installed-Size: 140 +Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org> +Architecture: i386 +Source: openal-soft +Version: 1:1.12.854-2 +Filename: pool/main/o/openal-soft/libopenal-dev_1.12.854-2_i386.deb +Size: 21014 +MD5sum: e0bda4fbf5a3d38ef510a23a1642587f +Description-de: Software-Implementierung der OpenAL-API (Entwicklungsdateien) + +Package: libavcodec52 +Priority: optional +Section: libs +Installed-Size: 10772 +Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org> +Architecture: i386 +Source: ffmpeg +Version: 4:0.5.2-6 +Conflicts: libvtk5-dev +Filename: pool/main/f/ffmpeg/libavcodec52_0.5.2-6_i386.deb +Size: 4001600 +MD5sum: a50aae4c8e8b9dd29612407e61bedc22 +Description-de: Ffmpeg-Codec-Bibliothek diff --git a/test/integration/create-test-data b/test/integration/create-test-data index ff9405502..581b62910 100755 --- a/test/integration/create-test-data +++ b/test/integration/create-test-data @@ -1,6 +1,11 @@ #!/bin/sh set +e # its okay to fail in these script, most of the time the apt* stuff will generate errors +if [ -z "$1" -o -z "$2" ]; then + echo "Usage: $0 file codename pkg…" + exit 1 +fi + local TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework BUILDDIRECTORY="${TESTDIR}/../../build/bin" @@ -16,7 +21,12 @@ TMPGEN=$WORKDIR/Packages export LANG=C LISTOFPKGS=$(aptget install $* -t $CODENAME -so Dir::state::status=$WORKDIR/status -o Dir::Cache::archives=$WORKDIR -o pkgCacheGen::Essential=none -o APT::Immediate-Configure=0 2> /dev/null | awk '/^Inst/ {print $2}' | sed -e "s#\$#/$CODENAME#") -aptcache show $LISTOFPKGS --no-all-versions 2> /dev/null > $TMPGEN +if [ -z "$LISTOFPKGS" ]; then + echo "List of packages is empty: run apt-get install command again for you now" + aptget install $* -t $CODENAME -so Dir::state::status=$WORKDIR/status -o Dir::Cache::archives=$WORKDIR -o pkgCacheGen::Essential=none -o APT::Immediate-Configure=0 + exit 1 +fi +aptcache show $LISTOFPKGS --no-all-versions 2> $WORKDIR/error.lst > $TMPGEN sed -i $TMPGEN \ -e '/^ / d' \ -e '/^SHA1: / d' -e '/^SHA256: / d' \ @@ -24,6 +34,10 @@ sed -i $TMPGEN \ -e '/^Xul-Appid: / d' \ -e '/^Status: / d' +if [ "$CODENAME" = "experimental" ]; then + aptcache show $(cat $WORKDIR/error.lst | cut -d"'" -f 4 | sed -e 's#$#/sid#') --no-all-versions 2> /dev/null >> $TMPGEN +fi + if echo "$GENERATE" | grep '^status-' > /dev/null; then sed -i $TMPGEN -e '/^Package: / a\ Status: install ok installed' \ diff --git a/test/integration/deb-bug-330162-encoded-tar-header.deb b/test/integration/deb-bug-330162-encoded-tar-header.deb Binary files differnew file mode 100644 index 000000000..f38b1aa70 --- /dev/null +++ b/test/integration/deb-bug-330162-encoded-tar-header.deb diff --git a/test/integration/framework b/test/integration/framework index 2422f0886..4bbe1b408 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -78,6 +78,15 @@ aptkey() { runapt apt-key $*; } dpkg() { $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $* } +aptitude() { + if [ -f ./aptconfig.conf ]; then + APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + elif [ -f ../aptconfig.conf ]; then + APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + else + LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $* + fi +} setupenvironment() { TMPWORKINGDIRECTORY=$(mktemp -d) @@ -107,8 +116,10 @@ setupenvironment() { local PACKAGESFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Packages-/' -e 's/^skip-/Packages-/') if [ -f "${TESTDIR}/${PACKAGESFILE}" ]; then cp "${TESTDIR}/${PACKAGESFILE}" aptarchive/Packages - else - touch 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 fi cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/ ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg @@ -116,12 +127,14 @@ setupenvironment() { echo "Dir::state::status \"${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status\";" >> aptconfig.conf echo "Debug::NoLocking \"true\";" >> aptconfig.conf echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf + echo "Dir::Bin::Methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf echo "DPKG::options:: \"dpkg\";" >> aptconfig.conf 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:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf + echo 'quiet::NoUpdate "true";' >> aptconfig.conf export LC_ALL=C msgdone "info" } @@ -307,6 +320,38 @@ buildaptftparchivedirectorystructure() { done } +insertpackage() { + local RELEASE="$1" + local NAME="$2" + local ARCH="$3" + local VERSION="$4" + local DEPENDENCIES="$5" + local ARCHS="$ARCH" + if [ "$ARCHS" = "all" ]; then + ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" + fi + for BUILDARCH in $ARCHS; do + local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}" + mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source + touch aptarchive/dists/${RELEASE}/main/source/Sources + local FILE="${PPATH}/Packages" + echo "Package: $NAME +Priority: optional +Section: other +Installed-Size: 42 +Maintainer: Joe Sixpack <joe@example.org> +Architecture: $ARCH +Version: $VERSION +Filename: pool/main/${NAME}/${NAME}_${VERSION}_${ARCH}.deb" >> $FILE + test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE + echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} + If you find such a package installed on your system, + YOU did something horribly wrong! They are autogenerated + und used only by testcases for APT and surf no other propose… +" >> $FILE + done +} + buildaptarchivefromincoming() { msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on incoming packages…" cd aptarchive @@ -315,36 +360,38 @@ buildaptarchivefromincoming() { [ -e dists ] || buildaptftparchivedirectorystructure msgninfo "\tGenerate Packages, Sources and Contents files… " aptftparchive -qq generate ftparchive.conf - msgdone "info" - msgninfo "\tGenerate Release files… " - for dir in $(find ./dists -mindepth 1 -maxdepth 1 -type d); do - aptftparchive -qq release $dir -o APT::FTPArchive::Release::Codename="$(echo "$dir" | cut -d'/' -f 3)" | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference - done cd - > /dev/null msgdone "info" + generatereleasefiles } buildaptarchivefromfiles() { msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on prebuild files…" - cd aptarchive - if [ -f Packages ]; then - msgninfo "\tPackages file… " - cat Packages | gzip > Packages.gz - cat Packages | bzip2 > Packages.bz2 - cat Packages | lzma > Packages.lzma - msgdone "info" - fi - if [ -f Sources ]; then - msgninfo "\tSources file… " - cat Sources | gzip > Sources.gz - cat Sources | bzip2 > Sources.bz2 - cat Sources | lzma > Sources.lzma + find aptarchive -name 'Packages' -o -name 'Sources' | while read line; do + msgninfo "\t${line} file… " + cat ${line} | gzip > ${line}.gz + cat ${line} | bzip2 > ${line}.bz2 + cat ${line} | lzma > ${line}.lzma msgdone "info" + done + generatereleasefiles +} + +generatereleasefiles() { + msgninfo "\tGenerate Release files… " + if [ -e aptarchive/dists ]; then + for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do + local CODENAME="$(echo "$dir" | cut -d'/' -f 4)" + aptftparchive -qq release $dir -o APT::FTPArchive::Release::Suite="${CODENAME}" -o APT::FTPArchive::Release::Codename="${CODENAME}" | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference + if [ "$CODENAME" = "experimental" -o "$CODENAME" = "experimental2" ]; then + sed -i '/^Date: / a\ +NotAutomatic: yes' $dir/Release + fi + done + else + aptftparchive -qq release ./aptarchive | sed -e '/0 Release$/ d' > aptarchive/Release # remove the self reference fi - msgninfo "\tRelease file… " - aptftparchive -qq release . | sed -e '/0 Release$/ d' > Release # remove the self reference msgdone "info" - cd .. } setupdistsaptarchive() { @@ -411,7 +458,7 @@ signreleasefiles() { changetowebserver() { if which weborf > /dev/null; then weborf -xb aptarchive/ 2>&1 > /dev/null & - CURRENTTRAP="kill $(ps | grep weborf | sed -e 's#^[ ]*##' | cut -d' ' -f 1); $CURRENTTRAP" + CURRENTTRAP="kill $!; $CURRENTTRAP" trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM local APTARCHIVE="file://$(readlink -f ./aptarchive)" for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do diff --git a/test/integration/status-bug-601961-install-info b/test/integration/status-bug-601961-install-info new file mode 100644 index 000000000..c43cffab7 --- /dev/null +++ b/test/integration/status-bug-601961-install-info @@ -0,0 +1,42 @@ +Package: dpkg +Status: install ok installed +Essential: yes +Priority: required +Section: admin +Installed-Size: 6432 +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: i386 +Version: 1.15.8.5 +Description: Debian package management system + +Package: findutils +Status: install ok installed +Essential: yes +Priority: required +Section: utils +Installed-Size: 1704 +Maintainer: Andreas Metzler <ametzler@debian.org> +Architecture: i386 +Version: 4.4.2-1+b1 +Depends: dpkg (>= 1.15.4) | install-info, essentialpkg +Description: utilities for finding files--find, xargs + +Package: install-info +Status: install ok installed +Priority: important +Section: doc +Installed-Size: 256 +Maintainer: Debian TeX maintainers <debian-tex-maint@lists.debian.org> +Architecture: i386 +Version: 4.13a.dfsg.1-6 +Description: Manage installed documentation in info format + +Package: essentialpkg +Status: install ok installed +Priority: important +Section: other +Installed-Size: 256 +Maintainer: Joe Sixpack <joe@example.org> +Architecture: i386 +Version: 4.13a.dfsg.1-6 +Description: ultra hypercool important package diff --git a/test/integration/status-bug-604222-new-and-autoremove b/test/integration/status-bug-604222-new-and-autoremove new file mode 100644 index 000000000..03cf4d307 --- /dev/null +++ b/test/integration/status-bug-604222-new-and-autoremove @@ -0,0 +1,10 @@ +Package: libvtk5.4 +Status: install ok installed +Priority: optional +Section: libs +Installed-Size: 39372 +Maintainer: A. Maitland Bottoms <bottoms@debian.org> +Architecture: i386 +Source: vtk +Version: 5.4.2-7 +Description: Visualization Toolkit - A high level 3D visualization library diff --git a/test/integration/test-bug-330162-encoded-tar-header b/test/integration/test-bug-330162-encoded-tar-header new file mode 100755 index 000000000..fa01e0379 --- /dev/null +++ b/test/integration/test-bug-330162-encoded-tar-header @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +msgtest 'Test apt-ftparchive with encoded tar header package' +cp $TESTDIR/deb-bug-330162-encoded-tar-header.deb aptarchive/ +test -z "$(aptftparchive packages aptarchive/ 2>&1 | grep 'E:')" && msgpass || msgfail diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names new file mode 100755 index 000000000..c12503b0d --- /dev/null +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -0,0 +1,64 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + g++ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst g++ (4:4.4.5-1 localhost [i386]) +Conf g++ (4:4.4.5-1 localhost [i386])' aptget install g++ -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + g++ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst g++ (4:4.4.5-1 localhost [i386]) +Conf g++ (4:4.4.5-1 localhost [i386])' aptget install g+++ -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + g++ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst g++ (4:4.4.5-1 localhost [i386]) +Conf g++ (4:4.4.5-1 localhost [i386])' aptget purge g+++ -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + apt +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt (0.8.8 localhost [all]) +Conf apt (0.8.8 localhost [all])' aptget install apt -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + apt+ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + apt+ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s + +testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + apt+ +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget purge apt++ -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 11a5025d2..66792899a 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -7,6 +7,7 @@ setupenvironment configarchitecture "i386" buildaptarchive +touch aptarchive/Packages setupflataptarchive testaptgetupdate() { diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info new file mode 100755 index 000000000..b91bf3615 --- /dev/null +++ b/test/integration/test-bug-601961-install-info @@ -0,0 +1,38 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + findutils +WARNING: The following essential packages will be removed. +This should NOT be done unless you know exactly what you are doing! + findutils +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +After this operation, 1745 kB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget remove findutils --trivial-only + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + install-info +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +After this operation, 262 kB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget remove install-info --trivial-only + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + essentialpkg findutils +WARNING: The following essential packages will be removed. +This should NOT be done unless you know exactly what you are doing! + findutils essentialpkg (due to findutils) +0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. +After this operation, 2007 kB disk space will be freed. +E: Trivial Only specified but this is not a trivial operation.' aptget remove essentialpkg --trivial-only diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove new file mode 100755 index 000000000..fa6dcdc70 --- /dev/null +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -0,0 +1,66 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +echo 'Package: libvtk5.4 +Auto-Installed: 1 +Architecture: i386' > rootdir/var/lib/apt/extended_states + +testequal "Reading package lists... +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. +The following NEW packages will be installed: + libavcodec52 +0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. +Inst libavcodec52 (4:0.5.2-6 localhost [i386]) +Conf libavcodec52 (4:0.5.2-6 localhost [i386])" aptget install libavcodec52 -s + +testequal "Reading package lists... +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. +The following extra packages will be installed: + libavcodec52 libopenal-dev libvtk5.4 +The following NEW packages will be installed: + dummy-archive libavcodec52 libopenal-dev +The following packages will be upgraded: + libvtk5.4 +1 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. +Need to get 0 B/19.4 MB of archives. +After this operation, 17.3 MB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install dummy-archive --trivial-only + +echo -n > rootdir/var/lib/dpkg/status +rm rootdir/var/lib/apt/extended_states + +CONFLICTING='Reading package lists... +Building dependency tree... + MarkInstall dummy-archive [ i386 ] < none -> 0.invalid.0 > ( admin ) FU=1 + MarkInstall libavcodec52 [ i386 ] < none -> 4:0.5.2-6 > ( libs ) FU=0 + MarkInstall libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0 + MarkInstall libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=0 + MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0 + MarkKeep libvtk5-dev [ i386 ] < none -> 5.4.2-8 > ( libdevel ) FU=0 + MarkDelete libvtk5.4 [ i386 ] < none -> 5.4.2-8 > ( libs ) FU=1 +The following extra packages will be installed: + libavcodec52 libopenal-dev +The following NEW packages will be installed: + dummy-archive libavcodec52 libopenal-dev +0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. +Need to get 0 B/6304 kB of archives. +After this operation, 17.3 MB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation.' + +testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0 +testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1 +testequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small diff --git a/test/integration/test-bug-604401-files-are-directories b/test/integration/test-bug-604401-files-are-directories new file mode 100755 index 000000000..917fb106f --- /dev/null +++ b/test/integration/test-bug-604401-files-are-directories @@ -0,0 +1,66 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +test ! -e rootdir/etc/apt/apt.conf || mv rootdir/etc/apt/apt.conf rootdir/etc/apt/apt.conf.d/000move-away-apt.conf + +msgtest "Directory instead of a file as apt.conf ignored" +mkdir -p rootdir/etc/apt/apt.conf +aptconfig dump > /dev/null && msgpass || msgfail +rmdir rootdir/etc/apt/apt.conf + +msgtest "Good link instead of a file as apt.conf ignored" +echo 'Test::APT::Link "good";' > rootdir/etc/apt/good-link.conf +ln -s rootdir/etc/apt/good-link.conf rootdir/etc/apt/apt.conf +test -n "$(aptconfig shell TestLink 'Test::APT::Link')" && msgfail || msgpass +rm rootdir/etc/apt/apt.conf + +msgtest "Broken link instead of a file as apt.conf ignored" +ln -s /tmp/doesnt-exist rootdir/etc/apt/apt.conf +aptconfig dump > /dev/null && msgpass || msgfail +rm rootdir/etc/apt/apt.conf + + +test ! -e rootdir/etc/apt/sources.list || mv rootdir/etc/apt/sources.list rootdir/etc/apt/sources.list.d/000move-away-sources.list + +msgtest "Directory instead of a file as sources.list ignored" +mkdir -p rootdir/etc/apt/sources.list +aptget update --print-uris 2> /dev/null && msgpass || msgfail +rmdir rootdir/etc/apt/sources.list + +msgtest "Good link instead of a file as sources.list ignored" +echo 'deb file:///tmp/debian sid main' > rootdir/etc/apt/good-link.list +ln -s rootdir/etc/apt/good-link.list rootdir/etc/apt/sources.list +test -n "$(aptget update --print-uris)" && msgfail || msgpass +rm rootdir/etc/apt/sources.list + +msgtest "Broken link instead of a file as sources.list ignored" +ln -s /tmp/doesnt-exist rootdir/etc/apt/sources.list +test -n "$(aptget update --print-uris)" && msgfail || msgpass +rm rootdir/etc/apt/sources.list + + +test ! -e rootdir/etc/apt/preferences || mv rootdir/etc/apt/preferences rootdir/etc/apt/preferences.d/000move-away-preferences + +msgtest "Directory instead of a file as preferences ignored" +mkdir -p rootdir/etc/apt/preferences +aptcache policy > /dev/null 2> /dev/null && msgpass || msgfail +rmdir rootdir/etc/apt/preferences + +msgtest "Good link instead of a file as preferences ignored" +echo 'Package: apt +Pin: release a=now +Pin-Value: 1000' > rootdir/etc/apt/good-link.pref +ln -s rootdir/etc/apt/good-link.pref rootdir/etc/apt/preferences +test -n "$(aptcache policy | grep 1000)" && msgfail || msgpass +rm rootdir/etc/apt/preferences + +msgtest "Broken link instead of a file as preferences ignored" +ln -s /tmp/doesnt-exist rootdir/etc/apt/preferences +aptcache policy > /dev/null 2> /dev/null && msgpass || msgfail +rm rootdir/etc/apt/preferences diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching new file mode 100755 index 000000000..5736945ab --- /dev/null +++ b/test/integration/test-release-candidate-switching @@ -0,0 +1,419 @@ +#!/bin/sh +set -e + +local TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'libc6' 'i386' '2.11.2-7+sid' +insertpackage 'unstable' 'phonon-backend-xine' 'i386' '4:4.6.0really4.4.2-1+sid' 'Provides: phonon-backend' +insertpackage 'unstable' 'phonon-backend-xine2' 'i386' '4:4.6.0really4.4.2-1+sid' +insertpackage 'unstable' 'phonon-backend-xine3' 'i386' '4:4.6.0really4.4.2-1+sid' +insertpackage 'unstable' 'phonon-backend-xine4' 'i386' '4:4.6.0really4.4.2-1+sid' +insertpackage 'unstable' 'phonon-backend-null' 'i386' '4:4.20.0+sid' 'Provides: phonon-backend' +insertpackage 'unstable' 'intermediatepkg' 'all' '1.0' + +insertpackage 'unstable' 'amarok-common' 'all' '2.3.1-1+sid' +insertpackage 'unstable' 'amarok-utils' 'i386' '2.3.1-1+sid' +insertpackage 'unstable' 'libmtp8' 'i386' '0.3.1+sid' +insertpackage 'unstable' 'amarok' 'i386' '2.3.1-1+sid' 'Depends: amarok-common (= 2.3.1-1+sid), amarok-utils (= 2.3.1-1+sid), phonon-backend-xine | phonon-backend, libmtp8 (>= 0.3.1), libc6' + +insertpackage 'experimental' 'amarok-common' 'all' '2.3.2-2+exp' +insertpackage 'experimental' 'amarok-utils' 'i386' '2.3.2-2+exp' +insertpackage 'experimental' 'libmtp8' 'i386' '0.3.3+exp' +insertpackage 'experimental' 'phonon-backend-xine' 'i386' '5:4.6.0+exp' 'Provides: phonon-backend' +insertpackage 'experimental' 'phonon-backend-xine2' 'i386' '5:4.6.0+exp' 'Depends: uninstallablepkg +Provides: phonon-backend-broken' +insertpackage 'experimental' 'phonon-backend-xine3' 'i386' '5:4.6.0+exp' 'Depends: intermediatepkg (>= 1.5)' +insertpackage 'experimental' 'phonon-backend-xine4' 'i386' '5:4.6.0+exp' 'Depends: intermediateuninstallablepkg (= 2.0) +Provides: phonon-backend-broken' +insertpackage 'experimental' 'intermediatepkg' 'all' '2.0' 'Depends: libc6' +insertpackage 'experimental' 'intermediateuninstallablepkg' 'all' '2.0' 'Depends: uninstallablepkg' +insertpackage 'experimental' 'phonon-backend-null' 'i386' '5:4.20.0+exp' 'Provides: phonon-backend' +insertpackage 'experimental' 'amarok' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), amarok-utils (= 2.3.2-2+exp), phonon-backend-xine | phonon-backend, libmtp8 (>= 0.3.1), libc6' + +insertpackage 'experimental2' 'phonon-backend-xine' 'i386' '5:4.00.0+exp' 'Provides: phonon-backend' +insertpackage 'experimental2' 'amarok-less' 'i386' '2.3.2-2+exp' 'Depends: amarok-common, phonon-backend-xine (>= 5:4.00.0+exp), libmtp8, libc6, amarok-utils' +insertpackage 'experimental' 'amarok-higher' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine (>= 5:4.6.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' + +insertpackage 'experimental' 'amarok-null' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine (= 1:1.0-1) | phonon-backend, libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-null2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-null (= 1:1.0-1) | phonon-backend, libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-xine' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-xine2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine2 (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-xine3' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine3 (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-xine4' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine4 (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' +insertpackage 'experimental' 'amarok-broken' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-broken | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' + +insertpackage 'experimental' 'amarok-recommends' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp) +Recommends: amarok-utils (= 2.3.2-2+exp), phonon-backend-xine | phonon-backend, libmtp8 (>= 0.3.1), libc6' +insertpackage 'experimental' 'amarok-recommends2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp) +Recommends: amarok-utils (= 2.30.2-2+exp), phonon-backend-xine | phonon-backend, libmtp8 (>= 0.3.1), libc6' + +insertpackage 'experimental' 'uninstallablepkg' 'all' '1.0' 'Depends: libmtp8 (>= 10:0.20.1), amarok-utils (= 2.3.2-2+exp)' + +setupaptarchive + +testequal "Reading package lists... +Building dependency tree... +The following extra packages will be installed: + amarok-common (2.3.1-1+sid) + amarok-utils (2.3.1-1+sid) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +The following NEW packages will be installed: + amarok (2.3.1-1+sid) + amarok-common (2.3.1-1+sid) + amarok-utils (2.3.1-1+sid) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok --trivial-only -V -q=0 + +testequal "Reading package lists... +Building dependency tree... +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.3+exp) + phonon-backend-xine (4.6.0+exp) +The following NEW packages will be installed: + amarok (2.3.2-2+exp) + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.3+exp) + phonon-backend-xine (4.6.0+exp) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok -t experimental --trivial-only -V -q=0 + +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +The following NEW packages will be installed: + amarok (2.3.2-2+exp) + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental --trivial-only -V -q=0 + +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+sid) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-null (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+sid) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null/experimental --trivial-only -V -q=0 + +# do not select the same version multiple times +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +The following NEW packages will be installed: + amarok (2.3.2-2+exp) + amarok-common (2.3.2-2+exp) + amarok-null (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. +After this operation, 301 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental amarok-null/experimental --trivial-only -V -q=0 + +# … but thighten the version if needed +# in theory, the second line is wrong, but printing the right version is too much of a hassle +# (we have to check if later in the Changed list is another change and if so use this version +# instead of the current candidate) - and it wouldn't be (really) useful anyway… +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental2 [i386]) for 'amarok-less' +Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-less' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-higher' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-higher' +Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-higher' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-higher' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0+exp) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-higher (2.3.2-2+exp) + amarok-less (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0+exp) +0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. +After this operation, 301 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-less/experimental2 amarok-higher/experimental --trivial-only -V -q=0 + +# phonon-backend-null can't be used directly, but as it provides it is still fine… +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null2' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null2' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+sid) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-null2 (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+sid) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null2/experimental --trivial-only -V -q=0 + +# if an or-group satisfier is already found, do not set others +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine' +Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-xine' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0+exp) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + amarok-xine (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0+exp) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine/experimental --trivial-only -V -q=0 + +# … but proceed testing if the first doesn't work out +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine2' +Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine2' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine2' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + amarok-xine2 (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine2/experimental --trivial-only -V -q=0 + +# sometimes, the second level need to be corrected, too +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine3' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine3' +Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine3' because of 'amarok-xine3' +Selected version '2.0' (experimental [all]) for 'intermediatepkg' because of 'phonon-backend-xine3' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine3' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + intermediatepkg (2.0) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine3 (4.6.0+exp) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + amarok-xine3 (2.3.2-2+exp) + intermediatepkg (2.0) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine3 (4.6.0+exp) +0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. +After this operation, 301 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine3/experimental --trivial-only -V -q=0 + +# … but proceed testing if the first doesn't work out even in second deep +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine4' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine4' +Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine4' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine4' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + amarok-xine4 (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine4/experimental --trivial-only -V -q=0 + +# providers can be broken, too +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-broken' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-broken' +Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-broken' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-broken' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +The following NEW packages will be installed: + amarok-broken (2.3.2-2+exp) + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-null (4.20.0+exp) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-broken/experimental --trivial-only -V -q=0 + +# switch the candidate for recommends too if they should be installed +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-recommends' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-recommends (2.3.2-2+exp) + amarok-utils (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. +After this operation, 258 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=1 + +# … or not if not +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) +Recommended packages: + amarok-utils (2.3.1-1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) + phonon-backend () + libmtp8 (0.3.1+sid) + libc6 (2.11.2-7+sid) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-recommends (2.3.2-2+exp) +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +After this operation, 86.0 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=0 + +# but broken recommends are not the end of the world +# FIXME: the version output for recommend packages is a bit strange… but what would be better? +testequal "Reading package lists... +Building dependency tree... +Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends2' +The following extra packages will be installed: + amarok-common (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +Recommended packages: + amarok-utils (2.3.1-1+sid) +The following NEW packages will be installed: + amarok-common (2.3.2-2+exp) + amarok-recommends2 (2.3.2-2+exp) + libc6 (2.11.2-7+sid) + libmtp8 (0.3.1+sid) + phonon-backend-xine (4.6.0really4.4.2-1+sid) +0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. +After this operation, 215 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends2/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=1 + +# if one depends doesn't work, we don't need to look deeper… +testequal "Reading package lists... +Building dependency tree... +Selected version '1.0' (experimental [all]) for 'uninstallablepkg' +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: + 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 |