From c355ea30383486e74635cd0248d3b53ed9759c39 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Nov 2014 18:04:29 +0100 Subject: reenable patchsize limit option for pdiffs One word: "doh!" Commit f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d disabled the check to prevent apt from downloading bigger patches than the index it tries to patch. Happens rarly of course, but still. Detected by scan-build complaining about a dead assignment. To make up for the mistake a test is included as well. --- test/integration/test-pdiff-usage | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'test/integration/test-pdiff-usage') diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 5bad90214..d773dcd66 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -180,6 +180,40 @@ SHA256-Patches: testnopackage oldstuff testequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff + + msgmsg "Testcase: pdiff patch bigger than index itself: $*" + rm -rf rootdir/var/lib/apt/lists + cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists + cp ${PKGFILE}-new aptarchive/Packages + compressfile 'aptarchive/Packages' + mkdir -p aptarchive/Packages.diff + PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" + diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true + cat $PATCHFILE | gzip > ${PATCHFILE}.gz + PATCHINDEX='aptarchive/Packages.diff/Index' + echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) +SHA1-History: + 9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28 + $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE) +SHA1-Patches: + 7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28 + $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE) +SHA256-Current: $(sha256sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) +SHA256-History: + 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28 + $(sha256sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE) +SHA256-Patches: + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 + $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE)" > $PATCHINDEX + generatereleasefiles '+1hour' + signreleasefiles + #find aptarchive -name 'Packages*' -type f -delete + testsuccess aptget update -o Debug::pkgAcquire::Diffs=1 "$@" + cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output + testsuccess grep 'bytes (Limit is' rootdir/tmp/aptgetupdate.output + testnopackage oldstuff + testequal "$(cat ${PKGFILE}-new) +" aptcache show apt newstuff } echo 'Debug::pkgAcquire::Diffs "true"; Debug::Acquire::Transaction "true"; -- cgit v1.2.3-70-g09d2 From 25b86db159fbc3c043628e285c0c1ef24dec2c6e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Mar 2015 00:59:44 +0100 Subject: test exitcode as well as string equality We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore --- test/integration/framework | 24 +++++- .../test-allow-scores-for-all-dependency-types | 22 +++--- .../test-apt-bug-718329-support-data.tar | 34 --------- test/integration/test-apt-by-hash-update | 4 +- test/integration/test-apt-cache | 32 ++++---- test/integration/test-apt-cdrom | 18 ++--- test/integration/test-apt-cli-list | 21 +++--- test/integration/test-apt-cli-search | 26 +++---- test/integration/test-apt-cli-show | 2 +- test/integration/test-apt-cli-update | 6 +- test/integration/test-apt-cli-upgrade | 6 +- test/integration/test-apt-config | 24 +++--- test/integration/test-apt-extracttemplates | 2 +- test/integration/test-apt-ftparchive-cachedb | 12 +-- .../test-apt-ftparchive-cachedb-lp1274466 | 2 +- test/integration/test-apt-ftparchive-src-cachedb | 2 +- test/integration/test-apt-get-autoremove | 6 +- test/integration/test-apt-get-build-dep | 6 +- test/integration/test-apt-get-changelog | 4 +- test/integration/test-apt-get-install-deb | 2 +- test/integration/test-apt-get-source | 18 ++--- test/integration/test-apt-get-source-arch | 16 ++-- test/integration/test-apt-get-source-multisources | 4 +- .../integration/test-apt-get-update-unauth-warning | 8 +- test/integration/test-apt-get-upgrade | 6 +- test/integration/test-apt-helper | 14 ++-- test/integration/test-apt-key | 4 +- test/integration/test-apt-key-net-update | 4 +- test/integration/test-apt-mark | 36 ++++----- test/integration/test-apt-progress-fd | 20 ++--- test/integration/test-apt-progress-fd-deb822 | 5 +- .../test-apt-translation-has-no-packages | 4 +- test/integration/test-apt-update-expected-size | 2 +- test/integration/test-apt-update-nofallback | 12 +-- test/integration/test-apt-update-rollback | 20 ++--- test/integration/test-apt-update-stale | 2 +- .../test-architecture-specification-parsing | 20 ++--- test/integration/test-authentication-basic | 2 +- .../test-bug-470115-new-and-tighten-recommends | 20 ++--- .../test-bug-507998-dist-upgrade-recommends | 2 +- .../test-bug-543966-downgrade-below-1000-pin | 10 +-- ...est-bug-549968-install-depends-of-not-installed | 2 +- .../test-bug-590041-prefer-non-virtual-packages | 8 +- ...g-590438-broken-provides-thanks-to-remove-order | 2 +- test/integration/test-bug-591882-conkeror | 4 +- .../integration/test-bug-593360-modifiers-in-names | 16 ++-- .../test-bug-596498-trusted-unsigned-repo | 12 +-- ...test-bug-598669-install-postfix-gets-exim-heavy | 2 +- test/integration/test-bug-601961-install-info | 6 +- test/integration/test-bug-602412-dequote-redirect | 2 +- .../integration/test-bug-604222-new-and-autoremove | 10 +-- .../test-bug-605394-versioned-or-groups | 2 +- test/integration/test-bug-611729-mark-as-manual | 6 +- .../test-bug-612099-multiarch-conflicts | 30 ++++---- test/integration/test-bug-612557-garbage-upgrade | 6 +- .../test-bug-613420-new-garbage-dependency | 2 +- .../test-bug-618848-always-respect-user-requests | 2 +- .../test-bug-624218-Translation-file-handling | 17 ++--- .../test-bug-632221-cross-dependency-satisfaction | 30 ++++---- ...test-bug-64141-install-dependencies-for-on-hold | 4 +- .../test-bug-657695-resolver-breaks-on-virtuals | 2 +- .../test-bug-661537-build-profiles-support | 8 +- .../test-bug-675449-essential-are-protected | 10 +-- .../test-bug-679371-apt-get-autoclean-multiarch | 2 +- .../test-bug-680041-apt-mark-holds-correctly | 20 ++--- .../test-bug-683786-build-dep-on-virtual-packages | 18 ++--- .../test-bug-686346-package-missing-architecture | 10 +-- .../test-bug-689582-100-char-long-path-names | 2 +- .../test-bug-691453-apt-cache-search-multi-pattern | 12 +-- .../test-bug-709560-set-candidate-release | 2 +- .../test-bug-712435-missing-descriptions | 18 ++--- .../test-bug-717891-abolute-uris-for-proxies | 2 +- .../test-bug-718329-support-data.tar-uncompressed | 31 ++++++++ ...st-bug-719263-print-uris-removes-authentication | 2 +- test/integration/test-bug-720597-build-dep-purge | 4 +- .../test-bug-722207-print-uris-even-if-very-quiet | 14 ++-- .../test-bug-723586-any-stripped-in-single-arch | 10 +-- test/integration/test-bug-728500-tempdir | 2 +- test/integration/test-bug-732746-preferences | 2 +- .../test-bug-735967-lib32-to-i386-unavailable | 8 +- test/integration/test-bug-738785-switch-protocol | 4 +- .../test-bug-745036-new-foreign-invalidates-cache | 2 +- .../test-bug-745046-candidate-propagation-fails | 4 +- test/integration/test-bug-753297-upgradable | 4 +- .../test-bug-758153-versioned-provides-support | 88 +++++++++++++++++++--- test/integration/test-bug-770291-reinstall | 8 +- test/integration/test-bug-multiarch-upgrade | 2 +- .../test-cachecontainer-architecture-specification | 32 ++++---- test/integration/test-compressed-indexes | 26 +++---- test/integration/test-conflicts-loop | 2 +- .../integration/test-conflicts-real-multiarch-same | 6 +- .../test-cve-2013-1051-InRelease-parsing | 8 +- test/integration/test-essential-force-loopbreak | 2 +- .../test-external-dependency-solver-protocol | 8 +- test/integration/test-handling-broken-orgroups | 14 ++-- .../test-ignore-provides-if-versioned-breaks | 18 ++--- .../test-ignore-provides-if-versioned-conflicts | 18 ++--- .../test-implicit-conflicts-real-not-virtual | 8 +- test/integration/test-kernel-helper-autoremove | 6 +- test/integration/test-multiarch-foreign | 24 +++--- .../test-ordering-ignore-not-matching-breaks | 8 +- test/integration/test-package-reinstallation | 2 +- test/integration/test-pdiff-usage | 12 +-- test/integration/test-pin-non-existent-package | 12 +-- test/integration/test-policy-pinning | 4 +- .../test-prefer-higher-priority-providers | 14 ++-- ...prefer-native-architecture-over-higher-priority | 2 +- ...prevent-markinstall-multiarch-same-versionscrew | 6 +- test/integration/test-provides-gone-with-upgrade | 2 +- test/integration/test-release-candidate-switching | 32 ++++---- test/integration/test-releasefile-verification | 30 ++++---- .../test-resolve-by-keep-new-recommends | 2 +- test/integration/test-sourceslist-trusted-options | 4 +- .../test-specific-architecture-dependencies | 30 ++++---- .../test-suggest-installed-multiarch-silbing | 16 ++-- .../test-ubuntu-bug-1098738-apt-get-source-md5sum | 20 ++--- ...u-bug-1130419-prefer-installed-ma-same-siblings | 12 +-- ...t-ubuntu-bug-1304403-obsolete-priority-standard | 4 +- test/integration/test-ubuntu-bug-614993 | 2 +- .../test-ubuntu-bug-761175-remove-purge | 4 +- ...st-ubuntu-bug-784473-InRelease-one-message-only | 2 +- .../test-ubuntu-bug-802901-multiarch-early-remove | 2 +- .../test-ubuntu-bug-806274-install-suggests | 8 +- .../test-ubuntu-bug-859188-multiarch-reinstall | 8 +- ...ubuntu-bug-985852-pre-depends-or-group-ordering | 2 +- .../test-unpack-different-version-unpacked | 14 ++-- test/integration/test-xorg-break-providers | 6 +- 127 files changed, 725 insertions(+), 645 deletions(-) delete mode 100755 test/integration/test-apt-bug-718329-support-data.tar create mode 100755 test/integration/test-bug-718329-support-data.tar-uncompressed (limited to 'test/integration/test-pdiff-usage') diff --git a/test/integration/framework b/test/integration/framework index 5f13df1c0..ec23e41e6 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1338,7 +1338,7 @@ testwarning() { else msgtest 'Test for successful execution with warnings of' "$*" fi - local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" + local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarning.output" if "$@" >${OUTPUT} 2>&1; then if expr match "$1" '^apt.*' >/dev/null; then if grep -q -E ' runtime error: ' "$OUTPUT"; then @@ -1388,6 +1388,26 @@ testfailure() { aptautotest 'testfailure' "$@" } +testsuccessequal() { + local CMP="$1" + shift + testsuccess "$@" + testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" "$CMP" +} +testwarningequal() { + local CMP="$1" + shift + testwarning "$@" + testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarning.output" "$CMP" +} +testfailureequal() { + local CMP="$1" + shift + testfailure "$@" + testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" "$CMP" +} + + testfilestats() { msgtest "Test that file $1 has $2 $3" "$4" if [ "$4" "$3" "$(stat --format "$2" "$1")" ]; then @@ -1493,7 +1513,7 @@ aptautotest_apt_update() { aptautotest_aptget_update "$@"; } testaptautotestnodpkgwarning() { local TESTCALL="$1" while [ -n "$2" ]; do - if [ "$2" = '-s' ]; then return; fi + if expr match "$2" '^-[a-z]*s' >/dev/null 2>&1; then return; fi shift done testfailure grep '^dpkg: warning:.*ignor.*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output" diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types index e1d805ce9..56cfc9a69 100755 --- a/test/integration/test-allow-scores-for-all-dependency-types +++ b/test/integration/test-allow-scores-for-all-dependency-types @@ -42,7 +42,7 @@ setupaptarchive insertinstalledpackage 'libdb-dev' 'amd64' '5.1.7' 'Depends: libdb5.1-dev' insertinstalledpackage 'libdb5.1-dev' 'amd64' '5.1.29-7' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -57,7 +57,7 @@ Inst libdb-dev [5.1.7] (5.3.0 unversioned [amd64]) [] Inst libdb5.3-dev (5.3.28-3 unversioned [amd64]) Conf libdb5.3-dev (5.3.28-3 unversioned [amd64]) Conf libdb-dev (5.3.0 unversioned [amd64])' aptget dist-upgrade -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -76,25 +76,25 @@ Conf libdb-dev (5.3.0 versioned [amd64])' aptget dist-upgrade -st versioned cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status insertinstalledpackage 'foo' 'amd64' '1' insertinstalledpackage 'bar' 'amd64' '1' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st versioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st multipleno -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -106,14 +106,14 @@ Remv foo [1] Inst bar [1] (2.2 multipleyes [amd64]) Conf bar (2.2 multipleyes [amd64])' aptget dist-upgrade -st multipleyes -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: baz 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Inst baz (2 unversioned [amd64]) Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -130,14 +130,14 @@ Inst baz (2 versioned [amd64]) Conf foo (2 versioned [amd64]) Conf baz (2 versioned [amd64])' aptget install baz -st versioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: baz 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Inst baz (2 unversioned [amd64]) Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -159,7 +159,7 @@ cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status insertinstalledpackage 'gdm3' 'amd64' '1' 'Depends: libaudit0, libaudit0' insertinstalledpackage 'login' 'amd64' '1' 'Essential: yes' insertinstalledpackage 'libaudit0' 'amd64' '1' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: diff --git a/test/integration/test-apt-bug-718329-support-data.tar b/test/integration/test-apt-bug-718329-support-data.tar deleted file mode 100755 index 5cfb31917..000000000 --- a/test/integration/test-apt-bug-718329-support-data.tar +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -set -e - -test_process_package_with_compression() { - COMPRESSOR="$1" - DATA_TAR="$2" - - msgtest "Testing apt-ftparchive with compression type: $COMPRESSOR" - - buildsimplenativepackage 'pkg' 'all' '1.0' '' '' 'some descr' '' '' '' "$COMPRESSOR" - testequal "debian-binary -control.tar.gz -$DATA_TAR" ar t incoming/pkg_1.0_all.deb - - testequal "Package: pkg" echo "$(aptftparchive packages incoming/|grep ^Package)" - - testequal "usr/bin/pkg-all pkg -usr/share/doc/pkg/FEATURES pkg -usr/share/doc/pkg/changelog pkg -usr/share/doc/pkg/copyright pkg" aptftparchive contents incoming/ - - rm -rf incoming/* -} - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework - -setupenvironment -test_process_package_with_compression "gzip" "data.tar.gz" -test_process_package_with_compression "none" "data.tar" -test_process_package_with_compression "xz" "data.tar.xz" - - - diff --git a/test/integration/test-apt-by-hash-update b/test/integration/test-apt-by-hash-update index d9d0b146f..8300c532c 100755 --- a/test/integration/test-apt-by-hash-update +++ b/test/integration/test-apt-by-hash-update @@ -29,7 +29,7 @@ mkdir -p aptarchive/dists/unstable/main/source/by-hash/SHA512 testfailure aptget upate # ensure we do not know about "foo" -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... E: Unable to locate package foo" aptget install -q -s foo @@ -37,7 +37,7 @@ E: Unable to locate package foo" aptget install -q -s foo testsuccess aptget update -o APT::Acquire::By-Hash=1 -o Acquire::Languages=none # ensure it works -testequal "Inst foo (1.0 unstable [all]) +testsuccessequal "Inst foo (1.0 unstable [all]) Conf foo (1.0 unstable [all])" aptget install -qq -s foo # add magic string to Release file ... diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache index f47c0e08b..f3db8024f 100755 --- a/test/integration/test-apt-cache +++ b/test/integration/test-apt-cache @@ -42,45 +42,45 @@ testsuccess aptcache dump cp rootdir/tmp/testsuccess.output dump.output testsuccess test -s dump.output -testequal 'dpkg +testsuccessequal 'dpkg bar fancy foo' aptcache pkgnames -testequal 'bar' aptcache pkgnames bar -testequal 'fancy +testsuccessequal 'bar' aptcache pkgnames bar +testsuccessequal 'fancy foo' aptcache pkgnames f -testequal " foo | 1 | file:$(readlink -f .)/aptarchive/ unstable/main amd64 Packages" aptcache madison foo +testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive/ unstable/main amd64 Packages" aptcache madison foo ### depends -testequal 'foo +testsuccessequal 'foo Depends: bar |Recommends: Recommends: Conflicts: Conflicts: ' aptcache depends foo -testequal 'foo +testsuccessequal 'foo Depends: bar Recommends: Conflicts: Conflicts: ' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 -testequal 'foo +testsuccessequal 'foo Depends: bar |Recommends: (>= 2) Recommends: (<< 5) Conflicts: Conflicts: ' aptcache depends foo -o APT::Cache::ShowVersion=1 -testequal 'foo +testsuccessequal 'foo Depends: bar Conflicts: Conflicts: ' aptcache depends foo --no-recommends -testequal 'foo +testsuccessequal 'foo Depends: bar' aptcache depends foo --important -testequal 'foo +testsuccessequal 'foo Conflicts: Conflicts: ' aptcache depends foo --important --no-depends --conflicts -testequal 'foo +testsuccessequal 'foo Depends: bar |Recommends: Recommends: @@ -97,7 +97,7 @@ bar ' aptcache depends foo --recurse -testequal 'foo +testsuccessequal 'foo Depends: bar bar Depends: bar @@ -107,18 +107,18 @@ bar ## rdpends -testequal 'foo +testsuccessequal 'foo Reverse Depends: bar bar' aptcache rdepends foo -testequal 'foo +testsuccessequal 'foo Reverse Depends: Replaces: bar Breaks: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -testequal 'foo +testsuccessequal 'foo Reverse Depends: Replaces: bar (<< 1) Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 -testequal 'foo +testsuccessequal 'foo Reverse Depends: Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom index 7f4b3c257..9906795ca 100755 --- a/test/integration/test-apt-cdrom +++ b/test/integration/test-apt-cdrom @@ -49,12 +49,12 @@ deb-src cdrom:[Debian APT Testdisk 0.8.15]/ stable main Unmounting CD-ROM... Repeat this process for the rest of the CDs in your set." -testequal "$CDROM_PRE +testsuccessequal "$CDROM_PRE Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures Found label 'Debian APT Testdisk 0.8.15' $CDROM_POST" aptcdromlog add -testequal "Using CD-ROM mount point $(readlink -f ./rootdir/media)/cdrom/ +testsuccessequal "Using CD-ROM mount point $(readlink -f ./rootdir/media)/cdrom/ Mounting CD-ROM... Stored label: Debian APT Testdisk 0.8.15 Unmounting CD-ROM..." aptcdromlog ident @@ -63,13 +63,13 @@ Unmounting CD-ROM..." aptcdromlog ident ident="$(LC_ALL=C aptcdrom ident 2>&1 )" CD_ID="$(echo "$ident" | grep "^Identifying" | head -n1 | cut -d" " -f2 | tr --delete '[]')" CD_LABEL="$(echo "$ident" | grep "^Stored label:" | head -n1 | sed "s/^[^:]*: //")" -testequal "CD::${CD_ID} \"${CD_LABEL}\"; -CD::${CD_ID}::Label \"${CD_LABEL}\";" cat rootdir/var/lib/apt/cdroms.list +testfileequal rootdir/var/lib/apt/cdroms.list "CD::${CD_ID} \"${CD_LABEL}\"; +CD::${CD_ID}::Label \"${CD_LABEL}\";" testcdromusage() { touch rootdir/var/lib/apt/extended_states - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -84,7 +84,7 @@ Conf testing (0.8.15 stable [amd64])' aptget install testing -s testsuccess aptget purge testing -y testdpkgnotinstalled testing - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -114,18 +114,18 @@ Conf testing:i386 (0.8.15 stable [i386])' aptget install testing:i386 -s testcdromusage # check Idempotence of apt-cdrom (and disabling of Translation dropping) -testequal "$CDROM_PRE +testsuccessequal "$CDROM_PRE Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures $CDROM_POST" aptcdromlog add -o APT::CDROM::DropTranslation=0 # take Translations from previous runs as needed -testequal "$CDROM_PRE +testsuccessequal "$CDROM_PRE Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures $CDROM_POST" aptcdromlog add msgtest 'Test for the german description translation of' 'testing' aptcache show testing -o Acquire::Languages=de | grep -q '^Description-de: ' && msgpass || msgfail rm -rf rootdir/var/lib/apt/lists -testequal "$CDROM_PRE +testsuccessequal "$CDROM_PRE Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures $CDROM_POST" aptcdromlog add msgtest 'Test for the english description translation of' 'testing' diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index 1487afd55..d3c44e126 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -27,50 +27,49 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) -testequal "Listing... +testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] baz/unstable 2.0 all [upgradable from: 0.1] foo/unstable 1.0 all foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list -testequal "Listing... +testsuccessequal "Listing... foo/unstable 1.0 all foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*" -testequal "Listing... +testsuccessequal "Listing... baz/unstable 2.0 all [upgradable from: 0.1] foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable # FIXME: hm, hm - does it make sense to have this different? shouldn't # we use "installed,upgradable" consitently? -testequal "Listing... +testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] baz/now 0.1 all [installed,upgradable to: 2.0] foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed -testequal "Listing... +testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] foobar/unstable 2.0 i386 [upgradable from: 1.0] foobar/now 1.0 i386 [installed,upgradable to: 2.0] " apt list bar foobar --all-versions -testequal "Listing... +testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] an autogenerated dummy bar=1.0/installed " apt list bar --verbose # test for dpkg ^rc state insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files' -testequal "Listing... +testsuccessequal "Listing... conf-only/now 1.0 i386 [residual-config]" apt list conf-only # ensure that the users learns about multiple versions too -testequal "Listing... +testsuccessequal "Listing... baz/unstable 2.0 all [upgradable from: 0.1] N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0 # test format strings for machine parseable output -apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}" > output.txt -testequal "bar - 1.0 - 1.0 -baz - 0.1 - 2.0" cat output.txt +testsuccessequal 'bar - 1.0 - 1.0 +baz - 0.1 - 2.0' apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}" diff --git a/test/integration/test-apt-cli-search b/test/integration/test-apt-cli-search index 1a28ba4da..e86661dcb 100755 --- a/test/integration/test-apt-cli-search +++ b/test/integration/test-apt-cli-search @@ -25,51 +25,51 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) -testequal 'E: You must give at least one search pattern' aptcache search -testequal 'E: You must give at least one search pattern' apt search +testfailureequal 'E: You must give at least one search pattern' aptcache search +testfailureequal 'E: You must give at least one search pattern' apt search # with OP progress -testequal "Sorting... +testsuccessequal "Sorting... Full Text Search... foo/unstable 1.0 all $DESCR " apt search xxyyzz # without op progress -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq xxyyzz testempty apt search -qq --names-only xxyyzz # search name -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq foo -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq --names-only foo # search with multiple words is a AND search -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq aabbcc xxyyzz -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq 'a+b+c+' 'i*xxy{0,2}zz' # search is not case-sensitive by default -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq uppercase -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq 'up[pP]erc[Aa]se' # search is done in the long description -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR " apt search -qq 'long description' -testequal "foo/unstable 1.0 all +testsuccessequal "foo/unstable 1.0 all $DESCR Long description of stuff and such, with lines . @@ -77,7 +77,7 @@ testequal "foo/unstable 1.0 all " apt search --full -qq 'long description' # output is sorted and search word finds both package -testequal "bar/testing 2.0 i386 +testsuccessequal "bar/testing 2.0 i386 $DESCR2 foo/unstable 1.0 all diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show index 930e591e0..5604620fd 100755 --- a/test/integration/test-apt-cli-show +++ b/test/integration/test-apt-cli-show @@ -24,7 +24,7 @@ APTARCHIVE=$(readlink -f ./aptarchive) # note that we do not display Description-md5 with the "apt" cmd # and also show some additional fields that are calculated -testequal "Package: foo +testsuccessequal "Package: foo Priority: optional Section: other Installed-Size: 43.0 kB diff --git a/test/integration/test-apt-cli-update b/test/integration/test-apt-cli-update index 83cc94b93..d68ab25e4 100755 --- a/test/integration/test-apt-cli-update +++ b/test/integration/test-apt-cli-update @@ -15,10 +15,10 @@ setupaptarchive --no-update APTARCHIVE=$(readlink -f ./aptarchive) -testequal 'E: The update command takes no arguments' apt update -q arguments +testfailureequal 'E: The update command takes no arguments' apt update -q arguments -testequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -q +testsuccessequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -q cp dpkg.status rootdir/var/lib/dpkg/status insertinstalledpackage 'foo' 'all' '2.0' -testequal 'All packages are up to date.' apt update -q +testsuccessequal 'All packages are up to date.' apt update -q diff --git a/test/integration/test-apt-cli-upgrade b/test/integration/test-apt-cli-upgrade index b6ee2270b..54f2ecd11 100755 --- a/test/integration/test-apt-cli-upgrade +++ b/test/integration/test-apt-cli-upgrade @@ -23,7 +23,7 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) # default is to allow new dependencies -testequal "The following NEW packages will be installed: +testsuccessequal "The following NEW packages will be installed: foo-new-dependency The following packages will be upgraded: foo @@ -33,7 +33,7 @@ Inst foo [1.0] (2.0 unstable [all]) Conf foo-new-dependency (2.0 unstable [all]) Conf foo (2.0 unstable [all])" apt upgrade -qq -s -# ensure -testequal "The following packages have been kept back: +# ensure the 'old' way works as well +testsuccessequal "The following packages have been kept back: foo 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs diff --git a/test/integration/test-apt-config b/test/integration/test-apt-config index 2f2ff9d38..2eea9a0f8 100755 --- a/test/integration/test-apt-config +++ b/test/integration/test-apt-config @@ -8,29 +8,29 @@ setupenvironment configarchitecture 'amd64' testsuccess aptconfig dump -testequal 'APT::Architecture "amd64";' aptconfig dump APT::Architecture +testsuccessequal 'APT::Architecture "amd64";' aptconfig dump APT::Architecture testempty aptconfig dump config::which::does::not::exist -testequal 'APT::Architectures ""; +testsuccessequal 'APT::Architectures ""; APT::Architectures:: "amd64";' aptconfig dump APT::Architectures -testequal 'APT::Architectures:: "amd64";' aptconfig dump --no-empty APT::Architectures -testequal 'amd64' aptconfig dump --no-empty --format='%v%n' APT::Architectures +testsuccessequal 'APT::Architectures:: "amd64";' aptconfig dump --no-empty APT::Architectures +testsuccessequal 'amd64' aptconfig dump --no-empty --format='%v%n' APT::Architectures testempty aptconfig shell -testequal 'E: Arguments not in pairs' aptconfig shell APT::Architecture +testfailureequal 'E: Arguments not in pairs' aptconfig shell APT::Architecture testempty aptconfig shell APT::Architecture ARCH # incorrect order -testequal "ARCH='amd64'" aptconfig shell ARCH APT::Architecture +testsuccessequal "ARCH='amd64'" aptconfig shell ARCH APT::Architecture ROOTDIR="$(readlink -f rootdir)" -testequal "CONFIG='apt.conf'" aptconfig shell CONFIG Dir::Etc::main -testequal "CONFIG='${ROOTDIR}/etc/apt/apt.conf'" aptconfig shell CONFIG Dir::Etc::main/f -testequal "CONFIG='etc/apt/'" aptconfig shell CONFIG Dir::Etc -testequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/ # old style -testequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/d +testsuccessequal "CONFIG='apt.conf'" aptconfig shell CONFIG Dir::Etc::main +testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/apt.conf'" aptconfig shell CONFIG Dir::Etc::main/f +testsuccessequal "CONFIG='etc/apt/'" aptconfig shell CONFIG Dir::Etc +testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/ # old style +testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/d testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles export DEB_BUILD_PROFILES='nodoc stage1' -testequal 'nodoc +testsuccessequal 'nodoc stage1' aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles unset DEB_BUILD_PROFILES testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles diff --git a/test/integration/test-apt-extracttemplates b/test/integration/test-apt-extracttemplates index 276862464..5dadc4933 100755 --- a/test/integration/test-apt-extracttemplates +++ b/test/integration/test-apt-extracttemplates @@ -35,7 +35,7 @@ Description: Some bar var OUT='rootdir/tmp/testsuccess.output' testequal "$1" cut -f1 -d' ' $OUT if [ -n "$2" ]; then - testequal '' cut -f2 -d' ' $OUT + testequal '' cut -s -f2 -d' ' $OUT else testequal '1.0' cut -f2 -d' ' $OUT fi diff --git a/test/integration/test-apt-ftparchive-cachedb b/test/integration/test-apt-ftparchive-cachedb index 866e5a469..3454ee36a 100755 --- a/test/integration/test-apt-ftparchive-cachedb +++ b/test/integration/test-apt-ftparchive-cachedb @@ -9,14 +9,14 @@ $(dpkg-deb -I ./aptarchive/pool/main/foo_1_i386.deb | grep 'Installed-Size:' | s Maintainer: Joe Sixpack Architecture: i386 Version: 1 -Filename: pool/main/foo_1_i386.deb" head -n8 ./aptarchive/dists/test/main/binary-i386/Packages +Filename: pool/main/foo_1_i386.deb" head -n8 ./aptarchive/dists/test/main/binary-i386/Packages } ensure_correct_contents_file() { - testequal "usr/bin/foo-i386 others/foo + testfileequal ./aptarchive/dists/test/Contents-i386 "usr/bin/foo-i386 others/foo usr/share/doc/foo/FEATURES others/foo usr/share/doc/foo/changelog others/foo -usr/share/doc/foo/copyright others/foo" cat ./aptarchive/dists/test/Contents-i386 +usr/share/doc/foo/copyright others/foo" } # @@ -99,8 +99,8 @@ testfileequal 'rootdir/tmp/testsuccess.output' ' Misses in Cache: 0 # and clean rm -rf aptarchive/pool/main/* -testequal "packages-main-i386.db" aptftparchive clean ftparchive.conf -q=0 +testsuccessequal "packages-main-i386.db" aptftparchive clean ftparchive.conf -q=0 testsuccess aptftparchive clean ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1 cp rootdir/tmp/testsuccess.output clean-out.txt -testequal "0 Number of unique keys in the tree" grep unique clean-out.txt -testequal "packages-main-i386.db" grep packages-main-i386.db clean-out.txt +testsuccessequal "0 Number of unique keys in the tree" grep unique clean-out.txt +testsuccessequal "packages-main-i386.db" grep packages-main-i386.db clean-out.txt diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466 index 579ae33a6..1f86e367f 100755 --- a/test/integration/test-apt-ftparchive-cachedb-lp1274466 +++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466 @@ -26,7 +26,7 @@ testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc testfailure grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump # regression test for corruption with previous generation of cachedb -testequal "Package: foo +testsuccessequal "Package: foo Priority: optional Section: others Installed-Size: 29 diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb index 28321e3c5..2a361ecc0 100755 --- a/test/integration/test-apt-ftparchive-src-cachedb +++ b/test/integration/test-apt-ftparchive-src-cachedb @@ -2,7 +2,7 @@ set -e assert_correct_sources_file() { - testequal "Package: bar + testsuccessequal "Package: bar Architecture: all Version: 1.0 Binary: bar diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove index acde4b096..a0e4d3c24 100755 --- a/test/integration/test-apt-get-autoremove +++ b/test/integration/test-apt-get-autoremove @@ -20,7 +20,7 @@ testdpkgnotinstalled 'debhelper' testdpkginstalled 'po-debconf' 'unrelated' echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -55,7 +55,7 @@ testdpkginstalled 'unrelated' 'debhelper' 'po-debconf' testsuccess aptmark auto debhelper testmarkedauto 'debhelper' 'po-debconf' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -65,7 +65,7 @@ Remv debhelper [8.0.0] Remv po-debconf [1.0.16]' aptget autoremove -s testsuccess aptmark hold debhelper -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget autoremove -s diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep index 87ec6e54d..f7af5b782 100755 --- a/test/integration/test-apt-get-build-dep +++ b/test/integration/test-apt-get-build-dep @@ -32,7 +32,7 @@ Files: 1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz EOF -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Note, using file '2vcard_0.5-3.dsc' to get the build dependencies The following NEW packages will be installed: @@ -75,7 +75,7 @@ z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc -----END PGP SIGNATURE----- EOF -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Note, using file '2vcard_0.5-3.dsc' to get the build dependencies The following NEW packages will be installed: @@ -117,7 +117,7 @@ Description: install packages using the apt protocol - common data EOF -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Note, using directory './foo-1.0' to get the build dependencies The following NEW packages will be installed: diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog index 01f2bd393..7e81c71b6 100755 --- a/test/integration/test-apt-get-changelog +++ b/test/integration/test-apt-get-changelog @@ -21,9 +21,9 @@ chmod -R -w rootdir/var/cache/apt/archives echo 'Apt::Changelogs::Server "http://localhost:8080/";' > rootdir/etc/apt/apt.conf.d/changelog.conf -testequal "'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt --print-uris +testsuccessequal "'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt --print-uris -testequal "'http://localhost:8080/pool/apt_1.0/changelog' +testsuccessequal "'http://localhost:8080/pool/apt_1.0/changelog' 'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris cd downloaded diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index f2e5229cd..0f34692fe 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -8,7 +8,7 @@ setupenvironment configarchitecture "i386" # regression test for #754904 -testequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null +testfailureequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null # and ensure we fail for invalid debs cat > foo.deb < rootdir/etc/apt/apt.conf.d/02proxy-detect - testequal "Using proxy 'http://some-proxy' for URL 'http://www.example.com/'" apthelper auto-detect-proxy http://www.example.com + testsuccessequal "Using proxy 'http://some-proxy' for URL 'http://www.example.com/'" apthelper auto-detect-proxy http://www.example.com # https auto detect proxy script @@ -66,14 +66,14 @@ EOF chmod 755 apt-proxy-detect echo "Acquire::https::Proxy-Auto-Detect \"$(pwd)/apt-proxy-detect\";" > rootdir/etc/apt/apt.conf.d/02proxy-detect - testequal "Using proxy 'https://https-proxy' for URL 'https://ssl.example.com/'" apthelper auto-detect-proxy https://ssl.example.com + testsuccessequal "Using proxy 'https://https-proxy' for URL 'https://ssl.example.com/'" apthelper auto-detect-proxy https://ssl.example.com } test_apt_helper_download test_apt_helper_detect_proxy # test failure modes -testequal 'E: Invalid operation download' apthelper download -testequal 'E: Must specify at least one pair url/filename' apthelper download-file -testequal 'E: Must specify at least one pair url/filename' apthelper download-file http://example.org/ -testequal 'E: Need one URL as argument' apthelper auto-detect-proxy +testfailureequal 'E: Invalid operation download' apthelper download +testfailureequal 'E: Must specify at least one pair url/filename' apthelper download-file +testfailureequal 'E: Must specify at least one pair url/filename' apthelper download-file http://example.org/ +testfailureequal 'E: Need one URL as argument' apthelper auto-detect-proxy diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key index b6b7b7909..989fe658c 100755 --- a/test/integration/test-apt-key +++ b/test/integration/test-apt-key @@ -17,7 +17,7 @@ testaptkeys() { if ! aptkey list | grep '^pub' > aptkey.list; then echo -n > aptkey.list fi - testequal "$1" cat ./aptkey.list + testfileequal './aptkey.list' "$1" } echo 'APT::Key::ArchiveKeyring "./keys/joesixpack.pub"; @@ -35,7 +35,7 @@ testrun() { testaptkeys 'pub 2048R/DBAC8DAE 2010-08-18' - testequal 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) " not changed + testsuccessequal 'gpg: key DBAC8DAE: "Joe Sixpack (APT Testcases Dummy) " not changed gpg: Total number processed: 1 gpg: unchanged: 1' aptkey --fakeroot update diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update index b3c118555..2a0823bec 100755 --- a/test/integration/test-apt-key-net-update +++ b/test/integration/test-apt-key-net-update @@ -23,7 +23,7 @@ echo 'APT::Key::ArchiveKeyringURI "http://localhost:8080/ubuntu/project/test-arc echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf # test against the "real" webserver -testequal 'Checking for new archive signing keys now +testsuccessequal 'Checking for new archive signing keys now gpg: key F68C85A3: public key "Test Automatic Archive Signing Key " imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)' aptkey --fakeroot net-update @@ -40,7 +40,7 @@ echo 'APT::Key::ArchiveKeyringURI "http://localhost:8080/ubuntu/project/marvinpa echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf # test against the "real" webserver -testequal "Checking for new archive signing keys now +testsuccessequal "Checking for new archive signing keys now Key 'DE66AECA9151AFA1877EC31DE8525D47528144E2' not added. It is not signed with a master key" aptkey --fakeroot net-update aptkey list | grep '^pub' > aptkey.list diff --git a/test/integration/test-apt-mark b/test/integration/test-apt-mark index 5a3ae4b2f..9b68945f9 100755 --- a/test/integration/test-apt-mark +++ b/test/integration/test-apt-mark @@ -21,20 +21,20 @@ testdpkginstalled dpkg testnoautopkg() { testempty aptmark showauto testempty aptcache showauto - testequal 'bar + testsuccessequal 'bar dpkg foo' aptmark showmanual - testequal 'bar + testsuccessequal 'bar foo' aptmark showmanual bar foo uninstalled } testfooisauto() { - testequal 'foo' aptmark showauto - testequal 'foo' aptcache showauto - testequal 'foo' aptmark showauto foo - testequal 'foo' aptcache showauto foo - testequal 'bar + testsuccessequal 'foo' aptmark showauto + testsuccessequal 'foo' aptcache showauto + testsuccessequal 'foo' aptmark showauto foo + testsuccessequal 'foo' aptcache showauto foo + testsuccessequal 'bar dpkg' aptmark showmanual - testequal 'bar' aptmark showmanual bar + testsuccessequal 'bar' aptmark showmanual bar } testmarkonpkgasauto() { testsuccess $1 $2 foo @@ -48,8 +48,8 @@ testmarkonpkgasauto() { testnoautopkg } -testequal 'E: No packages found' aptmark auto -testequal 'E: No packages found' aptmark manual +testfailureequal 'E: No packages found' aptmark auto +testfailureequal 'E: No packages found' aptmark manual testnoautopkg testmarkonpkgasauto 'aptmark' 'auto' 'manual' @@ -63,10 +63,10 @@ testnoholdpkg() { testempty aptmark showholds dpkg } testpkgonhold() { - testequal "$1" aptmark showhold - testequal "$1" aptmark showholds - testequal "$1" aptmark showhold $1 - testequal "$1" aptmark showholds $1 + testsuccessequal "$1" aptmark showhold + testsuccessequal "$1" aptmark showholds + testsuccessequal "$1" aptmark showhold $1 + testsuccessequal "$1" aptmark showholds $1 } testmarkonepkgashold() { testsuccess aptmark hold $1 @@ -79,8 +79,8 @@ testmarkonepkgashold() { testnoholdpkg } -testequal 'E: No packages found' aptmark hold -testequal 'E: No packages found' aptmark unhold +testfailureequal 'E: No packages found' aptmark hold +testfailureequal 'E: No packages found' aptmark unhold testnoholdpkg testmarkonepkgashold 'foo' @@ -97,5 +97,5 @@ fi testmarkonepkgashold 'uninstalled' testmarkonepkgashold 'uninstalled-native' -testequal 'uninstalled set on hold.' aptmark hold uninstalled -testequal 'uninstalled-native set on hold.' aptmark hold uninstalled-native +testsuccessequal 'uninstalled set on hold.' aptmark hold uninstalled +testsuccessequal 'uninstalled-native set on hold.' aptmark hold uninstalled-native diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd index 90e6ef7e4..0c11aba7e 100755 --- a/test/integration/test-apt-progress-fd +++ b/test/integration/test-apt-progress-fd @@ -15,7 +15,7 @@ setupaptarchive # install native exec 3> apt-progress.log testsuccess aptget install testing=0.1 -y -o APT::Status-Fd=3 -testequal "dlstatus:1:0:Retrieving file 1 of 1 +testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1 dlstatus:1:20:Retrieving file 1 of 1 pmstatus:dpkg-exec:0:Running dpkg pmstatus:testing:0:Installing testing (amd64) @@ -26,12 +26,12 @@ pmstatus:dpkg-exec:50:Running dpkg pmstatus:testing:50:Configuring testing (amd64) pmstatus:testing:66.6667:Configuring testing (amd64) pmstatus:testing:83.3333:Installed testing (amd64) -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log +pmstatus:dpkg-exec:83.3333:Running dpkg' # upgrade exec 3> apt-progress.log testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3 -testequal "dlstatus:1:0:Retrieving file 1 of 1 +testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1 dlstatus:1:20:Retrieving file 1 of 1 pmstatus:dpkg-exec:0:Running dpkg pmstatus:testing:0:Installing testing (amd64) @@ -42,12 +42,12 @@ pmstatus:dpkg-exec:50:Running dpkg pmstatus:testing:50:Configuring testing (amd64) pmstatus:testing:66.6667:Configuring testing (amd64) pmstatus:testing:83.3333:Installed testing (amd64) -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log +pmstatus:dpkg-exec:83.3333:Running dpkg' # reinstall exec 3> apt-progress.log testsuccess aptget install testing=0.8.15 --reinstall -y -o APT::Status-Fd=3 -testequal "dlstatus:1:0:Retrieving file 1 of 1 +testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1 dlstatus:1:20:Retrieving file 1 of 1 pmstatus:dpkg-exec:0:Running dpkg pmstatus:testing:0:Installing testing (amd64) @@ -58,24 +58,24 @@ pmstatus:dpkg-exec:50:Running dpkg pmstatus:testing:50:Configuring testing (amd64) pmstatus:testing:66.6667:Configuring testing (amd64) pmstatus:testing:83.3333:Installed testing (amd64) -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log +pmstatus:dpkg-exec:83.3333:Running dpkg' # and remove exec 3> apt-progress.log testsuccess aptget remove testing -y -o APT::Status-Fd=3 -testequal "pmstatus:dpkg-exec:0:Running dpkg +testfileequal './apt-progress.log' 'pmstatus:dpkg-exec:0:Running dpkg pmstatus:testing:0:Removing testing (amd64) pmstatus:testing:25:Preparing for removal of testing (amd64) pmstatus:testing:50:Removing testing (amd64) pmstatus:testing:75:Removed testing (amd64) -pmstatus:dpkg-exec:75:Running dpkg" cat apt-progress.log +pmstatus:dpkg-exec:75:Running dpkg' # install non-native and ensure we get proper progress info exec 3> apt-progress.log testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3 # and compare -testequal "dlstatus:1:0:Retrieving file 1 of 1 +testfileequal './apt-progress.log' 'dlstatus:1:0:Retrieving file 1 of 1 dlstatus:1:20:Retrieving file 1 of 1 pmstatus:dpkg-exec:0:Running dpkg pmstatus:testing2:0:Installing testing2 (i386) @@ -86,6 +86,6 @@ pmstatus:dpkg-exec:50:Running dpkg pmstatus:testing2:50:Configuring testing2 (i386) pmstatus:testing2:66.6667:Configuring testing2 (i386) pmstatus:testing2:83.3333:Installed testing2 (i386) -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log +pmstatus:dpkg-exec:83.3333:Running dpkg' rm -f apt-progress*.log diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822 index badc985e4..ca7f14cb9 100755 --- a/test/integration/test-apt-progress-fd-deb822 +++ b/test/integration/test-apt-progress-fd-deb822 @@ -16,7 +16,7 @@ setupaptarchive exec 3> apt-progress.log testsuccess aptget install testing=0.1 -y -o APT::Status-deb822-Fd=3 -testequal "Status: progress +testfileequal './apt-progress.log' 'Status: progress Percent: 0 Message: Running dpkg @@ -62,7 +62,6 @@ Message: Installed testing (amd64) Status: progress Percent: 83.3333 Message: Running dpkg -" cat apt-progress.log - +' rm -f apt-progress*.log diff --git a/test/integration/test-apt-translation-has-no-packages b/test/integration/test-apt-translation-has-no-packages index bb2353a33..440fd30cf 100755 --- a/test/integration/test-apt-translation-has-no-packages +++ b/test/integration/test-apt-translation-has-no-packages @@ -17,7 +17,7 @@ configarchitecture "amd64" if [ ! -x ${BUILDDIRECTORY}/apt ]; then msgmsg "No ${BUILDDIRECTORY}/apt" - msgskip + msgskip exit 0 fi @@ -33,7 +33,7 @@ cp $APTARCHIVE/dists/unstable/main/binary-amd64/Packages \ # ensure that there is no Version for the package foo generated out of # the corrupted Translation-en file -testequal "foo: +testsuccessequal "foo: Installed: (none) Candidate: 1.0 Version table: diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 045217a77..9711c293a 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -39,6 +39,6 @@ find aptarchive -name 'Packages*' | while read pkg; do done NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)" rm -f rootdir/var/lib/apt/lists/localhost* -testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) +testfailureequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback index e82a976a6..71576de81 100755 --- a/test/integration/test-apt-update-nofallback +++ b/test/integration/test-apt-update-nofallback @@ -31,14 +31,14 @@ EOF assert_update_is_refused_and_last_good_state_used() { - testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq + testfailureequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq assert_repo_is_intact } assert_repo_is_intact() { - testequal "foo/unstable 2.0 all" apt list -q + testsuccessequal "foo/unstable 2.0 all" apt list -q testsuccess aptget install -y -s foo testfailure aptget install -y evil testsuccess aptget source foo --print-uris @@ -97,7 +97,7 @@ test_from_inrelease_to_unsigned_with_override() testwarning aptget update --allow-insecure-repositories \ -o Acquire::AllowDowngradeToInsecureRepositories=1 # but that the individual packages are still considered untrusted - testequal "WARNING: The following packages cannot be authenticated! + testfailureequal "WARNING: The following packages cannot be authenticated! evil E: There are problems and -y was used without --force-yes" aptget install -qq -y evil } @@ -149,7 +149,7 @@ test_subvert_inrelease() # replace InRelease with something else mv $APTARCHIVE/dists/unstable/Release $APTARCHIVE/dists/unstable/InRelease - testequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Does not start with a cleartext signature + testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease Does not start with a cleartext signature E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq @@ -169,7 +169,7 @@ test_inrelease_to_invalid_inrelease() sed -i 's/Codename.*/Codename: evil!'/ $APTARCHIVE/dists/unstable/InRelease inject_evil_package - testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) + testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) @@ -193,7 +193,7 @@ test_release_gpg_to_invalid_release_release_gpg() echo "Some evil data" >> $APTARCHIVE/dists/unstable/Release inject_evil_package - testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release.gpg: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) + testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release.gpg: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback index 9efc194a0..f4500b69d 100755 --- a/test/integration/test-apt-update-rollback +++ b/test/integration/test-apt-update-rollback @@ -38,7 +38,7 @@ start_with_good_inrelease() { create_fresh_archive testsuccess aptget update listcurrentlistsdirectory > lists.before - testequal "old/unstable 1.0 all" apt list -q + testsuccessequal "old/unstable 1.0 all" apt list -q } test_inrelease_to_new_inrelease() { @@ -47,7 +47,7 @@ test_inrelease_to_new_inrelease() { add_new_package '+1hour' testsuccess aptget update -o Debug::Acquire::Transaction=1 - testequal "new/unstable 1.0 all + testsuccessequal "new/unstable 1.0 all old/unstable 1.0 all" apt list -q } @@ -60,12 +60,12 @@ test_inrelease_to_broken_hash_reverts_all() { break_repository_sources_index '+1hour' # test the error condition - testequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/main/source/Sources Hash Sum mismatch + testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/main/source/Sources Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq # ensure that the Packages file is also rolled back testfileequal lists.before "$(listcurrentlistsdirectory)" - testequal "E: Unable to locate package new" aptget install new -s -qq + testfailureequal "E: Unable to locate package new" aptget install new -s -qq } test_inrelease_to_valid_release() { @@ -78,7 +78,7 @@ test_inrelease_to_valid_release() { rm $APTARCHIVE/dists/unstable/Release.gpg # update fails - testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq + testfailureequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq # test that security downgrade was not successful testfileequal lists.before "$(listcurrentlistsdirectory)" @@ -101,7 +101,7 @@ test_inrelease_to_release_reverts_all() { break_repository_sources_index '+1hour' # ensure error - testequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq # -o Debug::acquire::transaction=1 + testfailureequal "E: The repository 'file: unstable Release.gpg' is no longer signed." aptget update -qq # -o Debug::acquire::transaction=1 # ensure that the Packages file is also rolled back testfileequal lists.before "$(listcurrentlistsdirectory)" @@ -119,7 +119,7 @@ test_unauthenticated_to_invalid_inrelease() { testwarning aptget update --allow-insecure-repositories listcurrentlistsdirectory > lists.before - testequal "WARNING: The following packages cannot be authenticated! + testfailureequal "WARNING: The following packages cannot be authenticated! old E: There are problems and -y was used without --force-yes" aptget install -qq -y old @@ -127,13 +127,13 @@ E: There are problems and -y was used without --force-yes" aptget install -qq -y add_new_package '+1hour' break_repository_sources_index '+1hour' - testequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources Hash Sum mismatch + testfailureequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq testfileequal lists.before "$(listcurrentlistsdirectory)" testfailure ls rootdir/var/lib/apt/lists/*_InRelease - testequal "WARNING: The following packages cannot be authenticated! + testfailureequal "WARNING: The following packages cannot be authenticated! old E: There are problems and -y was used without --force-yes" aptget install -qq -y old } @@ -144,7 +144,7 @@ test_inrelease_to_unauth_inrelease() { signreleasefiles 'Marvin Paranoid' - testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2 + testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2 W: Failed to fetch file:$APTARCHIVE/dists/unstable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2 diff --git a/test/integration/test-apt-update-stale b/test/integration/test-apt-update-stale index 277aa5b09..05154641a 100755 --- a/test/integration/test-apt-update-stale +++ b/test/integration/test-apt-update-stale @@ -39,7 +39,7 @@ cp -p aptarchive/dists/unstable/main/binary-i386/saved/Packages* \ aptarchive/dists/unstable/main/binary-i386/ # ensure this raises an error -testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Hash Sum mismatch +testfailureequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq testfileequal lists.before "$(listcurrentlistsdirectory)" diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing index d1f6011de..f5a5b123e 100755 --- a/test/integration/test-architecture-specification-parsing +++ b/test/integration/test-architecture-specification-parsing @@ -26,7 +26,7 @@ insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' setupaptarchive -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -38,7 +38,7 @@ Inst pkg-arch-foo (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}]) Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: pkg-arch-no-foo @@ -46,7 +46,7 @@ The following NEW packages will be installed: Inst pkg-arch-no-foo (1.0 stable [${NATIVE}]) Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -58,7 +58,7 @@ Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}]) Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -70,7 +70,7 @@ Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}]) Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo @@ -78,11 +78,11 @@ The following NEW packages will be installed: Inst foo (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo @@ -90,7 +90,7 @@ The following NEW packages will be installed: Inst foo (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo @@ -98,13 +98,13 @@ The following NEW packages will be installed: Inst foo (1.0 stable [${NATIVE}]) Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s # this is not really testing APT - more that dpkg is in line with us configarchitecture 'amd64' 'armel' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: no-depends:armel diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic index 7e74726be..3a6897b59 100755 --- a/test/integration/test-authentication-basic +++ b/test/integration/test-authentication-basic @@ -38,7 +38,7 @@ testauthsuccess() { rm -rf rootdir/var/lib/apt/lists testsuccess aptget update - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends index 6bc22ea7b..0970e2f23 100755 --- a/test/integration/test-bug-470115-new-and-tighten-recommends +++ b/test/integration/test-bug-470115-new-and-tighten-recommends @@ -47,7 +47,7 @@ insertpackage 'unstable' 'now-satisfiable' 'all' '2' 'Recommends: cool (>= 2)' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -59,7 +59,7 @@ Inst tighten-cool [1] (2 unstable [all]) Conf cool (2 unstable [all]) Conf tighten-cool (2 unstable [all])' aptget install tighten-cool -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: stuff @@ -71,7 +71,7 @@ Inst tighten-coolorstuff [1] (2 unstable [all]) Conf stuff (2 unstable [all]) Conf tighten-coolorstuff (2 unstable [all])' aptget install tighten-coolorstuff -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -83,7 +83,7 @@ Inst tighten-coolorstuff2 [1] (2 unstable [all]) Conf cool (2 unstable [all]) Conf tighten-coolorstuff2 (2 unstable [all])' aptget install tighten-coolorstuff2 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -95,7 +95,7 @@ Inst newrec-cool [1] (2 unstable [all]) Conf cool (2 unstable [all]) Conf newrec-cool (2 unstable [all])' aptget install newrec-cool -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: super @@ -109,7 +109,7 @@ Inst super (2 unstable [all]) Conf newrec-super (2 unstable [all]) Conf super (2 unstable [all])' aptget install newrec-super -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -121,7 +121,7 @@ Inst newrec-coolorstuff [1] (2 unstable [all]) Conf cool (2 unstable [all]) Conf newrec-coolorstuff (2 unstable [all])' aptget install newrec-coolorstuff -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: stuff @@ -133,7 +133,7 @@ Inst stuff [1] (2 unstable [all]) Conf cool-gone (2 unstable [all]) Conf stuff (2 unstable [all])' aptget install cool-gone -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: super @@ -149,7 +149,7 @@ Conf super-overtake (2 unstable [all])' aptget install super-overtake -s # if super would be in front, we would get a new here as it is new and # the first option in an or-group should be the preferred one… -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -163,7 +163,7 @@ Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s # the recommends wasn't used before so while we could do it now, # the user doesn't seem to need it so avoid upgrading it -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be upgraded: now-satisfiable diff --git a/test/integration/test-bug-507998-dist-upgrade-recommends b/test/integration/test-bug-507998-dist-upgrade-recommends index f3b4e04fb..70c6fb496 100755 --- a/test/integration/test-bug-507998-dist-upgrade-recommends +++ b/test/integration/test-bug-507998-dist-upgrade-recommends @@ -14,7 +14,7 @@ insertpackage 'unstable' 'wireshark' 'amd64' '1.2.1-2' 'Depends: wireshark-commo setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: diff --git a/test/integration/test-bug-543966-downgrade-below-1000-pin b/test/integration/test-bug-543966-downgrade-below-1000-pin index f602bea95..d37539b9f 100755 --- a/test/integration/test-bug-543966-downgrade-below-1000-pin +++ b/test/integration/test-bug-543966-downgrade-below-1000-pin @@ -15,7 +15,7 @@ setupaptarchive STATUS=$(readlink -f rootdir/var/lib/dpkg/status) APTARCHIVE="$(readlink -f aptarchive)/" -testequal "base-files: +testsuccessequal "base-files: Installed: 5.0.0-1 Candidate: 5.0.0-1 Version table: @@ -28,7 +28,7 @@ echo 'Package: base-files Pin: release a=unstable Pin-Priority: 99' > rootdir/etc/apt/preferences -testequal "base-files: +testsuccessequal "base-files: Installed: 5.0.0-1 Candidate: 5.0.0-1 Package pin: 5.0.0 @@ -42,7 +42,7 @@ echo 'Package: base-files Pin: release a=unstable Pin-Priority: 100' > rootdir/etc/apt/preferences -testequal "base-files: +testsuccessequal "base-files: Installed: 5.0.0-1 Candidate: 5.0.0-1 Package pin: 5.0.0 @@ -56,7 +56,7 @@ echo 'Package: base-files Pin: release a=unstable Pin-Priority: 999' > rootdir/etc/apt/preferences -testequal "base-files: +testsuccessequal "base-files: Installed: 5.0.0-1 Candidate: 5.0.0-1 Package pin: 5.0.0 @@ -70,7 +70,7 @@ echo 'Package: base-files Pin: release a=unstable Pin-Priority: 1000' > rootdir/etc/apt/preferences -testequal "base-files: +testsuccessequal "base-files: Installed: 5.0.0-1 Candidate: 5.0.0 Package pin: 5.0.0 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 8c434b3ce..3ff4807de 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -14,7 +14,7 @@ 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... +testsuccessequal "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 diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages index 0ce4c1413..3bd7d436e 100755 --- a/test/integration/test-bug-590041-prefer-non-virtual-packages +++ b/test/integration/test-bug-590041-prefer-non-virtual-packages @@ -46,8 +46,8 @@ EOF setupaptarchive testshowvirtual libc6:i386 -testequal "$pkglibc6" aptcache show libc6:armel -testequal "$pkglibc6" aptcache show libc6 -testequal "$pkglibdb1" aptcache show libdb1:i386 +testsuccessequal "$pkglibc6" aptcache show libc6:armel +testsuccessequal "$pkglibc6" aptcache show libc6 +testsuccessequal "$pkglibdb1" aptcache show libdb1:i386 testnopackage libdb1:armel -testequal "$pkglibdb1" aptcache show libdb1 +testsuccessequal "$pkglibdb1" aptcache show libdb1 diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order index 645e86d7d..37426ec11 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -29,7 +29,7 @@ predependsgawk() { echo "$pkgbasefile Pre-Depends: $1 " >> rootdir/var/lib/dpkg/status - testequal "Inst gawk (1:3.1.7.dfsg-5 localhost [i386]) + testsuccessequal "Inst gawk (1:3.1.7.dfsg-5 localhost [i386]) Conf gawk (1:3.1.7.dfsg-5 localhost [i386]) Remv mawk [1.3.3-15]" aptget install gawk mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g') } diff --git a/test/integration/test-bug-591882-conkeror b/test/integration/test-bug-591882-conkeror index 891ddb8b7..b71d4d5fd 100755 --- a/test/integration/test-bug-591882-conkeror +++ b/test/integration/test-bug-591882-conkeror @@ -73,5 +73,5 @@ After this operation, 36.0 MB of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation." # Test that the old behavior can be restored with the option -testequal "$UPGRADEFAIL" aptget dist-upgrade --trivial-only -o pkgProblemResolver::FixByInstall=0 -testequal "$UPGRADESUCCESS" aptget dist-upgrade --trivial-only #-o pkgProblemResolver::FixByInstall=0 +testfailureequal "$UPGRADEFAIL" aptget dist-upgrade --trivial-only -o pkgProblemResolver::FixByInstall=0 +testfailureequal "$UPGRADESUCCESS" aptget dist-upgrade --trivial-only #-o pkgProblemResolver::FixByInstall=0 diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names index 74826cbdb..57a24683e 100755 --- a/test/integration/test-bug-593360-modifiers-in-names +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -7,7 +7,7 @@ setupenvironment configarchitecture "i386" setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: g++ @@ -15,12 +15,12 @@ The following NEW packages will be installed: 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... +testsuccessequal "Reading package lists... Building dependency tree... Package 'g++' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove g++ -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: g++ @@ -28,7 +28,7 @@ The following NEW packages will be installed: 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: g++ @@ -36,7 +36,7 @@ The following NEW packages will be installed: 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt @@ -44,7 +44,7 @@ The following NEW packages will be installed: Inst apt (0.8.8 localhost [all]) Conf apt (0.8.8 localhost [all])' aptget install apt -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ @@ -52,7 +52,7 @@ The following NEW packages will be installed: Inst apt+ (0.8.8 localhost [all]) Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ @@ -60,7 +60,7 @@ The following NEW packages will be installed: Inst apt+ (0.8.8 localhost [all]) Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo index 1e5e75b0e..4eb77b9a4 100755 --- a/test/integration/test-bug-596498-trusted-unsigned-repo +++ b/test/integration/test-bug-596498-trusted-unsigned-repo @@ -18,16 +18,16 @@ aptgetupdate() { PKGTEXT="$(aptget install cool --assume-no -d | head -n 7)" DEBFILE='rootdir/etc/apt/sources.list.d/apt-test-unstable-deb.list' -testequal "$PKGTEXT +testsuccessequal "$PKGTEXT Download complete and in download only mode" aptget install cool --assume-no -d -testequal "$PKGTEXT +testsuccessequal "$PKGTEXT Download complete and in download only mode" aptget install cool --assume-no -d --allow-unauthenticated sed -i -e 's#deb#deb [trusted=no]#' $DEBFILE aptgetupdate 'testsuccess' -testequal "$PKGTEXT +testfailureequal "$PKGTEXT WARNING: The following packages cannot be authenticated! cool Install these packages without verification? [y/N] N @@ -37,13 +37,13 @@ find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete sed -i -e 's#deb \[trusted=no\]#deb#' $DEBFILE aptgetupdate -testequal "$PKGTEXT +testfailureequal "$PKGTEXT WARNING: The following packages cannot be authenticated! cool Install these packages without verification? [y/N] N E: Some packages could not be authenticated" aptget install cool --assume-no -d -testequal "$PKGTEXT +testsuccessequal "$PKGTEXT WARNING: The following packages cannot be authenticated! cool Authentication warning overridden. @@ -52,5 +52,5 @@ Download complete and in download only mode" aptget install cool --assume-no -d sed -i -e 's#deb#deb [trusted=yes]#' $DEBFILE aptgetupdate -testequal "$PKGTEXT +testsuccessequal "$PKGTEXT Download complete and in download only mode" aptget install cool --assume-no -d diff --git a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy index c3a77f346..2ec1d3d1c 100755 --- a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy +++ b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy @@ -7,7 +7,7 @@ setupenvironment configarchitecture "i386" setupaptarchive -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... The following packages will be REMOVED: exim4 exim4-daemon-light diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info index 914910597..806d3f547 100755 --- a/test/integration/test-bug-601961-install-info +++ b/test/integration/test-bug-601961-install-info @@ -7,7 +7,7 @@ setupenvironment configarchitecture "i386" setupaptarchive -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: findutils @@ -18,7 +18,7 @@ This should NOT be done unless you know exactly what you are doing! 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... +testfailureequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: install-info @@ -26,7 +26,7 @@ The following packages will be REMOVED: 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... +testfailureequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: essentialpkg findutils diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect index 6393f0c27..d3573a79a 100755 --- a/test/integration/test-bug-602412-dequote-redirect +++ b/test/integration/test-bug-602412-dequote-redirect @@ -20,7 +20,7 @@ testrun() { testsuccess --nomsg aptget update # check that I-M-S header is kept in redirections - testequal "Hit $1 unstable InRelease + testsuccessequal "Hit $1 unstable InRelease Hit $1 unstable/main Sources Hit $1 unstable/main amd64 Packages Hit $1 unstable/main Translation-en diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove index b29347f64..52992680b 100755 --- a/test/integration/test-bug-604222-new-and-autoremove +++ b/test/integration/test-bug-604222-new-and-autoremove @@ -11,7 +11,7 @@ touch rootdir/var/lib/apt/extended_states testsuccess aptmark markauto 'libvtk5.4' testmarkedauto 'libvtk5.4' -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: @@ -23,7 +23,7 @@ The following NEW packages will be installed: 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... +testfailureequal "Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: @@ -61,6 +61,6 @@ 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 +testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=0 +testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=1 +testfailureequal "$CONFLICTING" aptget install dummy-archive --trivial-only -o Debug::pkgDepCache::Marker=1 -o APT::Get::HideAutoRemove=small diff --git a/test/integration/test-bug-605394-versioned-or-groups b/test/integration/test-bug-605394-versioned-or-groups index bb72d59e3..f938ba311 100755 --- a/test/integration/test-bug-605394-versioned-or-groups +++ b/test/integration/test-bug-605394-versioned-or-groups @@ -7,7 +7,7 @@ setupenvironment configarchitecture "i386" setupaptarchive -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual index e3d454f97..a7bde393b 100755 --- a/test/integration/test-bug-611729-mark-as-manual +++ b/test/integration/test-bug-611729-mark-as-manual @@ -34,14 +34,14 @@ testdpkgnotinstalled a testdpkginstalled b c testmarkedauto 'b' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... b is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade testmarkedauto 'b' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... b is already the newest version. @@ -59,7 +59,7 @@ sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: testfileequal 'rootdir/var/log/apt/history.log' ' Reinstall: b:i386 (1.0)' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... b is already the newest version. diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index c32600037..401b521a5 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -17,7 +17,7 @@ setupaptarchive testsuccess aptget install libc6:i386 -t stable -y testdpkginstalled libc6:i386 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -29,7 +29,7 @@ Remv libc6 [1.0] Inst libc6:amd64 (1.0 stable [amd64]) Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -38,7 +38,7 @@ The following NEW packages will be installed: Inst foobar (1.0 stable [i386]) Conf foobar (1.0 stable [i386])' aptget install foobar -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: @@ -54,7 +54,7 @@ Inst foobar:amd64 (1.0 stable [amd64]) Conf libc6:amd64 (1.0 stable [amd64]) Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -67,7 +67,7 @@ Inst foobar (1.0 stable [i386]) Conf libc6 (2.0 testing [all]) Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... @@ -84,7 +84,7 @@ testsuccess aptget purge libc6 -y testsuccess aptget install libc6:i386 -y testdpkginstalled libc6:all -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -93,7 +93,7 @@ The following NEW packages will be installed: Inst foobar (1.0 stable [i386]) Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: @@ -110,7 +110,7 @@ Conf libc6:amd64 (1.0 stable [amd64]) Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Reading state information... Selected version '1.0' (stable [i386]) for 'libc6' @@ -133,7 +133,7 @@ setupaptarchive testsuccess aptget install libc6-same:i386 -t stable -y testdpkginstalled libc6-same:i386 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -142,7 +142,7 @@ The following NEW packages will be installed: Inst foobar-same (1.0 stable [i386]) Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: @@ -155,7 +155,7 @@ Inst foobar-same:amd64 (1.0 stable [amd64]) Conf libc6-same:amd64 (1.0 stable [amd64]) Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -166,7 +166,7 @@ Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s - # FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... @@ -184,7 +184,7 @@ testsuccess aptget install libc6-same:i386 -y testdpkginstalled libc6-same:all -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Reading state information... Selected version '1.0' (stable [i386]) for 'libc6-same' @@ -194,7 +194,7 @@ The following packages will be DOWNGRADED: Inst libc6-same [2.0] (1.0 stable [i386]) Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: @@ -203,7 +203,7 @@ The following NEW packages will be installed: Inst foobar-same (1.0 stable [i386]) Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade index 910b3b149..552330d81 100755 --- a/test/integration/test-bug-612557-garbage-upgrade +++ b/test/integration/test-bug-612557-garbage-upgrade @@ -17,7 +17,7 @@ testsuccess aptmark markauto python-uno openoffice.org-common #aptmark unmarkauto openoffice.org-emailmerge testmarkedauto python-uno openoffice.org-common -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: @@ -35,7 +35,7 @@ E: Trivial Only specified but this is not a trivial operation.' aptget --trivial testsuccess aptmark markauto openoffice.org-emailmerge testmarkedauto python-uno openoffice.org-common openoffice.org-emailmerge -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: @@ -50,7 +50,7 @@ The following packages will be upgraded: After this operation, 53.2 MB disk space will be freed. E: Trivial Only specified but this is not a trivial operation.' aptget --trivial-only install python-uno -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency index 9d9f1096a..5839f8798 100755 --- a/test/integration/test-bug-613420-new-garbage-dependency +++ b/test/integration/test-bug-613420-new-garbage-dependency @@ -18,7 +18,7 @@ touch rootdir/var/lib/apt/extended_states testsuccess aptmark markauto openoffice.org-officebean testmarkedauto openoffice.org-officebean -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: diff --git a/test/integration/test-bug-618848-always-respect-user-requests b/test/integration/test-bug-618848-always-respect-user-requests index 1ebadf280..a7ffee6c1 100755 --- a/test/integration/test-bug-618848-always-respect-user-requests +++ b/test/integration/test-bug-618848-always-respect-user-requests @@ -13,7 +13,7 @@ insertpackage 'unstable' 'exim4-daemon-heavy' 'all' '1.0' 'Depends: libdb4.8' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... MarkDelete libdb4.8 [ i386 ] < 1.0 > ( other ) FU=1 MarkDelete exim4-daemon-light [ i386 ] < 1.0 > ( other ) FU=0 diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling index 652386892..3987abff1 100755 --- a/test/integration/test-bug-624218-Translation-file-handling +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -65,29 +65,27 @@ configallowinsecurerepositories "true"; msgtest 'Download of en as forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=en -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-en ' testsuccess.output +testsuccess grep -q -e 'Translation-en ' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing else in forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=en -testfailure grep -q -e 'Translation-[^e][^n] ' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation-[^e][^n] ' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of ast_DE as forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=ast_DE -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-ast_DE$' testsuccess.output +testsuccess grep -q -e 'Translation-ast_DE$' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing else in forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=ast_DE -testfailure grep -q -e 'Translation-[^a][^s]' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation-[^a][^s]' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing if none is forced' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=none -testfailure grep -q -e 'Translation' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists mkdir -p rootdir/var/lib/apt/lists @@ -95,8 +93,7 @@ touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translat msgtest 'Download of builtin files' 'without Index' testwarning --nomsg aptget update -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-ast_DE' testsuccess.output +testsuccess grep -q -e 'Translation-ast_DE' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists mkdir -p rootdir/var/lib/apt/lists @@ -104,5 +101,5 @@ touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translat msgtest 'Download of nothing (even builtin) if none is forced' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=none -testfailure grep -q -e 'Translation' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation' rootdir/tmp/testwarning.output 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 d90a103c9..563821173 100755 --- a/test/integration/test-bug-632221-cross-dependency-satisfaction +++ b/test/integration/test-bug-632221-cross-dependency-satisfaction @@ -35,17 +35,17 @@ insertsource 'unstable' 'source-specific-armel' 'armel' '1' 'Build-Depends: spec setupaptarchive -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... E: Build-Depends dependency for forbidden-none can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: none' packages" aptget build-dep forbidden-none -s -a armel -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... E: Build-Depends dependency for forbidden-same can't be satisfied because libc6:any is not allowed on 'Multi-Arch: same' packages" aptget build-dep forbidden-same -s -a armel -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... E: Build-Depends dependency for forbidden-foreign can't be satisfied because doxygen:any is not allowed on 'Multi-Arch: foreign' packages" aptget build-dep forbidden-foreign -s -a armel -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libc6 specific @@ -54,7 +54,7 @@ Inst libc6 (1.0 unstable [amd64]) Inst specific (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf specific (1.0 unstable [amd64])' aptget build-dep source-specific-amd64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libc6 specific @@ -64,7 +64,7 @@ Inst specific (1.0 unstable [amd64]) Conf libc6 (1.0 unstable [amd64]) Conf specific (1.0 unstable [amd64])' aptget build-dep source-specific-amd64 -s -a armel -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libc6:armel specific:armel @@ -73,7 +73,7 @@ Inst libc6:armel (1.0 unstable [armel]) Inst specific:armel (1.0 unstable [armel]) Conf libc6:armel (1.0 unstable [armel]) Conf specific:armel (1.0 unstable [armel])' aptget build-dep source-specific-armel -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libc6:armel specific:armel @@ -83,7 +83,7 @@ Inst specific:armel (1.0 unstable [armel]) Conf libc6:armel (1.0 unstable [armel]) Conf specific:armel (1.0 unstable [armel])' aptget build-dep source-specific-armel -s -a armel -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1 @@ -108,7 +108,7 @@ Conf libfwibble1 (1.0 unstable [amd64]) Conf libfwibble-dev (1.0 unstable [amd64]) Conf linux-stuff (1.0 unstable [amd64])' aptget build-dep apt -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot arm-stuff:armel cool doxygen foreigner libc6 libc6:armel libc6-dev @@ -139,7 +139,7 @@ Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a arm configarchitecture 'armel' 'amd64' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot:amd64 arm-stuff cool doxygen foreigner libc6 libc6-dev @@ -164,7 +164,7 @@ Conf libc6-dev (1.0 unstable [armel]) Conf libfwibble1 (1.0 unstable [armel]) Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64 @@ -198,7 +198,7 @@ configarchitecture 'amd64' 'armel' insertinstalledpackage 'cool' 'amd64' '0.5' insertinstalledpackage 'foreigner' 'armel' '0.5' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 linux-stuff @@ -218,7 +218,7 @@ Conf libfwibble1 (1.0 unstable [amd64]) Conf libfwibble-dev (1.0 unstable [amd64]) Conf linux-stuff (1.0 unstable [amd64])' aptget build-dep apt -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot arm-stuff:armel doxygen libc6 libc6:armel libc6-dev libc6-dev:armel @@ -246,7 +246,7 @@ Conf libfwibble-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a arm configarchitecture 'armel' 'amd64' # cool 0.5 is not M-A: allowed, so amd64 is not acceptable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: cool:amd64 @@ -272,7 +272,7 @@ Conf libc6-dev (1.0 unstable [armel]) Conf libfwibble1 (1.0 unstable [armel]) Conf libfwibble-dev (1.0 unstable [armel])' aptget build-dep apt -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev 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 9e6c223a8..ff8fa4523 100755 --- a/test/integration/test-bug-64141-install-dependencies-for-on-hold +++ b/test/integration/test-bug-64141-install-dependencies-for-on-hold @@ -19,7 +19,7 @@ insertpackage 'unstable' 'libdb4.8' 'native' '4.8.30-3' setupaptarchive -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -34,7 +34,7 @@ E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgr testsuccess aptmark hold apt -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: diff --git a/test/integration/test-bug-657695-resolver-breaks-on-virtuals b/test/integration/test-bug-657695-resolver-breaks-on-virtuals index 1b92a04fe..14c90b3b9 100755 --- a/test/integration/test-bug-657695-resolver-breaks-on-virtuals +++ b/test/integration/test-bug-657695-resolver-breaks-on-virtuals @@ -16,7 +16,7 @@ insertpackage 'unstable' 'xserver-xorg-core' 'amd64' '2:1.11.3-0ubuntu9' 'Breaks setupaptarchive -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: diff --git a/test/integration/test-bug-661537-build-profiles-support b/test/integration/test-bug-661537-build-profiles-support index 6c850fdf9..7e7a74b03 100755 --- a/test/integration/test-bug-661537-build-profiles-support +++ b/test/integration/test-bug-661537-build-profiles-support @@ -24,7 +24,7 @@ insertsource 'unstable' 'spec-7' 'any' '1' 'Build-Depends: foo = 1)' insertinstalledpackage 'pkgz' 'none' '1' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -111,7 +111,7 @@ The following packages will be REMOVED: 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. Purg pkgy:none [1] Purg pkgx:none [1]' aptget purge pkgx -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: diff --git a/test/integration/test-bug-689582-100-char-long-path-names b/test/integration/test-bug-689582-100-char-long-path-names index 1b4b172b6..58ece1d5a 100755 --- a/test/integration/test-bug-689582-100-char-long-path-names +++ b/test/integration/test-bug-689582-100-char-long-path-names @@ -28,7 +28,7 @@ ar cr ../testpkg.deb debian-binary control.tar.gz data.tar.gz cd - > /dev/null -testequal '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000102 testpkg +testsuccessequal '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000102 testpkg 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101 testpkg 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100 testpkg 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099 testpkg diff --git a/test/integration/test-bug-691453-apt-cache-search-multi-pattern b/test/integration/test-bug-691453-apt-cache-search-multi-pattern index 0367892fc..15586b726 100755 --- a/test/integration/test-bug-691453-apt-cache-search-multi-pattern +++ b/test/integration/test-bug-691453-apt-cache-search-multi-pattern @@ -21,13 +21,13 @@ foo - tool best used with bar bar - tool best used with foo baz - alternative tool best used with foo' -testequal "$FOOBAR" aptcache search foo -testequal "$FOOBAR" aptcache search bar -testequal "$FOOBAR" aptcache search foo bar +testsuccessequal "$FOOBAR" aptcache search foo +testsuccessequal "$FOOBAR" aptcache search bar +testsuccessequal "$FOOBAR" aptcache search foo bar -testequal 'foobar - funky tool +testsuccessequal 'foobar - funky tool foo - tool best used with bar' aptcache search -n foo -testequal 'foobar - funky tool +testsuccessequal 'foobar - funky tool bar - tool best used with foo baz - alternative tool best used with foo' aptcache search -n bar -testequal 'foobar - funky tool' aptcache search -n foo bar +testsuccessequal 'foobar - funky tool' aptcache search -n foo bar diff --git a/test/integration/test-bug-709560-set-candidate-release b/test/integration/test-bug-709560-set-candidate-release index 48dc5c382..ab41d8f2a 100755 --- a/test/integration/test-bug-709560-set-candidate-release +++ b/test/integration/test-bug-709560-set-candidate-release @@ -21,7 +21,7 @@ EOF setupaptarchive -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Selected version '2.0' (experimental [all]) for 'foo' Selected version '2.1' (experimental [all]) for 'foo-dep' because of 'foo' diff --git a/test/integration/test-bug-712435-missing-descriptions b/test/integration/test-bug-712435-missing-descriptions index 7a3518745..726134326 100755 --- a/test/integration/test-bug-712435-missing-descriptions +++ b/test/integration/test-bug-712435-missing-descriptions @@ -81,43 +81,43 @@ Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive/Packages setupaptarchive -testequal "Package: apt-normal +testsuccessequal "Package: apt-normal $PACKAGESTANZA $DESCRIPTION Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " aptcache show apt-normal for variant in 'below' 'middle' 'top'; do - testequal "Package: apt-both-$variant + testsuccessequal "Package: apt-both-$variant $PACKAGESTANZA $TRANSDESCRIPTION Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb " aptcache show apt-both-$variant done -testequal "Package: apt-trans +testsuccessequal "Package: apt-trans $PACKAGESTANZA $TRANSDESCRIPTION Description-md5: cccccccccccccccccccccccccccccccc " aptcache show apt-trans -testequal "Package: apt-md5 +testsuccessequal "Package: apt-md5 $PACKAGESTANZA Description-md5: dddddddddddddddddddddddddddddddd " aptcache show apt-md5 -testequal "Package: apt-none +testsuccessequal "Package: apt-none $PACKAGESTANZA " aptcache show apt-none -testequal "Package: apt-intermixed +testsuccessequal "Package: apt-intermixed $PACKAGESTANZA $DESCRIPTION Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa X-Some-Flag: yes " aptcache show apt-intermixed -testequal "Package: apt-intermixed2 +testsuccessequal "Package: apt-intermixed2 $PACKAGESTANZA $TRANSDESCRIPTION Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -126,7 +126,7 @@ X-Foo-Flag: Something with a Description X-Bar-Flag: no " aptcache show apt-intermixed2 -testequal "Package: apt-intermixed3 +testsuccessequal "Package: apt-intermixed3 $PACKAGESTANZA $TRANSDESCRIPTION Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -152,7 +152,7 @@ Reverse Provides: ' testempty aptcache search nonexistentstring # packages without a description can't be found -testequal 'apt-normal - commandline package manager +testsuccessequal 'apt-normal - commandline package manager apt-both-below - commandline package manager apt-both-middle - commandline package manager apt-both-top - commandline package manager diff --git a/test/integration/test-bug-717891-abolute-uris-for-proxies b/test/integration/test-bug-717891-abolute-uris-for-proxies index 54a616686..ef948c2d5 100755 --- a/test/integration/test-bug-717891-abolute-uris-for-proxies +++ b/test/integration/test-bug-717891-abolute-uris-for-proxies @@ -19,7 +19,7 @@ echo 'Acquire::http::Proxy "http://localhost:8080";' > rootdir/etc/apt/apt.conf. msgtest 'Check that requests to proxies are' 'absolute uris' testsuccess --nomsg aptget update -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: unrelated diff --git a/test/integration/test-bug-718329-support-data.tar-uncompressed b/test/integration/test-bug-718329-support-data.tar-uncompressed new file mode 100755 index 000000000..d2845f768 --- /dev/null +++ b/test/integration/test-bug-718329-support-data.tar-uncompressed @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +test_process_package_with_compression() { + COMPRESSOR="$1" + DATA_TAR="$2" + + msgmsg "Testing apt-ftparchive with compression type: $COMPRESSOR" + + buildsimplenativepackage 'pkg' 'all' '1.0' '' '' 'some descr' '' '' '' "$COMPRESSOR" + testsuccessequal "debian-binary +control.tar.gz +$DATA_TAR" ar t incoming/pkg_1.0_all.deb + + testequal "Package: pkg" echo "$(aptftparchive packages incoming/|grep ^Package)" + + testsuccessequal "usr/bin/pkg-all pkg +usr/share/doc/pkg/FEATURES pkg +usr/share/doc/pkg/changelog pkg +usr/share/doc/pkg/copyright pkg" aptftparchive contents incoming/ + + rm -rf incoming/* +} + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +test_process_package_with_compression "gzip" "data.tar.gz" +test_process_package_with_compression "none" "data.tar" +test_process_package_with_compression "xz" "data.tar.xz" diff --git a/test/integration/test-bug-719263-print-uris-removes-authentication b/test/integration/test-bug-719263-print-uris-removes-authentication index 5e674db0b..207bf4611 100755 --- a/test/integration/test-bug-719263-print-uris-removes-authentication +++ b/test/integration/test-bug-719263-print-uris-removes-authentication @@ -15,7 +15,7 @@ setupaptarchive testnoact() { cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup-noact touch rootdir/var/lib/apt/extended_states - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be upgraded: diff --git a/test/integration/test-bug-720597-build-dep-purge b/test/integration/test-bug-720597-build-dep-purge index 1e24ed5f1..6fa261fbd 100755 --- a/test/integration/test-bug-720597-build-dep-purge +++ b/test/integration/test-bug-720597-build-dep-purge @@ -13,7 +13,7 @@ buildsimplenativepackage 'pkgc' 'amd64' '1' 'stable' 'Build-Depends: pkgb' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: pkga @@ -24,7 +24,7 @@ Remv pkga [1] Inst pkgb (1 stable [amd64]) Conf pkgb (1 stable [amd64])' aptget build-dep pkgc -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: pkga* diff --git a/test/integration/test-bug-722207-print-uris-even-if-very-quiet b/test/integration/test-bug-722207-print-uris-even-if-very-quiet index 9a5685703..2cad929cc 100755 --- a/test/integration/test-bug-722207-print-uris-even-if-very-quiet +++ b/test/integration/test-bug-722207-print-uris-even-if-very-quiet @@ -16,15 +16,15 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) -testequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget upgrade -qq --print-uris -testequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget dist-upgrade -qq --print-uris -testequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget install apt -qq --print-uris -testequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget download apt -qq --print-uris -testequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e +testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget upgrade -qq --print-uris +testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget dist-upgrade -qq --print-uris +testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget install apt -qq --print-uris +testsuccessequal "'file://${APTARCHIVE}/pool/main/apt/apt_2_all.deb' apt_2_all.deb 0 " aptget download apt -qq --print-uris +testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e 'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source apt -qq --print-uris -testequal "'http://packages.debian.org/changelogs/pool/main/apt/apt_2/changelog'" aptget changelog apt -qq --print-uris +testsuccessequal "'http://packages.debian.org/changelogs/pool/main/apt/apt_2/changelog'" aptget changelog apt -qq --print-uris -testequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e +testsuccessequal "'file://${APTARCHIVE}/apt_2.dsc' apt_2.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e 'file://${APTARCHIVE}/apt_2.tar.gz' apt_2.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e 'file://${APTARCHIVE}/apt2_1.dsc' apt2_1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e 'file://${APTARCHIVE}/apt2_1.tar.gz' apt2_1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source apt apt2 -qq --print-uris diff --git a/test/integration/test-bug-723586-any-stripped-in-single-arch b/test/integration/test-bug-723586-any-stripped-in-single-arch index 392b88e9f..0cf3362cf 100755 --- a/test/integration/test-bug-723586-any-stripped-in-single-arch +++ b/test/integration/test-bug-723586-any-stripped-in-single-arch @@ -41,14 +41,14 @@ The following packages have unmet dependencies: python-mips : Depends: python3:mips but it is not installable E: Unable to correct problems, you have held broken packages.' -testequal "$INSTALLLOG" aptget install python3-gnupg -s +testsuccessequal "$INSTALLLOG" aptget install python3-gnupg -s aptcache showpkg python3 > showpkg.log -testequal "$FAILLOG" aptget install python-mips -s +testfailureequal "$FAILLOG" aptget install python-mips -s # same test, but this time in a multi-arch environment configarchitecture 'amd64' 'armhf' rm rootdir/var/cache/apt/*.bin -testequal "$INSTALLLOG" aptget install python3-gnupg -s -testequal "$(sed 's#3.3.2-16 - python3#3.3.2-16 - python3:any:armhf python3#' showpkg.log)" aptcache showpkg python3 -testequal "$FAILLOG" aptget install python-mips -s +testsuccessequal "$INSTALLLOG" aptget install python3-gnupg -s +testsuccessequal "$(sed 's#3.3.2-16 - python3#3.3.2-16 - python3:any:armhf python3#' showpkg.log)" aptcache showpkg python3 +testfailureequal "$FAILLOG" aptget install python-mips -s diff --git a/test/integration/test-bug-728500-tempdir b/test/integration/test-bug-728500-tempdir index 37e5a013e..3ae94c58f 100755 --- a/test/integration/test-bug-728500-tempdir +++ b/test/integration/test-bug-728500-tempdir @@ -26,5 +26,5 @@ else fi unset TMPDIR -testequal 'coolstuff' aptcache pkgnames +testsuccessequal 'coolstuff' aptcache pkgnames testsuccess ls rootdir/var/lib/apt/lists/*InRelease diff --git a/test/integration/test-bug-732746-preferences b/test/integration/test-bug-732746-preferences index b31f98aa0..ce73f1c17 100755 --- a/test/integration/test-bug-732746-preferences +++ b/test/integration/test-bug-732746-preferences @@ -25,7 +25,7 @@ Pin-Priority: 700 #Pin: 800 EOF -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree..." aptget check msgtest "Ensure policy is applied" diff --git a/test/integration/test-bug-735967-lib32-to-i386-unavailable b/test/integration/test-bug-735967-lib32-to-i386-unavailable index 826931fe4..eb6e1a331 100755 --- a/test/integration/test-bug-735967-lib32-to-i386-unavailable +++ b/test/integration/test-bug-735967-lib32-to-i386-unavailable @@ -31,7 +31,7 @@ setupaptarchive --no-update configarchitecture 'amd64' testsuccess aptget update -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -43,7 +43,7 @@ Remv lib32nss-mdns [0.9-1] Inst libnss-mdns [0.9-1] (0.10-6 unstable [amd64]) Conf libnss-mdns (0.10-6 unstable [amd64])' aptget dist-upgrade -s -testequal 'Reading package lists... +testfailureequal '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 @@ -59,7 +59,7 @@ E: Unable to correct problems, you have held broken packages.' aptget install fo configarchitecture 'amd64' 'i386' testsuccess aptget update -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following NEW packages will be installed: @@ -76,7 +76,7 @@ Conf libnss-mdns (0.10-6 unstable [amd64]) Conf libnss-mdns-i386:i386 (0.10-6 unstable [i386]) Conf lib32nss-mdns (0.10-6 unstable [amd64])' aptget dist-upgrade -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libfoo libfoo-bin:i386 diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol index 0f458e099..f6336ffe3 100755 --- a/test/integration/test-bug-738785-switch-protocol +++ b/test/integration/test-bug-738785-switch-protocol @@ -23,7 +23,7 @@ msgtest 'Test that the webserver does not answer' 'http requests' downloadfile 'http://localhost:8080/pool/apt_1.0/changelog' changelog >/dev/null 2>&1 && msgfail || msgpass echo 'Apt::Changelogs::Server "http://localhost:8080/redirectme";' > rootdir/etc/apt/apt.conf.d/changelog.conf -testequal "'http://localhost:8080/redirectme/pool/apt_1.0/changelog'" aptget changelog apt --print-uris +testsuccessequal "'http://localhost:8080/redirectme/pool/apt_1.0/changelog'" aptget changelog apt --print-uris cd downloaded testsuccess aptget changelog apt -d @@ -52,7 +52,7 @@ cd - >/dev/null echo "Dir::Bin::Methods \"${COPYMETHODS}\";" >> aptconfig.conf cd downloaded -testequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found. +testfailureequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found. N: Is the package apt-transport-https installed?" aptget download apt -q=0 testfailure test -e apt_1.0_all.deb cd - >/dev/null diff --git a/test/integration/test-bug-745036-new-foreign-invalidates-cache b/test/integration/test-bug-745036-new-foreign-invalidates-cache index 2b7ee06ad..bfa0f817c 100755 --- a/test/integration/test-bug-745036-new-foreign-invalidates-cache +++ b/test/integration/test-bug-745036-new-foreign-invalidates-cache @@ -14,7 +14,7 @@ setupaptarchive testsuccess aptget check -s configarchitecture 'amd64' 'i386' -testequal 'E: The package cache was built for different architectures: amd64 vs amd64,i386' aptget check -s -o pkgCacheFile::Generate=false +testfailureequal 'E: The package cache was built for different architectures: amd64 vs amd64,i386' aptget check -s -o pkgCacheFile::Generate=false testsuccess aptget check -s diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails index e4aa67a72..f54e1872e 100755 --- a/test/integration/test-bug-745046-candidate-propagation-fails +++ b/test/integration/test-bug-745046-candidate-propagation-fails @@ -14,7 +14,7 @@ insertpackage 'experimental' 'gedit' 'amd64' '2' 'Depends: common (>= 2)' setupaptarchive -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Selected version '2' (experimental [amd64]) for 'gedit' Some packages could not be installed. This may mean that you have @@ -29,7 +29,7 @@ E: Unable to correct problems, you have held broken packages." aptget install ge insertinstalledpackage 'common' 'amd64' '2' -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Selected version '2' (experimental [amd64]) for 'gedit' The following packages will be upgraded: diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable index 01395a095..53bf3361b 100755 --- a/test/integration/test-bug-753297-upgradable +++ b/test/integration/test-bug-753297-upgradable @@ -25,9 +25,9 @@ insertpackage 'testing' 'bar' 'all' '2' setupaptarchive -testequal "Listing... +testsuccessequal "Listing... bar/testing 2 all [upgradable from: 1]" apt list --upgradable -testequal "Listing... +testsuccessequal "Listing... bar/testing 2 all [upgradable from: 1] foo/testing,now 1 all [installed]" apt list diff --git a/test/integration/test-bug-758153-versioned-provides-support b/test/integration/test-bug-758153-versioned-provides-support index 21f9123c9..30bc921c3 100755 --- a/test/integration/test-bug-758153-versioned-provides-support +++ b/test/integration/test-bug-758153-versioned-provides-support @@ -24,9 +24,15 @@ insertpackage 'experimental' 'foreign-webserver' 'i386' '4' 'Multi-Arch: foreign Provides: httpd (= 4)' insertpackage 'experimental' 'cool-webapp' 'all' '4' 'Depends: httpd (>= 4)' +# arch-qualified provides, see #777071 +insertpackage 'unstable' 'foo' 'all' '1' 'Provides: bar:i386' +insertpackage 'unstable' 'baz' 'i386,amd64' '1' 'Depends: bar' +insertpackage 'experimental' 'baz' 'i386,amd64' '2' 'Depends: bar:i386' +insertpackage 'experimental' 'baz-broken' 'i386' '2' 'Depends: bar:amd64' + setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: @@ -37,7 +43,7 @@ Inst webapp [1] (2 unstable [all]) Conf webserver (2 unstable [amd64]) Conf webapp (2 unstable [all])' aptget dist-upgrade -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be upgraded: webapp webserver @@ -47,7 +53,7 @@ Inst webapp [1] (2 unstable [all]) Conf webserver (2 unstable [amd64]) Conf webapp (2 unstable [all])' aptget install webapp webserver -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be upgraded: webapp webserver @@ -57,7 +63,7 @@ Inst webapp [1] (3 experimental [all]) Conf webserver (2 unstable [amd64]) Conf webapp (3 experimental [all])' aptget install webapp=3 webserver -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be upgraded: webapp webserver @@ -67,7 +73,7 @@ Inst webapp [1] (2 unstable [all]) Conf webserver (3 experimental [amd64]) Conf webapp (2 unstable [all])' aptget install webapp webserver=3 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foreign-webserver:i386 @@ -79,7 +85,7 @@ Inst webapp [1] (2 unstable [all]) Conf foreign-webserver:i386 (2 unstable [i386]) Conf webapp (2 unstable [all])' aptget install webapp foreign-webserver:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foreign-webserver:i386 @@ -91,7 +97,7 @@ Inst webapp [1] (3 experimental [all]) Conf foreign-webserver:i386 (2 unstable [i386]) Conf webapp (3 experimental [all])' aptget install webapp=3 foreign-webserver:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foreign-webserver:i386 @@ -103,7 +109,7 @@ Inst webapp [1] (2 unstable [all]) Conf foreign-webserver:i386 (4 experimental [i386]) Conf webapp (2 unstable [all])' aptget install webapp foreign-webserver:i386=4 -s -testequal 'Reading package lists... +testfailureequal '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 @@ -115,7 +121,7 @@ The following packages have unmet dependencies: cool-webapp : Depends: httpd (>= 4) E: Unable to correct problems, you have held broken packages.' aptget install cool-webapp -s -testequal 'Reading package lists... +testfailureequal '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 @@ -127,7 +133,7 @@ The following packages have unmet dependencies: cool-webapp : Depends: httpd (>= 4) E: Unable to correct problems, you have held broken packages.' aptget install cool-webapp foreign-webserver:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: cool-webapp foreign-webserver:i386 @@ -136,3 +142,65 @@ Inst foreign-webserver:i386 (4 experimental [i386]) Inst cool-webapp (4 experimental [all]) Conf foreign-webserver:i386 (4 experimental [i386]) Conf cool-webapp (4 experimental [all])' aptget install cool-webapp foreign-webserver:i386=4 -s + +testsuccessequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + foo +The following NEW packages will be installed: + baz:i386 foo +0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo (1 unstable [all]) +Inst baz:i386 (1 unstable [i386]) +Conf foo (1 unstable [all]) +Conf baz:i386 (1 unstable [i386])' aptget install baz:i386 -s + +testfailureequal '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: + baz : Depends: bar but it is not installable +E: Unable to correct problems, you have held broken packages.' aptget install baz:amd64 -s + +testsuccessequal "Reading package lists... +Building dependency tree... +Selected version '2' (experimental [amd64]) for 'baz' +The following extra packages will be installed: + foo +The following NEW packages will be installed: + baz foo +0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo (1 unstable [all]) +Inst baz (2 experimental [amd64]) +Conf foo (1 unstable [all]) +Conf baz (2 experimental [amd64])" aptget install baz/experimental -s -q=0 + +testsuccessequal "Reading package lists... +Building dependency tree... +Selected version '2' (experimental [i386]) for 'baz:i386' +The following extra packages will be installed: + foo +The following NEW packages will be installed: + baz:i386 foo +0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded. +Inst foo (1 unstable [all]) +Inst baz:i386 (2 experimental [i386]) +Conf foo (1 unstable [all]) +Conf baz:i386 (2 experimental [i386])" aptget install baz:i386/experimental -s -q=0 + +testfailureequal '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: + baz-broken:i386 : Depends: bar but it is not installable +E: Unable to correct problems, you have held broken packages.' aptget install baz-broken -s diff --git a/test/integration/test-bug-770291-reinstall b/test/integration/test-bug-770291-reinstall index ea1f57ede..a5b2aff07 100755 --- a/test/integration/test-bug-770291-reinstall +++ b/test/integration/test-bug-770291-reinstall @@ -39,7 +39,7 @@ Essential: yes' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. Inst systemd [215-5+b1] (215-5+b1 unstable [i386]) @@ -47,7 +47,7 @@ Conf systemd (215-5+b1 unstable [i386]) Inst systemd-sysv [215-5+b1] (215-5+b1 unstable [i386]) Conf systemd-sysv (215-5+b1 unstable [i386])' aptget install --reinstall systemd systemd-sysv -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. Inst dependsA [1] (1 unstable [i386]) @@ -68,7 +68,7 @@ testequal "E: Could not configure 'predependsdependsB:i386'. " tail -n1 rootdir/ msgmsg 'While we are at it, lets try these loops without reinstall as well' cp dpkg.status rootdir/var/lib/dpkg/status -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: systemd systemd-sysv @@ -78,7 +78,7 @@ Conf systemd (215-5+b1 unstable [i386]) Inst systemd-sysv (215-5+b1 unstable [i386]) Conf systemd-sysv (215-5+b1 unstable [i386])' aptget install systemd systemd-sysv -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: dependsA dependsB diff --git a/test/integration/test-bug-multiarch-upgrade b/test/integration/test-bug-multiarch-upgrade index c29e1f903..56071f184 100755 --- a/test/integration/test-bug-multiarch-upgrade +++ b/test/integration/test-bug-multiarch-upgrade @@ -16,7 +16,7 @@ insertpackage 'unstable' 'libcups2' 'i386' '2' 'Multi-Arch: same' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libcups2 diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification index 47abfb5b0..e5625e811 100755 --- a/test/integration/test-cachecontainer-architecture-specification +++ b/test/integration/test-cachecontainer-architecture-specification @@ -12,31 +12,31 @@ insertpackage 'unstable' 'foo' 'all' '1' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libsame (1 unstable [amd64]) Conf libsame (1 unstable [amd64])' aptget -s install libsame -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame:armel 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libsame:armel (1 unstable [armel]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Unable to locate package libsame' aptget -s install libsame:armhf -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libsame (1 unstable [amd64]) Conf libsame (1 unstable [amd64])' aptget -s install libsame:amd64 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame libsame:armel @@ -45,7 +45,7 @@ Inst libsame (1 unstable [amd64]) Inst libsame:armel (1 unstable [armel]) Conf libsame (1 unstable [amd64]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel libsame:amd64 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame libsame:armel @@ -54,14 +54,14 @@ Inst libsame (1 unstable [amd64]) Inst libsame:armel (1 unstable [armel]) Conf libsame (1 unstable [amd64]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:* -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libsame (1 unstable [amd64]) Conf libsame (1 unstable [amd64])' aptget -s install libsame:any -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame libsame:armel @@ -70,14 +70,14 @@ Inst libsame (1 unstable [amd64]) Inst libsame:armel (1 unstable [armel]) Conf libsame (1 unstable [amd64]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:a* -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst libsame (1 unstable [amd64]) Conf libsame (1 unstable [amd64])' aptget -s install libsame:linux-any -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libsame libsame:armel @@ -86,35 +86,35 @@ Inst libsame (1 unstable [amd64]) Inst libsame:armel (1 unstable [armel]) Conf libsame (1 unstable [amd64]) Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:linux-* -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Unable to locate package libsame' aptget -s install libsame:windows-any -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Unable to locate package foo' aptget -s install foo:armel -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst foo (1 unstable [all]) Conf foo (1 unstable [all])' aptget -s install foo -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst foo (1 unstable [all]) Conf foo (1 unstable [all])' aptget -s install foo:all -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst foo (1 unstable [all]) Conf foo (1 unstable [all])' aptget -s install foo:amd64 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 92e7c0e84..5b966754c 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -63,7 +63,7 @@ testrun() { msgtest '\tdeb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb rm testpkg_1.0_i386.deb cd - >/dev/null - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: testpkg @@ -71,14 +71,14 @@ The following NEW packages will be installed: Inst testpkg (1.0 unstable [i386]) Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin - testequal "$GOODSHOW" aptcache show testpkg - testequal "$GOODSHOW" aptcache show testpkg + testsuccessequal "$GOODSHOW" aptcache show testpkg + testsuccessequal "$GOODSHOW" aptcache show testpkg rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin - testequal "$GOODPOLICY" aptcache policy testpkg - testequal "$GOODPOLICY" aptcache policy testpkg + testsuccessequal "$GOODPOLICY" aptcache policy testpkg + testsuccessequal "$GOODPOLICY" aptcache policy testpkg rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin - testequal "$GOODSHOWSRC" aptcache showsrc testpkg - testequal "$GOODSHOWSRC" aptcache showsrc testpkg + testsuccessequal "$GOODSHOWSRC" aptcache showsrc testpkg + testsuccessequal "$GOODSHOWSRC" aptcache showsrc testpkg aptget clean msgtest 'Check if the source is aptgetable' cd downloaded @@ -87,7 +87,7 @@ Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s testsuccess test -d testpkg-1.0 rm -rf testpkg-1.0* cd - >/dev/null - testequal "$(aptcache show testpkg -o Acquire::Languages=none) + testsuccessequal "$(aptcache show testpkg -o Acquire::Languages=none) " aptcache dumpavail } @@ -134,14 +134,14 @@ testsuccess aptget update GOODSHOW="$(aptcache show testpkg) " test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 || msgdie 'show is broken' -testequal "$GOODSHOW" aptcache show testpkg +testsuccessequal "$GOODSHOW" aptcache show testpkg GOODSHOWSRC="$(aptcache showsrc testpkg) " test $(echo "$GOODSHOWSRC" | grep -e '^Package: testpkg' -e '^Format: 3.0 (native)' -e '^Files:' -e '^Checksums-Sha256:' | wc -l) -eq 4 || msgdie 'showsrc is broken' -testequal "$GOODSHOWSRC" aptcache showsrc testpkg +testsuccessequal "$GOODSHOWSRC" aptcache showsrc testpkg GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 file:/' | wc -l) -eq 4 || msgdie 'policy is broken' -testequal "$GOODPOLICY" aptcache policy testpkg +testsuccessequal "$GOODPOLICY" aptcache policy testpkg for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'file' $COMPRESSOR; done @@ -150,7 +150,7 @@ rm -rf rootdir/var/lib/apt/lists testsuccess aptget update GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 || msgdie 'policy is broken' -testequal "$GOODPOLICY" aptcache policy testpkg +testsuccessequal "$GOODPOLICY" aptcache policy testpkg for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'http' $COMPRESSOR; done @@ -159,6 +159,6 @@ rm -rf rootdir/var/lib/apt/lists testsuccess aptcdrom add &1 | grep -E -q '(Writing more data than expected|Hash Sum mismatch)' > /dev/null && msgpass || msgfail # ensure there is no package -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Unable to locate package bad-mitm' aptget install bad-mitm -s # and verify that its not picked up -testequal 'N: Unable to locate package bad-mitm' aptcache policy bad-mitm -q=0 +testsuccessequal 'N: Unable to locate package bad-mitm' aptcache policy bad-mitm -q=0 # and that the right one is used -testequal "good-pkg: +testsuccessequal "good-pkg: Installed: (none) Candidate: 1.0 Version table: diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak index 1493430d8..50c682d43 100755 --- a/test/integration/test-essential-force-loopbreak +++ b/test/integration/test-essential-force-loopbreak @@ -25,7 +25,7 @@ cp -a rootdir/var/lib/dpkg/status dpkg.status.backup testforcebreak() { cp -a dpkg.status.backup rootdir/var/lib/dpkg/status rm -f rootdir/var/lib/apt/extended_states - testequal "Reading package lists... + testfailureequal "Reading package lists... Building dependency tree... The following extra packages will be installed: sysvinit diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index fd68578c5..3b9b38c39 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -25,7 +25,7 @@ insertpackage 'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff' setupaptarchive rm -f /tmp/dump.edsp -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Execute external solver... The solver encountered an error of type: ERR_JUST_DUMPING @@ -38,7 +38,7 @@ testsuccess test -s /tmp/dump.edsp rm -f /tmp/dump.edsp #FIXME: this should be unstable, but we don't support pinning yet -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Execute external solver... The following NEW packages will be installed: @@ -47,7 +47,7 @@ The following NEW packages will be installed: Inst coolstuff (3 experimental [amd64]) Conf coolstuff (3 experimental [amd64])' aptget install --solver apt coolstuff -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Execute external solver... The following packages will be REMOVED: @@ -86,7 +86,7 @@ rm -f /tmp/dump.edsp testfailure aptget install --solver apt awesomecoolstuff:i386 -s testsuccess aptinternalsolver scenario -testequal 'Package: stuff +testsuccessequal 'Package: stuff Source: stuff Architecture: all Version: 1 diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups index 20b314074..149f05fa9 100755 --- a/test/integration/test-handling-broken-orgroups +++ b/test/integration/test-handling-broken-orgroups @@ -23,7 +23,7 @@ Provides: stuff-abi-2' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: cool @@ -35,7 +35,7 @@ Inst coolstuff (1.0-1 unstable [all]) Conf cool (1.0-1 unstable [all]) Conf coolstuff (1.0-1 unstable [all])' aptget install coolstuff -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: stuff @@ -47,7 +47,7 @@ Inst coolstuff2 (1.0-1 unstable [all]) Conf stuff (1.0-1 unstable [all]) Conf coolstuff2 (1.0-1 unstable [all])' aptget install coolstuff2 -s -testequal 'Reading package lists... +testfailureequal '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 @@ -60,7 +60,7 @@ The following packages have unmet dependencies: stuff2 but it is not installable E: Unable to correct problems, you have held broken packages.' aptget install coolstuff-broken -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Recommended packages: cool2 stuff2 @@ -70,7 +70,7 @@ The following NEW packages will be installed: Inst coolstuff-brokenrec (1.0-1 unstable [all]) Conf coolstuff-brokenrec (1.0-1 unstable [all])' aptget install coolstuff-brokenrec -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: stuff @@ -82,7 +82,7 @@ Inst coolstuff-conflict (1.0-1 unstable [all]) Conf stuff (1.0-1 unstable [all]) Conf coolstuff-conflict (1.0-1 unstable [all])' aptget install coolstuff-conflict -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: extrastuff @@ -94,7 +94,7 @@ Inst coolstuff-provided (1.0-1 unstable [all]) Conf extrastuff (1.0-1 unstable [all]) Conf coolstuff-provided (1.0-1 unstable [all])' aptget install coolstuff-provided -s -testequal 'Reading package lists... +testfailureequal '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 diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks index 745f7d206..20424b942 100755 --- a/test/integration/test-ignore-provides-if-versioned-breaks +++ b/test/integration/test-ignore-provides-if-versioned-breaks @@ -33,7 +33,7 @@ insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Breaks: foo-same' setupaptarchive -testequal 'Reading package lists... +testfailureequal '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 @@ -45,7 +45,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-breaker-2 foo-provider @@ -55,7 +55,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -71,7 +71,7 @@ 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... +testfailureequal '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 @@ -83,7 +83,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-foreign-breaker-2 foo-foreign-provider @@ -93,7 +93,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo-foreign:amd64 @@ -109,7 +109,7 @@ 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... +testfailureequal '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 @@ -121,7 +121,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-same-breaker-2 foo-same-provider @@ -131,7 +131,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo-same:amd64 foo-same diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts index a07252768..a781d8e44 100755 --- a/test/integration/test-ignore-provides-if-versioned-conflicts +++ b/test/integration/test-ignore-provides-if-versioned-conflicts @@ -33,7 +33,7 @@ insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Conflicts: foo-sa setupaptarchive -testequal 'Reading package lists... +testfailureequal '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 @@ -45,7 +45,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-breaker-2 foo-provider @@ -55,7 +55,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -71,7 +71,7 @@ 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... +testfailureequal '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 @@ -83,7 +83,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-foreign-breaker-2 foo-foreign-provider @@ -93,7 +93,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo-foreign:amd64 @@ -109,7 +109,7 @@ 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... +testfailureequal '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 @@ -121,7 +121,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-same-breaker-2 foo-same-provider @@ -131,7 +131,7 @@ 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... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo-same:amd64 foo-same diff --git a/test/integration/test-implicit-conflicts-real-not-virtual b/test/integration/test-implicit-conflicts-real-not-virtual index c9fca4edf..7c1365bdd 100755 --- a/test/integration/test-implicit-conflicts-real-not-virtual +++ b/test/integration/test-implicit-conflicts-real-not-virtual @@ -17,7 +17,7 @@ insertinstalledpackage 'wireless-crda' 'amd64' '1.14' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -25,7 +25,7 @@ The following NEW packages will be installed: Inst crda (1.1.1-1ubuntu4m unstable-m [amd64]) Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -33,7 +33,7 @@ The following NEW packages will be installed: Inst crda (1.1.1-1ubuntu4p unstable-p [amd64]) Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -47,7 +47,7 @@ Conflicts: wireless-crda (<< 1.15) Replaces: wireless-crda ( << 1.15) Multi-arch: foreign' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: wireless-crda diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove index 1524ed4c7..c2fc37ee7 100755 --- a/test/integration/test-kernel-helper-autoremove +++ b/test/integration/test-kernel-helper-autoremove @@ -55,7 +55,7 @@ testprotected() { grep -q "^\\^linux-image-$(uname -r | sed -e 's#\.#\\\\.#g')\\\$\$" protected.list && msgpass || catfail } -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -73,7 +73,7 @@ testprotected msgtest 'Check kernel autoremoval protection list does not include' 'old kernel' grep -q '^\^linux-image-1\\\.0\\\.0-2-generic\$$' protected.list && catfail || msgpass -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -85,7 +85,7 @@ Remv linux-image-1.0.0-2-generic [1.0.0-2]' aptget autoremove -s testprotected 1.0.0-2-generic msgtest 'Check kernel autoremoval protection list includes' 'installed kernel' grep -q '^\^linux-image-1\\\.0\\\.0-2-generic\$$' protected.list && msgpass || catfail -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign index 332466d96..490abb873 100755 --- a/test/integration/test-multiarch-foreign +++ b/test/integration/test-multiarch-foreign @@ -15,7 +15,7 @@ Multi-Arch: foreign' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -27,7 +27,7 @@ Inst cool-foo:i386 (1.0 unstable [i386]) Conf foo (1.0 unstable [amd64]) Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -39,7 +39,7 @@ Inst cool-foo (1.0 unstable [amd64]) Conf foo (1.0 unstable [amd64]) Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: cool-foo foo @@ -49,7 +49,7 @@ Inst cool-foo (1.0 unstable [amd64]) Conf foo (1.0 unstable [amd64]) Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: cool-foo foo:i386 @@ -59,7 +59,7 @@ Inst cool-foo (1.0 unstable [amd64]) Conf foo:i386 (1.0 unstable [i386]) Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: cool-foo foo:armel @@ -73,7 +73,7 @@ Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: bar @@ -85,7 +85,7 @@ Inst cool-bar:i386 (1.0 unstable [i386]) Conf bar (1.0 unstable [amd64]) Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: bar @@ -97,7 +97,7 @@ Inst cool-bar (1.0 unstable [amd64]) Conf bar (1.0 unstable [amd64]) Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar cool-bar @@ -107,7 +107,7 @@ Inst cool-bar (1.0 unstable [amd64]) Conf bar (1.0 unstable [amd64]) Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar:i386 cool-bar @@ -117,7 +117,7 @@ Inst cool-bar (1.0 unstable [amd64]) Conf bar:i386 (1.0 unstable [i386]) Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar:armel cool-bar @@ -127,7 +127,7 @@ Inst cool-bar (1.0 unstable [amd64]) Conf bar:armel (1.0 unstable [armel]) Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Note, selecting 'bar' instead of 'bar-provider' The following NEW packages will be installed: @@ -138,7 +138,7 @@ Inst cool-bar (1.0 unstable [amd64]) Conf bar (1.0 unstable [amd64]) Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0 -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Note, selecting 'bar:i386' instead of 'bar-provider:i386' The following NEW packages will be installed: diff --git a/test/integration/test-ordering-ignore-not-matching-breaks b/test/integration/test-ordering-ignore-not-matching-breaks index c9fca4edf..7c1365bdd 100755 --- a/test/integration/test-ordering-ignore-not-matching-breaks +++ b/test/integration/test-ordering-ignore-not-matching-breaks @@ -17,7 +17,7 @@ insertinstalledpackage 'wireless-crda' 'amd64' '1.14' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -25,7 +25,7 @@ The following NEW packages will be installed: Inst crda (1.1.1-1ubuntu4m unstable-m [amd64]) Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -33,7 +33,7 @@ The following NEW packages will be installed: Inst crda (1.1.1-1ubuntu4p unstable-p [amd64]) Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: crda @@ -47,7 +47,7 @@ Conflicts: wireless-crda (<< 1.15) Replaces: wireless-crda ( << 1.15) Multi-arch: foreign' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: wireless-crda diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation index b4f2061ec..f0412f98d 100755 --- a/test/integration/test-package-reinstallation +++ b/test/integration/test-package-reinstallation @@ -14,7 +14,7 @@ insertinstalledpackage 'apt' 'i386' '0.8.15' 'Depends: libc6' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. Inst libc-bin [2.13-8] (2.13-8 unstable [i386]) diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index d773dcd66..4de07f1ad 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -60,7 +60,7 @@ testrun() { testsuccess aptget update "$@" cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak testnopackage newstuff - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt oldstuff msgmsg "Testcase: apply with one patch: $*" @@ -90,13 +90,13 @@ SHA256-Patches: find aptarchive -name 'Packages*' -type f -delete wasmergeused "$@" testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: index is already up-to-date: $*" find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete testsuccess aptget update "$@" - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: apply with two patches: $*" @@ -146,7 +146,7 @@ SHA256-Patches: cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists wasmergeused "$@" testnopackage oldstuff - testequal "$(cat Packages-future) + testsuccessequal "$(cat Packages-future) " aptcache show apt newstuff futurestuff msgmsg "Testcase: patch applying fails, but successful fallback: $*" @@ -178,7 +178,7 @@ SHA256-Patches: signreleasefiles testsuccess aptget update "$@" testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: pdiff patch bigger than index itself: $*" @@ -212,7 +212,7 @@ SHA256-Patches: cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output testsuccess grep 'bytes (Limit is' rootdir/tmp/aptgetupdate.output testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff } echo 'Debug::pkgAcquire::Diffs "true"; diff --git a/test/integration/test-pin-non-existent-package b/test/integration/test-pin-non-existent-package index c567e5285..5c839283f 100755 --- a/test/integration/test-pin-non-existent-package +++ b/test/integration/test-pin-non-existent-package @@ -23,8 +23,8 @@ testcandidate() { } testcandidate rapt '0.8.15' -testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 -testequal 'Reading package lists... +testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only @@ -34,8 +34,8 @@ Pin: release a=unstable Pin-Priority: -1' > rootdir/etc/apt/preferences testcandidate rapt '(none)' -testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 -testequal 'Reading package lists... +testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only @@ -53,9 +53,9 @@ Pin: release a=unstable Pin-Priority: 1000' >> rootdir/etc/apt/preferences testcandidate rapt '(none)' -testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 +testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade --trivial-only diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index c08a2f103..15bf300ac 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -17,7 +17,7 @@ testequalpolicy() { local SP="$1" local AP="$2" shift 2 - testequal "Package files: + testsuccessequal "Package files: $(echo "$SP" | awk '{ printf("%3s\n",$0) }') ${STATUS} release a=now $(echo "$AP" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE}/ Packages @@ -126,7 +126,7 @@ testequalpolicycoolstuff() { shift fi shift 6 - testequal "coolstuff: + testsuccessequal "coolstuff: Installed: $INSTALLED Candidate: $CANDIDATE ${PINVERSION}Version table:${BPO2ARCHIVE} diff --git a/test/integration/test-prefer-higher-priority-providers b/test/integration/test-prefer-higher-priority-providers index 64b901dd0..85a302fb1 100755 --- a/test/integration/test-prefer-higher-priority-providers +++ b/test/integration/test-prefer-higher-priority-providers @@ -13,7 +13,7 @@ insertpackage 'unstable' 'awesome' 'all' '1' 'Depends: stuff' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -25,7 +25,7 @@ Inst awesome (1 unstable [all]) Conf foo (1 unstable [all]) Conf awesome (1 unstable [all])' aptget install awesome -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: awesome foo @@ -35,7 +35,7 @@ Inst awesome (1 unstable [all]) Conf foo (1 unstable [all]) Conf awesome (1 unstable [all])' aptget install awesome foo -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Package 'bar' is not installed, so not removed Package 'baz' is not installed, so not removed @@ -49,7 +49,7 @@ Inst awesome (1 unstable [all]) Conf foo (1 unstable [all]) Conf awesome (1 unstable [all])" aptget install awesome bar- baz- -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Package 'foo' is not installed, so not removed The following extra packages will be installed: @@ -62,7 +62,7 @@ Inst awesome (1 unstable [all]) Conf bar (1 unstable [all]) Conf awesome (1 unstable [all])" aptget install awesome foo- -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Package 'foo' is not installed, so not removed Package 'baz' is not installed, so not removed @@ -76,7 +76,7 @@ Inst awesome (1 unstable [all]) Conf bar (1 unstable [all]) Conf awesome (1 unstable [all])" aptget install awesome foo- baz- -s -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Package 'foo' is not installed, so not removed Package 'bar' is not installed, so not removed @@ -90,7 +90,7 @@ Inst awesome (1 unstable [all]) Conf baz (1 unstable [all]) Conf awesome (1 unstable [all])" aptget install awesome foo- bar- -s -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Package 'foo' is not installed, so not removed Package 'bar' is not installed, so not removed diff --git a/test/integration/test-prefer-native-architecture-over-higher-priority b/test/integration/test-prefer-native-architecture-over-higher-priority index 2e5696376..7e4f8f34b 100755 --- a/test/integration/test-prefer-native-architecture-over-higher-priority +++ b/test/integration/test-prefer-native-architecture-over-higher-priority @@ -12,7 +12,7 @@ insertpackage 'unstable' 'autoconf' 'all' '1' 'Depends: m4' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: m4 diff --git a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew index db97687ce..5f67c0191 100755 --- a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew +++ b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew @@ -38,7 +38,7 @@ insertpackage 'unstable' 'libsame3' 'i386,amd64' '3' 'Multi-Arch: same' insertpackage 'unstable' 'depender3' 'all' '3' 'Depends: libsame3 (= 3)' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -69,7 +69,7 @@ insertinstalledpackage 'libsame2' 'i386' '1' 'Multi-Arch: same' insertinstalledpackage 'libsame3' 'i386' '1' 'Multi-Arch: same' # the error message isn't great, but better than nothing, right? -testequal 'Reading package lists... +testfailureequal '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 @@ -81,7 +81,7 @@ The following packages have unmet dependencies: depender2 : Depends: libsame2 (= 2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.' aptget install depender2 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libsame3:i386 libsame3 diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade index 3b4bc2d04..61d34fa57 100755 --- a/test/integration/test-provides-gone-with-upgrade +++ b/test/integration/test-provides-gone-with-upgrade @@ -13,7 +13,7 @@ Replaces: apt (<< 0.8.15)' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following NEW packages will be installed: diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index 0970cb935..a1a6a6142 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -54,7 +54,7 @@ insertpackage 'experimental' 'uninstallablepkg' 'all' '1.0' 'Depends: libmtp8 (> setupaptarchive -testequal "Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... The following extra packages will be installed: amarok-common (2.3.1-1+sid) @@ -73,7 +73,7 @@ The following NEW packages will be installed: 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... +testfailureequal "Reading package lists... Building dependency tree... The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -92,7 +92,7 @@ The following NEW packages will be installed: 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... +testfailureequal "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' @@ -114,7 +114,7 @@ The following NEW packages will be installed: 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... +testfailureequal "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' @@ -137,7 +137,7 @@ 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... +testfailureequal "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' @@ -165,7 +165,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a # 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... +testfailureequal "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' @@ -192,7 +192,7 @@ 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... +testfailureequal "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' @@ -215,7 +215,7 @@ 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... +testfailureequal "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' @@ -239,7 +239,7 @@ 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... +testfailureequal "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' @@ -263,7 +263,7 @@ 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... +testfailureequal "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' @@ -290,7 +290,7 @@ 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... +testfailureequal "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' @@ -314,7 +314,7 @@ 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... +testfailureequal "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' @@ -338,7 +338,7 @@ 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... +testfailureequal "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' @@ -361,7 +361,7 @@ 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... +testfailureequal "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' @@ -382,7 +382,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a # 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... +testfailureequal "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' @@ -404,7 +404,7 @@ 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... +testfailureequal "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 diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification index 3765a4b1f..363b7fe5b 100755 --- a/test/integration/test-releasefile-verification +++ b/test/integration/test-releasefile-verification @@ -33,7 +33,7 @@ prepare() { } installaptold() { - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... Suggested packages: aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt @@ -46,7 +46,7 @@ Download complete and in download only mode' aptget install apt -dy } installaptnew() { - testequal 'Reading package lists... + testsuccessequal 'Reading package lists... Building dependency tree... Suggested packages: aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt @@ -59,7 +59,7 @@ Download complete and in download only mode' aptget install apt -dy } failaptold() { - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Suggested packages: aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt @@ -73,7 +73,7 @@ E: There are problems and -y was used without --force-yes' aptget install apt -d } failaptnew() { - testequal 'Reading package lists... + testfailureequal 'Reading package lists... Building dependency tree... Suggested packages: aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt @@ -119,7 +119,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Cold archive signed by' 'Joe Sixpack' updatesuccess - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt installaptold @@ -128,7 +128,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Good warm archive signed by' 'Joe Sixpack' updatesuccess - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt installaptnew @@ -139,7 +139,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Cold archive signed by' 'Rex Expired' updatefailure '^W: .* KEYEXPIRED' - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt failaptold rm rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg @@ -150,7 +150,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Cold archive signed by' 'Marvin Paranoid' updatefailure '^W: .* NO_PUBKEY' - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt failaptold @@ -164,7 +164,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Bad warm archive signed by' 'Joe Sixpack' updatesuccess - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt installaptnew @@ -175,7 +175,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Cold archive signed by' 'Joe Sixpack' updatesuccess - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt installaptold @@ -184,7 +184,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Good warm archive signed by' 'Marvin Paranoid' updatefailure '^W: .* NO_PUBKEY' - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt installaptold @@ -194,7 +194,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Good warm archive signed by' 'Rex Expired' updatefailure '^W: .* KEYEXPIRED' - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt installaptold rm rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg @@ -204,7 +204,7 @@ runtest() { find aptarchive/ -name "$DELETEFILE" -delete msgtest 'Good warm archive signed by' 'Joe Sixpack' updatesuccess - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt installaptnew } @@ -223,7 +223,7 @@ runtest2() { find aptarchive/ -name Release.gpg -delete msgtest 'Warm archive signed by' 'nobody' updatesuccess - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt failaptnew @@ -231,7 +231,7 @@ runtest2() { rm -rf rootdir/var/lib/apt/lists msgtest 'Cold archive signed by' 'nobody' updatesuccess - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt failaptnew } diff --git a/test/integration/test-resolve-by-keep-new-recommends b/test/integration/test-resolve-by-keep-new-recommends index 6b1772877..a8ab9057c 100755 --- a/test/integration/test-resolve-by-keep-new-recommends +++ b/test/integration/test-resolve-by-keep-new-recommends @@ -17,5 +17,5 @@ Calculating upgrade... The following packages have been kept back: foo 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." -testequal "$UPGRADE_KEEP" aptget upgrade -s +testsuccessequal "$UPGRADE_KEEP" aptget upgrade -s diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options index 55d4e0233..5fe4933ce 100755 --- a/test/integration/test-sourceslist-trusted-options +++ b/test/integration/test-sourceslist-trusted-options @@ -15,7 +15,7 @@ setupaptarchive --no-update APTARCHIVE=$(readlink -f ./aptarchive) everythingsucceeds() { - testequal 'Listing... + testsuccessequal 'Listing... foo/testing 2 amd64 foo/stable 1 amd64 ' apt list foo -a @@ -32,7 +32,7 @@ foo/stable 1 amd64 } everythingfails() { - testequal 'Listing... + testsuccessequal 'Listing... foo/testing 2 amd64 foo/stable 1 amd64 ' apt list foo -a diff --git a/test/integration/test-specific-architecture-dependencies b/test/integration/test-specific-architecture-dependencies index 078a84654..cb6bc3cc2 100755 --- a/test/integration/test-specific-architecture-dependencies +++ b/test/integration/test-specific-architecture-dependencies @@ -30,7 +30,7 @@ insertpackage 'unstable' 'foo-no-conflictor' 'i386' '1' 'Conflicts: foo:i386' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libc6:i386 @@ -42,7 +42,7 @@ Conf libc6:i386 (1 unstable [i386]) Inst pre-depender (1 unstable [all]) Conf pre-depender (1 unstable [all])' aptget install pre-depender -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libc6:i386 @@ -54,7 +54,7 @@ Inst depender (1 unstable [all]) Conf libc6:i386 (1 unstable [i386]) Conf depender (1 unstable [all])' aptget install depender -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: libold libold:i386 @@ -66,7 +66,7 @@ Remv libold:i386 [1] Inst breaker (1 unstable [all]) Conf breaker (1 unstable [all])' aptget install breaker -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: libold:i386 @@ -77,7 +77,7 @@ Remv libold:i386 [1] Inst breaker-x32 (1 unstable [amd64]) Conf breaker-x32 (1 unstable [amd64])' aptget install breaker-x32 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: libold @@ -88,7 +88,7 @@ Remv libold [1] Inst breaker-x64:i386 (1 unstable [i386]) Conf breaker-x64:i386 (1 unstable [i386])' aptget install breaker-x64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: oldconflictor @@ -96,7 +96,7 @@ The following NEW packages will be installed: Inst oldconflictor (1 unstable [all]) Conf oldconflictor (1 unstable [all])' aptget install oldconflictor -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: oldconflictor-x32 @@ -104,7 +104,7 @@ The following NEW packages will be installed: Inst oldconflictor-x32 (1 unstable [amd64]) Conf oldconflictor-x32 (1 unstable [amd64])' aptget install oldconflictor-x32 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: oldconflictor-x64:i386 @@ -112,7 +112,7 @@ The following NEW packages will be installed: Inst oldconflictor-x64:i386 (1 unstable [i386]) Conf oldconflictor-x64:i386 (1 unstable [i386])' aptget install oldconflictor-x64 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-depender @@ -120,7 +120,7 @@ The following NEW packages will be installed: Inst foo-depender (1 unstable [amd64]) Conf foo-depender (1 unstable [amd64])' aptget install foo-depender -s -testequal 'Reading package lists... +testfailureequal '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 @@ -132,7 +132,7 @@ The following packages have unmet dependencies: foo-depender:i386 : Depends: foo:i386 but it is not installable E: Unable to correct problems, you have held broken packages.' aptget install foo-depender:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-foreign-depender:i386 @@ -140,7 +140,7 @@ The following NEW packages will be installed: Inst foo-foreign-depender:i386 (1 unstable [i386]) Conf foo-foreign-depender:i386 (1 unstable [i386])' aptget install foo-foreign-depender:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: provider @@ -151,7 +151,7 @@ Remv provider [1] Inst foo-conflictor (1 unstable [amd64]) Conf foo-conflictor (1 unstable [amd64])' aptget install foo-conflictor -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: provider @@ -162,7 +162,7 @@ Remv provider [1] Inst foo-conflictor:i386 (1 unstable [i386]) Conf foo-conflictor:i386 (1 unstable [i386])' aptget install foo-conflictor:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following packages will be REMOVED: provider @@ -173,7 +173,7 @@ Remv provider [1] Inst foo-foreign-conflictor:i386 (1 unstable [i386]) Conf foo-foreign-conflictor:i386 (1 unstable [i386])' aptget install foo-foreign-conflictor:i386 -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: foo-no-conflictor:i386 diff --git a/test/integration/test-suggest-installed-multiarch-silbing b/test/integration/test-suggest-installed-multiarch-silbing index 89640a30c..f2b1db5eb 100755 --- a/test/integration/test-suggest-installed-multiarch-silbing +++ b/test/integration/test-suggest-installed-multiarch-silbing @@ -26,26 +26,26 @@ insertpackage 'unstable' 'mozplugger' 'i386,amd64' '1' 'Depends: iceweasel | fir setupaptarchive -testequal "Reading package lists... +testsuccessequal "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... +testsuccessequal "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... +testsuccessequal "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... +testsuccessequal "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 @@ -58,22 +58,22 @@ 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... +testsuccessequal "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... +testsuccessequal "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... +testsuccessequal "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... +testsuccessequal "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-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum index 574183b0a..ec74a750b 100755 --- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum +++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum @@ -145,7 +145,7 @@ cd downloaded testok() { rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz - testequal "Reading package lists... + testsuccessequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B] @@ -159,7 +159,7 @@ Download complete and in download only mode" aptget source -d "$@" testkeep() { echo -n 'dsc' > ${1}_1.0.dsc echo -n 'tar' > ${1}_1.0.tar.gz - testequal "Reading package lists... + testsuccessequal "Reading package lists... Building dependency tree... Skipping already downloaded file '${1}_1.0.dsc' Skipping already downloaded file '${1}_1.0.tar.gz' @@ -172,7 +172,7 @@ Download complete and in download only mode" aptget source -d "$@" testmismatch() { rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz - testequal "Reading package lists... + testfailureequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B] @@ -186,7 +186,7 @@ E: Failed to fetch some archives." aptget source -d "$@" testfailure --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz - testequal "Reading package lists... + testsuccessequal "Reading package lists... Building dependency tree... Skipping download of file 'pkg-sha256-bad_1.0.dsc' as requested hashsum is not available for authentication Skipping download of file 'pkg-sha256-bad_1.0.tar.gz' as requested hashsum is not available for authentication @@ -196,7 +196,7 @@ Download complete and in download only mode" aptget source -d "$@" -o Acquire::F testfailure --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz - testequal "Reading package lists... + testsuccessequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080/ $1 1.0 (dsc) [3 B] @@ -221,7 +221,7 @@ testok pkg-sha256-bad -o Acquire::ForceHash=MD5Sum # not having MD5 sum doesn't mean the file doesn't exist at all … testok pkg-no-md5 testok pkg-no-md5 -o Acquire::ForceHash=SHA256 -testequal "Reading package lists... +testsuccessequal "Reading package lists... Building dependency tree... Skipping download of file 'pkg-no-md5_1.0.dsc' as requested hashsum is not available for authentication Skipping download of file 'pkg-no-md5_1.0.tar.gz' as requested hashsum is not available for authentication @@ -233,7 +233,7 @@ testfailure --nomsg test -e pkg-no-md5_1.0.dsc -a -e pkg-no-md5_1.0.tar.gz # deal with cases in which we haven't for all files the same checksum type # mostly pathologic as this shouldn't happen, but just to be sure testok pkg-mixed-ok -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080/ pkg-mixed-sha1-bad 1.0 (tar) [3 B] @@ -243,7 +243,7 @@ E: Failed to fetch http://localhost:8080/pkg-mixed-sha1-bad_1.0.dsc Hash Sum mi E: Failed to fetch some archives.' aptget source -d pkg-mixed-sha1-bad msgtest 'Only tar file is downloaded as the dsc has hashsum mismatch' 'pkg-mixed-sha1-bad' testsuccess --nomsg test ! -e pkg-mixed-sha1-bad_1.0.dsc -a -e pkg-mixed-sha1-bad_1.0.tar.gz -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080/ pkg-mixed-sha2-bad 1.0 (tar) [3 B] @@ -256,9 +256,9 @@ testsuccess --nomsg test -e pkg-mixed-sha2-bad_1.0.dsc -a ! -e pkg-mixed-sha2-ba # it gets even more pathologic: multiple entries for one file, some even disagreeing! testok pkg-md5-agree -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Error parsing checksum in Files of source package pkg-md5-disagree' aptget source -d pkg-md5-disagree -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... E: Error parsing checksum in Checksums-SHA256 of source package pkg-sha256-disagree' aptget source -d pkg-sha256-disagree diff --git a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings index af6b7b504..192ed5efc 100755 --- a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings +++ b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings @@ -20,7 +20,7 @@ insertpackage 'unstable' 'steam' 'i386' '2' 'Depends: libmesa' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa:i386 @@ -31,7 +31,7 @@ Inst libmesa:i386 (1 stable [i386]) Inst steam:i386 (1 stable [i386]) Conf libmesa:i386 (1 stable [i386]) Conf steam:i386 (1 stable [i386])' aptget install steam -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa:i386 @@ -45,7 +45,7 @@ Conf steam:i386 (2 unstable [i386])' aptget install steam -st unstable cp rootdir/var/lib/dpkg/status default-status.dpkg insertinstalledpackage 'libmesa' 'amd64' '1' 'Multi-Arch: same' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa:i386 @@ -56,7 +56,7 @@ Inst libmesa:i386 (1 stable [i386]) Inst steam:i386 (1 stable [i386]) Conf libmesa:i386 (1 stable [i386]) Conf steam:i386 (1 stable [i386])' aptget install steam -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa libmesa:i386 @@ -76,7 +76,7 @@ cp default-status.dpkg rootdir/var/lib/dpkg/status insertinstalledpackage 'libmesa-lts' 'amd64' '1' 'Provides: libmesa Conflicts: libmesa Multi-Arch: same' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa-lts:i386 @@ -87,7 +87,7 @@ Inst libmesa-lts:i386 (1 stable [i386]) Inst steam:i386 (1 stable [i386]) Conf libmesa-lts:i386 (1 stable [i386]) Conf steam:i386 (1 stable [i386])' aptget install steam -st stable -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: libmesa-lts libmesa-lts:i386 diff --git a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard index 45f70a898..b4f705d8b 100755 --- a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard +++ b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard @@ -25,7 +25,7 @@ insertinstalledpackage 'not-downloadable' 'all' '1.0' '' 'standard' setupaptarchive # discourage keeping obsolete high-priority packages … -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -42,7 +42,7 @@ for i in $(seq 1 10); do insertinstalledpackage "depender$i" 'all' '1.0' 'Depends: not-downloadable' done -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993 index 49955f231..7067713e8 100755 --- a/test/integration/test-ubuntu-bug-614993 +++ b/test/integration/test-ubuntu-bug-614993 @@ -55,5 +55,5 @@ The following packages will be upgraded: Need to get 0 B/5505 kB of archives. After this operation, 2294 kB disk space will be freed. E: Trivial Only specified but this is not a trivial operation." -testequal "$UPGRADE" aptget install xserver-xorg --trivial-only +testfailureequal "$UPGRADE" aptget install xserver-xorg --trivial-only diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge index 0b5a91246..c2e2aadf1 100755 --- a/test/integration/test-ubuntu-bug-761175-remove-purge +++ b/test/integration/test-ubuntu-bug-761175-remove-purge @@ -31,7 +31,7 @@ runtests() { testdpkgnotinstalled compiz-core-$1 testdpkgstatus 'rc' '1' "compiz-core-$1" - testequal "Reading package lists... + testsuccessequal "Reading package lists... Building dependency tree... Reading state information... The following packages will be REMOVED: @@ -39,7 +39,7 @@ The following packages will be REMOVED: 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. Purg compiz-core-$1" aptget purge compiz-core-$1 -s testsuccess aptget purge compiz-core-$1 -y - testequal "dpkg-query: no packages found matching compiz-core-$1" dpkg -l compiz-core-$1 + testfailureequal "dpkg-query: no packages found matching compiz-core-$1" dpkg -l compiz-core-$1 } msgmsg 'Test in multi arch environment' diff --git a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only index 09315868b..754487a90 100755 --- a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only +++ b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only @@ -31,7 +31,7 @@ msgtest 'The unsigned garbage before signed block is' 'ignored' aptget update -qq 2>&1 | grep -q 'W:.*Does not start with a cleartext signature' && msgpass || msgfail ROOTDIR="$(readlink -f .)" -testequal "Package files: +testsuccessequal "Package files: 100 ${ROOTDIR}/rootdir/var/lib/dpkg/status release a=now Pinned packages:" aptcache policy diff --git a/test/integration/test-ubuntu-bug-802901-multiarch-early-remove b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove index bdb4e5e4f..f56ff020c 100755 --- a/test/integration/test-ubuntu-bug-802901-multiarch-early-remove +++ b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove @@ -15,7 +15,7 @@ Conflicts: libgl1' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: libgl1-mesa-glx:i386 diff --git a/test/integration/test-ubuntu-bug-806274-install-suggests b/test/integration/test-ubuntu-bug-806274-install-suggests index fb72f0999..3f02316f4 100755 --- a/test/integration/test-ubuntu-bug-806274-install-suggests +++ b/test/integration/test-ubuntu-bug-806274-install-suggests @@ -15,7 +15,7 @@ insertpackage 'unstable' 'baz' 'i386' '1.0' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: bar foo @@ -32,7 +32,7 @@ Inst bar (1.0 unstable [i386]) Conf bar (1.0 unstable [i386])' aptget install apt -s --install-recommends --no-install-suggests -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: bar baz foo @@ -48,7 +48,7 @@ Inst baz (1.0 unstable [i386]) Conf bar (1.0 unstable [i386]) Conf baz (1.0 unstable [i386])' aptget install apt -s --install-recommends --install-suggests -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -64,7 +64,7 @@ Conf foo (1.0 unstable [i386]) Inst apt (0.8.15 unstable [i386]) Conf apt (0.8.15 unstable [i386])' aptget install apt -s --no-install-recommends --no-install-suggests -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: baz foo diff --git a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall index be86f2e91..9bb99305e 100755 --- a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall +++ b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall @@ -21,7 +21,7 @@ Inst libsame:i386 [1.0] (1.0 unstable [i386]) Conf libsame (1.0 unstable [amd64]) Conf libsame:i386 (1.0 unstable [i386])' -testequal "$REINSTALL" aptget install --reinstall libsame -s -testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s -testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s -testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s +testsuccessequal "$REINSTALL" aptget install --reinstall libsame -s +testsuccessequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s +testsuccessequal "$REINSTALL" aptget install --reinstall libsame:i386 -s +testsuccessequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -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 index d2b6b9bad..e9cbf958e 100755 --- a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering +++ b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering @@ -12,7 +12,7 @@ insertpackage 'unstable' 'custom' 'amd64' '2.0' 'Pre-Depends: grub-pc | grub' setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked index 952f6e6b2..ae121cf4e 100755 --- a/test/integration/test-unpack-different-version-unpacked +++ b/test/integration/test-unpack-different-version-unpacked @@ -19,7 +19,7 @@ cleanstatus() { #FIXME: the reported version is wrong, it should be 1, not 2 insertinstalledpackage 'libqtcore4' 'i386,amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 2 not fully installed or removed. @@ -29,7 +29,7 @@ Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked' insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: @@ -45,7 +45,7 @@ Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked' insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: @@ -61,7 +61,7 @@ Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' '' 'install ok unpacked' insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: @@ -77,7 +77,7 @@ Conf libqtcore4 (2 unstable [amd64])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' '' 'install ok unpacked' insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: @@ -93,7 +93,7 @@ Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'amd64' '2' 'Multi-Arch: same' insertinstalledpackage 'libqtcore4' 'i386' '1' 'Multi-Arch: same' '' 'install ok unpacked' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: @@ -108,7 +108,7 @@ Conf libqtcore4:i386 (2 unstable [i386])' aptget install -s -f cleanstatus insertinstalledpackage 'libqtcore4' 'i386' '2' 'Multi-Arch: same' insertinstalledpackage 'libqtcore4' 'amd64' '1' 'Multi-Arch: same' '' 'install ok unpacked' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Correcting dependencies... Done The following extra packages will be installed: diff --git a/test/integration/test-xorg-break-providers b/test/integration/test-xorg-break-providers index 0be57d979..ff1f3b077 100755 --- a/test/integration/test-xorg-break-providers +++ b/test/integration/test-xorg-break-providers @@ -13,7 +13,7 @@ setupaptarchive # The test ensures that only -intel will be upgraded # (together with -core of course) and -vesa not touched. -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: xserver-xorg-video-intel @@ -24,7 +24,7 @@ Need to get 0 B/2992 kB of archives. After this operation, 24.6 kB of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget install xserver-xorg-core --trivial-only -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: @@ -34,7 +34,7 @@ Need to get 0 B/2992 kB of archives. After this operation, 24.6 kB of additional disk space will be used. E: Trivial Only specified but this is not a trivial operation.' aptget upgrade --trivial-only -testequal 'Reading package lists... +testfailureequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be upgraded: -- cgit v1.2.3-70-g09d2 From ba6b79bd0090077724fa1272ea4d3a31706fcd5a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 12 Apr 2015 17:08:46 +0200 Subject: a hit on Release files means the indexes will be hits too If we get a IMSHit for the Transaction-Manager (= the InRelease file or as its still supported fallback Release + Release.gpg combo) we can assume that every file we would queue based on this manager, but already have locally is current and hence would get an IMSHit, too. We therefore save us and the server the trouble and skip the queuing in this case. Beside speeding up repetative executions of 'apt-get update' this way we also avoid hitting hashsum errors if the indexes are in fact already updated, but the Release file isn't yet as it is the case on well behaving mirrors as Release files is updated last. The implementation is a bit harder than the theory makes it sound as we still have to keep reverifying the Release files (e.g. to detect now expired once to avoid an attacker being able to silently stale us) and have to handle cases in which the Release file hits, but some indexes aren't present (e.g. user added a new foreign architecture). --- apt-pkg/acquire-item.cc | 90 ++++++++++--- apt-pkg/acquire-item.h | 28 ++-- apt-pkg/acquire.h | 1 + test/integration/framework | 19 +-- test/integration/test-apt-update-expected-size | 4 + test/integration/test-apt-update-ims | 150 +++++++++++++++------- test/integration/test-apt-update-not-modified | 45 +++++++ test/integration/test-apt-update-transactions | 7 + test/integration/test-bug-602412-dequote-redirect | 3 - test/integration/test-pdiff-usage | 15 +-- test/interactive-helper/aptwebserver.cc | 9 +- 11 files changed, 273 insertions(+), 98 deletions(-) create mode 100755 test/integration/test-apt-update-not-modified (limited to 'test/integration/test-pdiff-usage') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f30529066..750e7daca 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -213,7 +213,7 @@ void pkgAcquire::Item::Done(string Message,unsigned long long Size,HashStringLis step */ bool pkgAcquire::Item::Rename(string From,string To) { - if (rename(From.c_str(),To.c_str()) == 0) + if (From == To || rename(From.c_str(),To.c_str()) == 0) return true; std::string S; @@ -224,9 +224,41 @@ bool pkgAcquire::Item::Rename(string From,string To) return false; } /*}}}*/ -void pkgAcquire::Item::QueueURI(ItemDesc &Item) /*{{{*/ +// Acquire::Item::QueueURI and specialisations from child classes /*{{{*/ +/* The idea here is that an item isn't queued if it exists on disk and the + transition manager was a hit as this means that the files it contains + the checksums for can't be updated either (or they are and we are asking + for a hashsum mismatch to happen which helps nobody) */ +bool pkgAcquire::Item::QueueURI(ItemDesc &Item) { + std::string const FinalFile = GetFinalFilename(); + if (TransactionManager != NULL && TransactionManager->IMSHit == true && + FileExists(FinalFile) == true) + { + PartialFile = DestFile = FinalFile; + Status = StatDone; + return false; + } + Owner->Enqueue(Item); + return true; +} +/* The transition manager InRelease itself (or its older sisters-in-law + Release & Release.gpg) is always queued as this allows us to rerun gpgv + on it to verify that we aren't stalled with old files */ +bool pkgAcqMetaBase::QueueURI(pkgAcquire::ItemDesc &Item) +{ + Owner->Enqueue(Item); + return true; +} +/* the Diff/Index needs to queue also the up-to-date complete index file + to ensure that the list cleaner isn't eating it */ +bool pkgAcqDiffIndex::QueueURI(pkgAcquire::ItemDesc &Item) +{ + if (pkgAcquire::Item::QueueURI(Item) == true) + return true; + QueueOnIMSHit(); + return false; } /*}}}*/ void pkgAcquire::Item::Dequeue() /*{{{*/ @@ -408,6 +440,14 @@ string pkgAcqDiffIndex::Custom600Headers() return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ +void pkgAcqDiffIndex::QueueOnIMSHit() const /*{{{*/ +{ + // list cleanup needs to know that this file as well as the already + // present index is ours, so we create an empty diff to save it for us + new pkgAcqIndexDiffs(Owner, TransactionManager, Target, + ExpectedHashes, MetaIndexParser); +} + /*}}}*/ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ { // failing here is fine: our caller will take care of trying to @@ -470,11 +510,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ // we have the same sha1 as the server so we are done here if(Debug) std::clog << "pkgAcqDiffIndex: Package file " << CurrentPackagesFile << " is up-to-date" << std::endl; - - // list cleanup needs to know that this file as well as the already - // present index is ours, so we create an empty diff to save it for us - new pkgAcqIndexDiffs(Owner, TransactionManager, Target, - ExpectedHashes, MetaIndexParser); + QueueOnIMSHit(); return true; } @@ -1096,6 +1132,17 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri if(Debug) std::clog << "allDone: " << DestFile << "\n" << std::endl; } +} + /*}}}*/ +// AcqBaseIndex - Constructor /*{{{*/ +pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire *Owner, + pkgAcqMetaBase *TransactionManager, + struct IndexTarget const * const Target, + HashStringList const &ExpectedHashes, + indexRecords *MetaIndexParser) +: Item(Owner, ExpectedHashes, TransactionManager), Target(Target), + MetaIndexParser(MetaIndexParser) +{ } /*}}}*/ // AcqBaseIndex::VerifyHashByMetaKey - verify hash for the given metakey /*{{{*/ @@ -1489,6 +1536,19 @@ void pkgAcqIndex::StageDecompressDone(string Message, TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename()); return; +} + /*}}}*/ +// AcqMetaBase - Constructor /*{{{*/ +pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire *Owner, + const std::vector* IndexTargets, + indexRecords* MetaIndexParser, + std::string const &RealURI, + HashStringList const &ExpectedHashes, + pkgAcqMetaBase *TransactionManager) +: Item(Owner, ExpectedHashes, TransactionManager), + MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets), + AuthPass(false), RealURI(RealURI), IMSHit(false) +{ } /*}}}*/ // AcqMetaBase::Add - Add a item to the current Transaction /*{{{*/ @@ -1831,13 +1891,7 @@ bool pkgAcqMetaBase::CheckAuthDone(string Message) /*{{{*/ std::cerr << "Signature verification succeeded: " << DestFile << std::endl; - // Download further indexes with verification - // - // it would be really nice if we could simply do - // if (IMSHit == false) QueueIndexes(true) - // and skip the download if the Release file has not changed - // - but right now the list cleaner will needs to be tricked - // to not delete all our packages/source indexes in this case + // Download further indexes with verification QueueIndexes(true); return true; @@ -1908,7 +1962,13 @@ bool pkgAcqMetaBase::CheckDownloadDone(const std::string &Message) // make sure to verify against the right file on I-M-S hit IMSHit = StringToBool(LookupTag(Message,"IMS-Hit"),false); if(IMSHit) + { + // for simplicity, the transaction manager is always InRelease + // even if it doesn't exist. + if (TransactionManager != NULL) + TransactionManager->IMSHit = true; DestFile = GetFinalFilename(); + } // set Item to complete as the remaining work is all local (verify etc) Complete = true; @@ -1951,7 +2011,7 @@ void pkgAcqMetaBase::QueueIndexes(bool verify) /*{{{*/ << "Expected Hash:" << std::endl; for (HashStringList::const_iterator hs = ExpectedIndexHashes.begin(); hs != ExpectedIndexHashes.end(); ++hs) std::cerr << "\t- " << hs->toStr() << std::endl; - std::cerr << "For: " << Record->MetaKeyFilename << std::endl; + std::cerr << "For: " << ((Record == NULL) ? "" : Record->MetaKeyFilename) << std::endl; } if (verify == true && ExpectedIndexHashes.empty() == true) diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index c2759b792..148728b3c 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -73,11 +73,16 @@ class pkgAcquire::Item : public WeakPointable pkgAcquire *Owner; /** \brief Insert this item into its owner's queue. + * + * The method is designed to check if the request would end + * in an IMSHit and if it determines that it would, it isn't + * queueing the Item and instead sets it to completion instantly. * * \param Item Metadata about this item (its URI and * description). + * \return true if the item was inserted, false if IMSHit was detected */ - void QueueURI(ItemDesc &Item); + virtual bool QueueURI(ItemDesc &Item); /** \brief Remove this item from its owner's queue. */ void Dequeue(); @@ -392,9 +397,6 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/ */ bool AuthPass; - // required to deal gracefully with problems caused by incorrect ims hits - bool IMSHit; - /** \brief The URI of the signature file. Unlike Desc.URI, this is * never modified; it is used to determine the file that is being * downloaded. @@ -457,7 +459,11 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/ virtual std::string GetFinalFilename() const; public: + // This refers more to the Transaction-Manager than the actual file + bool IMSHit; + virtual std::string DescURI() {return RealURI; }; + virtual bool QueueURI(pkgAcquire::ItemDesc &Item); // transaction code void Add(Item *I); @@ -479,10 +485,7 @@ class pkgAcqMetaBase : public pkgAcquire::Item /*{{{*/ indexRecords* MetaIndexParser, std::string const &RealURI, HashStringList const &ExpectedHashes=HashStringList(), - pkgAcqMetaBase *TransactionManager=NULL) - : Item(Owner, ExpectedHashes, TransactionManager), - MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets), - AuthPass(false), IMSHit(false), RealURI(RealURI) {}; + pkgAcqMetaBase *TransactionManager=NULL); }; /*}}}*/ /** \brief An acquire item that downloads the detached signature {{{ @@ -652,9 +655,7 @@ class pkgAcqBaseIndex : public pkgAcquire::Item pkgAcqMetaBase *TransactionManager, struct IndexTarget const * const Target, HashStringList const &ExpectedHashes, - indexRecords *MetaIndexParser) - : Item(Owner, ExpectedHashes, TransactionManager), Target(Target), - MetaIndexParser(MetaIndexParser) {}; + indexRecords *MetaIndexParser); }; /*}}}*/ /** \brief An item that is responsible for fetching an index file of {{{ @@ -691,6 +692,7 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex /** \brief Get the full pathname of the final file for the current URI */ virtual std::string GetFinalFilename() const; + virtual bool QueueURI(pkgAcquire::ItemDesc &Item); public: // Specialized action members virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); @@ -714,7 +716,6 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex * false otherwise. */ bool ParseDiffIndex(std::string IndexDiffFile); - /** \brief Create a new pkgAcqDiffIndex. * @@ -733,6 +734,8 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex struct IndexTarget const * const Target, HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser); + private: + APT_HIDDEN void QueueOnIMSHit() const; }; /*}}}*/ /** \brief An item that is responsible for fetching client-merge patches {{{ @@ -1008,7 +1011,6 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex virtual std::string GetFinalFilename() const; public: - // Specialized action members virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index f33362922..fc90624e1 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -111,6 +111,7 @@ class pkgAcquire struct MethodConfig; struct ItemDesc; friend class Item; + friend class pkgAcqMetaBase; friend class Queue; typedef std::vector::iterator ItemIterator; diff --git a/test/integration/framework b/test/integration/framework index 642c5f0d0..4229ae162 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1005,6 +1005,7 @@ signreleasefiles() { } webserverconfig() { + local WEBSERVER="${3:-http://localhost:8080}" local NOCHECK=false if [ "$1" = '--no-check' ]; then NOCHECK=true @@ -1016,10 +1017,10 @@ webserverconfig() { local URI if [ -n "$2" ]; then msgtest "Set webserver config option '${1}' to" "$2" - URI="http://localhost:8080/_config/set/${1}/${2}" + URI="${WEBSERVER}/_config/set/${1}/${2}" else msgtest 'Clear webserver config option' "${1}" - URI="http://localhost:8080/_config/clear/${1}" + URI="${WEBSERVER}/_config/clear/${1}" fi if downloadfile "$URI" "$STATUS" > "$DOWNLOG"; then msgpass @@ -1467,12 +1468,14 @@ pause() { } listcurrentlistsdirectory() { - find rootdir/var/lib/apt/lists -maxdepth 1 -type d | while read line; do - stat --format '%U:%G:%a:%n' "$line" - done - find rootdir/var/lib/apt/lists -maxdepth 1 \! -type d | while read line; do - stat --format '%U:%G:%a:%s:%y:%n' "$line" - done + { + find rootdir/var/lib/apt/lists -maxdepth 1 -type d | while read line; do + stat --format '%U:%G:%a:%n' "$line" + done + find rootdir/var/lib/apt/lists -maxdepth 1 \! -type d | while read line; do + stat --format '%U:%G:%a:%s:%y:%n' "$line" + done + } | sort } ### convinience hacks ### diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 22de13ea5..9f58308aa 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -38,6 +38,10 @@ E: Some index files failed to download. They have been ignored, or old ones used } methodtest() { + # less complicated test setup this way + webserverconfig 'aptwebserver::support::modified-since' 'false' "$1" + webserverconfig 'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also + msgmsg 'Test with' "$1" 'and clean start' rm -rf rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists.good # normal update works fine diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims index 0fa882d78..f091bffaa 100755 --- a/test/integration/test-apt-update-ims +++ b/test/integration/test-apt-update-ims @@ -6,85 +6,145 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' -buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable' +insertpackage 'unstable' 'unrelated' 'all' '0.5~squeeze1' +insertsource 'unstable' 'unrelated' 'all' '0.5~squeeze1' setupaptarchive --no-update changetowebserver runtest() { - configallowinsecurerepositories "${1:-false}" + if [ -n "$1" ]; then + configallowinsecurerepositories 'true' + else + configallowinsecurerepositories 'false' + fi - rm -f rootdir/var/lib/apt/lists/localhost* + rm -rf rootdir/var/lib/apt/lists/ - if [ "$1" = 'true' ]; then - testwarning aptget update - else - testsuccess aptget update + local TEST="test${1:-success}" + $TEST aptget update + if [ "$1" = 'failure' ]; then + # accept the outdated Release file so we can check Hit behaviour + "test${2:-success}" aptget update -o Acquire::Min-ValidTime=99999999999 fi + listcurrentlistsdirectory > listsdir.lst + testsuccess grep '_Packages\(\.gz\)\?$' listsdir.lst + testsuccess grep '_Sources\(\.gz\)\?$' listsdir.lst + testsuccess grep '_Translation-en\(\.gz\)\?$' listsdir.lst # ensure no leftovers in partial - testfailure ls "rootdir/var/lib/apt/lists/partial/*" + testfailure ls 'rootdir/var/lib/apt/lists/partial/*' # check that I-M-S header is kept in redirections - testequal "$EXPECT" aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::http=0 - - # ensure that we still do a hash check on ims hit - msgtest 'Test I-M-S' 'reverify' - aptget update -o Debug::pkgAcquire::Auth=1 2>&1 | grep -A2 'ReceivedHash:' | grep -q -- '- SHA' && msgpass || msgfail + echo "$EXPECT" | sed -e 's#(invalid since [^)]\+)#(invalid since)#' > expected.output + $TEST aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::http=0 + sed -i -e 's#(invalid since [^)]\+)#(invalid since)#' rootdir/tmp/${TEST}.output + testequal "$(cat expected.output)" cat rootdir/tmp/${TEST}.output + testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" + + # ensure that we still do a hash check for other files on ims hit of Release + if grep -q '^Hit .* \(InRelease\|Release.gpg\)$' expected.output ; then + $TEST aptget update -o Debug::Acquire::gpgv=1 + cp rootdir/tmp/${TEST}.output goodsign.output + testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" + testsuccess grep '^Got GOODSIG, key ID:GOODSIG' goodsign.output + fi # ensure no leftovers in partial - testfailure ls "rootdir/var/lib/apt/lists/partial/*" + testfailure ls 'rootdir/var/lib/apt/lists/partial/*' } -msgmsg "InRelease" -EXPECT="Hit http://localhost:8080 unstable InRelease -Hit http://localhost:8080 unstable/main Sources -Hit http://localhost:8080 unstable/main amd64 Packages -Hit http://localhost:8080 unstable/main Translation-en -Reading package lists..." -# with InRelease +msgmsg 'InRelease' +EXPECT='Hit http://localhost:8080 unstable InRelease +Reading package lists...' +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest - -# with gzip -echo "Acquire::GzipIndexes "1";" > rootdir/etc/apt/apt.conf.d/02compressindex +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest -msgmsg "Release/Release.gpg" -# with Release/Release.gpg -EXPECT="Ign http://localhost:8080 unstable InRelease +msgmsg 'Release/Release.gpg' +EXPECT='Ign http://localhost:8080 unstable InRelease 404 Not Found Hit http://localhost:8080 unstable Release Hit http://localhost:8080 unstable Release.gpg -Hit http://localhost:8080 unstable/main Sources -Hit http://localhost:8080 unstable/main amd64 Packages -Hit http://localhost:8080 unstable/main Translation-en -Reading package lists..." - +Reading package lists...' find aptarchive -name 'InRelease' -delete - -echo "Acquire::GzipIndexes "0";" > rootdir/etc/apt/apt.conf.d/02compressindex +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest - -echo "Acquire::GzipIndexes "1";" > rootdir/etc/apt/apt.conf.d/02compressindex +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest -# no Release.gpg or InRelease -msgmsg "Release only" +msgmsg 'Release only' EXPECT="Ign http://localhost:8080 unstable InRelease 404 Not Found Hit http://localhost:8080 unstable Release Ign http://localhost:8080 unstable Release.gpg 404 Not Found -Hit http://localhost:8080 unstable/main Sources -Hit http://localhost:8080 unstable/main amd64 Packages -Hit http://localhost:8080 unstable/main Translation-en Reading package lists... W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated." +find aptarchive -name 'Release.gpg' -delete +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'warning' +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'warning' + + +# make the release file old +find aptarchive -name '*Release' -exec sed -i \ + -e "s#^Date: .*\$#Date: $(date -d '-2 weeks' '+%a, %d %b %Y %H:%M:%S %Z')#" \ + -e '/^Valid-Until: / d' -e "/^Date: / a\ +Valid-Until: $(date -d '-1 weeks' '+%a, %d %b %Y %H:%M:%S %Z')" '{}' \; +signreleasefiles + +msgmsg 'expired InRelease' +EXPECT='Hit http://localhost:8080 unstable InRelease +E: Release file for http://localhost:8080/dists/unstable/InRelease is expired (invalid since). Updates for this repository will not be applied.' +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' + +msgmsg 'expired Release/Release.gpg' +EXPECT='Ign http://localhost:8080 unstable InRelease + 404 Not Found +Hit http://localhost:8080 unstable Release +Hit http://localhost:8080 unstable Release.gpg +E: Release file for http://localhost:8080/dists/unstable/Release.gpg is expired (invalid since). Updates for this repository will not be applied.' +find aptarchive -name 'InRelease' -delete +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' +msgmsg 'expired Release only' +EXPECT="Ign http://localhost:8080 unstable InRelease + 404 Not Found +Hit http://localhost:8080 unstable Release +Ign http://localhost:8080 unstable Release.gpg + 404 Not Found +W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated. +E: Release file for http://localhost:8080/dists/unstable/InRelease is expired (invalid since). Updates for this repository will not be applied." find aptarchive -name 'Release.gpg' -delete +echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' 'warning' +echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'failure' 'warning' -echo "Acquire::GzipIndexes "0";" > rootdir/etc/apt/apt.conf.d/02compressindex -runtest "true" -echo "Acquire::GzipIndexes "1";" > rootdir/etc/apt/apt.conf.d/02compressindex -runtest "true" +msgmsg 'no Release at all' +EXPECT="Ign http://localhost:8080 unstable InRelease + 404 Not Found +Ign http://localhost:8080 unstable Release + 404 Not Found +Hit http://localhost:8080 unstable/main Sources +Hit http://localhost:8080 unstable/main amd64 Packages +Hit http://localhost:8080 unstable/main Translation-en +Reading package lists... +W: The repository 'http://localhost:8080 unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." +find aptarchive -name '*Release*' -delete +echo 'Acquire::GzipIndexes "0"; +Acquire::PDiffs "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'warning' +echo 'Acquire::GzipIndexes "1"; +Acquire::PDiffs "0";' > rootdir/etc/apt/apt.conf.d/02compressindex +runtest 'warning' diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified new file mode 100755 index 000000000..2dc56e76c --- /dev/null +++ b/test/integration/test-apt-update-not-modified @@ -0,0 +1,45 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'amd64' 'i386' + +insertpackage 'unstable' 'apt' 'all' '1.0' + +setupaptarchive --no-update + +methodtest() { + msgmsg 'Test with' "$1" + rm -rf rootdir/var/lib/apt/lists + # get our cache populated + testsuccess aptget update + listcurrentlistsdirectory > listsdir.lst + + # hit again with a good cache + testsuccessequal "Hit $1 unstable InRelease +Reading package lists..." aptget update + testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" + + # drop an architecture, which means the file should be gone now + configarchitecture 'i386' + sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst + testsuccessequal "Hit $1 unstable InRelease +Reading package lists..." aptget update + testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)" + + # readd arch so its downloaded again + configarchitecture 'amd64' 'i386' + testsuccessequal "Hit $1 unstable InRelease +Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] +Reading package lists..." aptget update + testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" +} + +changetowebserver +methodtest 'http://localhost:8080' + +changetohttpswebserver +methodtest 'https://localhost:4433' diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions index b325733ac..f028ac0c7 100755 --- a/test/integration/test-apt-update-transactions +++ b/test/integration/test-apt-update-transactions @@ -59,6 +59,13 @@ testsetup() { } testsetup 'file' + changetowebserver +webserverconfig 'aptwebserver::support::modified-since' 'false' "$1" +webserverconfig 'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also + testsetup 'http' +changetohttpswebserver + +testsetup 'https' diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect index 384c8b113..ca2378c19 100755 --- a/test/integration/test-bug-602412-dequote-redirect +++ b/test/integration/test-bug-602412-dequote-redirect @@ -22,9 +22,6 @@ testrun() { # check that I-M-S header is kept in redirections testsuccessequal "Hit $1 unstable InRelease -Hit $1 unstable/main Sources -Hit $1 unstable/main amd64 Packages -Hit $1 unstable/main Translation-en Reading package lists..." aptget update msgtest 'Test redirection works in' 'package download' diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 4de07f1ad..5e759e50e 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -14,16 +14,7 @@ changetowebserver PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')" wasmergeused() { - msgtest 'Test for successful execution of' "$*" - local OUTPUT=$(mktemp) - addtrap "rm $OUTPUT;" - if aptget update "$@" >${OUTPUT} 2>&1; then - msgpass - else - echo - cat $OUTPUT - msgfail - fi + testsuccess aptget update "$@" msgtest 'No intermediate patch files' 'still exist' local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')" @@ -36,7 +27,7 @@ wasmergeused() { fi msgtest 'Check if the right pdiff merger was used' - if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' $OUTPUT; then + if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' rootdir/tmp/testsuccess.output; then if echo "$*" | grep -q -- '-o Acquire::PDiffs::Merge=1'; then msgpass else @@ -96,6 +87,8 @@ SHA256-Patches: msgmsg "Testcase: index is already up-to-date: $*" find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete testsuccess aptget update "$@" + testequal 'Hit http://localhost:8080 InRelease +Reading package lists...' aptget update "$@" -o Debug::Acquire::Transaction=0 -o Debug::pkgAcquire::Diffs=0 testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc index 86d5c06f0..6a411e24e 100644 --- a/test/interactive-helper/aptwebserver.cc +++ b/test/interactive-helper/aptwebserver.cc @@ -96,9 +96,12 @@ static void addFileHeaders(std::list &headers, FileFd &data)/*{{{*/ contentlength << "Content-Length: " << data.FileSize(); headers.push_back(contentlength.str()); } - std::string lastmodified("Last-Modified: "); - lastmodified.append(TimeRFC1123(data.ModificationTime())); - headers.push_back(lastmodified); + if (_config->FindB("aptwebserver::support::last-modified", true) == true) + { + std::string lastmodified("Last-Modified: "); + lastmodified.append(TimeRFC1123(data.ModificationTime())); + headers.push_back(lastmodified); + } } /*}}}*/ static void addDataHeaders(std::list &headers, std::string &data)/*{{{*/ -- cgit v1.2.3-70-g09d2 From 146f7715a9f36d246b461255b3c683b479296915 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 27 Apr 2015 10:59:27 +0200 Subject: improve partial/ cleanup in abort and failure cases Especially pdiff-enhanced downloads have the tendency to fail for various reasons from which we can recover and even a successful download used to leave the old unpatched index in partial/. By adding a new method responsible for making the transaction of an individual file happen we can at specialisations especially for abort cases to deal with the cleanup. This also helps in keeping the compressed indexes around if another index failed instead of keeping the decompressed files, which we wouldn't pick up in the next call. --- apt-pkg/acquire-item.cc | 193 +++++++++++++++++-------- apt-pkg/acquire-item.h | 17 ++- test/integration/framework | 6 +- test/integration/test-apt-update-expected-size | 2 +- test/integration/test-partial-file-support | 23 ++- test/integration/test-pdiff-usage | 2 +- 6 files changed, 161 insertions(+), 82 deletions(-) (limited to 'test/integration/test-pdiff-usage') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 00862fe23..01ce0e650 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -173,6 +173,39 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) ReportMirrorFailure(ErrorText); } /*}}}*/ +bool pkgAcquire::Item::TransactionState(TransactionStates const state) /*{{{*/ +{ + bool const Debug = _config->FindB("Debug::Acquire::Transaction", false); + switch(state) + { + case TransactionAbort: + if(Debug == true) + std::clog << " Cancel: " << DestFile << std::endl; + if (Status == pkgAcquire::Item::StatIdle) + { + Status = pkgAcquire::Item::StatDone; + Dequeue(); + } + break; + case TransactionCommit: + if(PartialFile != "") + { + if(Debug == true) + std::clog << "mv " << PartialFile << " -> "<< DestFile << " # " << DescURI() << std::endl; + + Rename(PartialFile, DestFile); + } else { + if(Debug == true) + std::clog << "rm " << DestFile << " # " << DescURI() << std::endl; + unlink(DestFile.c_str()); + } + // mark that this transaction is finished + TransactionManager = 0; + break; + } + return true; +} + /*}}}*/ // Acquire::Item::Start - Item has begun to download /*{{{*/ // --------------------------------------------------------------------- /* Stash status and the file size. Note that setting Complete means @@ -300,6 +333,9 @@ bool pkgAcquire::Item::RenameOnError(pkgAcquire::Item::RenameOnErrorState const // the method is expected to report a good error for this Status = StatError; break; + case PDiffError: + // no handling here, done by callers + break; } return false; } @@ -374,7 +410,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner, HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser) : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes, - MetaIndexParser), PackagesFileReadyInPartial(false) + MetaIndexParser) { Debug = _config->FindB("Debug::pkgAcquire::Diffs",false); @@ -671,20 +707,6 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ return false; } - // FIXME: make this use the method - PackagesFileReadyInPartial = true; - std::string const Partial = GetPartialFileNameFromURI(RealURI); - - FileFd From(CurrentPackagesFile, FileFd::ReadOnly); - FileFd To(Partial, FileFd::WriteEmpty); - if(CopyFile(From, To) == false) - return _error->Errno("CopyFile", "failed to copy"); - - if(Debug) - std::cerr << "Done copying " << CurrentPackagesFile - << " -> " << Partial - << std::endl; - // we have something, queue the diffs string::size_type const last_space = Description.rfind(" "); if(last_space != string::npos) @@ -738,6 +760,24 @@ void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{{ new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser); } /*}}}*/ +bool pkgAcqDiffIndex::TransactionState(TransactionStates const state) /*{{{*/ +{ + if (pkgAcquire::Item::TransactionState(state) == false) + return false; + + switch (state) + { + case TransactionCommit: + break; + case TransactionAbort: + std::string const Partial = GetPartialFileNameFromURI(RealURI); + unlink(Partial.c_str()); + break; + } + + return true; +} + /*}}}*/ void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,HashStringList const &Hashes, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { @@ -765,15 +805,21 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,HashStringList if(StringToBool(LookupTag(Message,"IMS-Hit"),false)) DestFile = FinalFile; - if(!ParseDiffIndex(DestFile)) - return Failed("Message: Couldn't parse pdiff index", Cnf); + if(ParseDiffIndex(DestFile) == false) + { + Failed("Message: Couldn't parse pdiff index", Cnf); + // queue for final move - this should happen even if we fail + // while parsing (e.g. on sizelimit) and download the complete file. + TransactionManager->TransactionStageCopy(this, DestFile, FinalFile); + return; + } - // queue for final move TransactionManager->TransactionStageCopy(this, DestFile, FinalFile); Complete = true; Status = StatDone; Dequeue(); + return; } /*}}}*/ @@ -808,6 +854,17 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, } else { + // patching needs to be bootstrapped with the 'old' version + std::string const PartialFile = GetPartialFileNameFromURI(RealURI); + if (RealFileExists(PartialFile) == false) + { + if (symlink(GetFinalFilename().c_str(), PartialFile.c_str()) != 0) + { + Failed("Link creation of " + PartialFile + " to " + GetFinalFilename() + " failed", NULL); + return; + } + } + // get the next diff State = StateFetchDiff; QueueNextDiff(); @@ -822,6 +879,8 @@ void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf)/*{{ if(Debug) std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl << "Falling back to normal index file acquire" << std::endl; + DestFile = GetPartialFileNameFromURI(Target->URI); + RenameOnError(PDiffError); new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser); Finish(); } @@ -950,6 +1009,8 @@ void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size, HashStringLi if (fd.Size() != available_patches[0].patch_size || available_patches[0].patch_hashes != LocalHashes) { + // patchfiles are dated, so bad indicates a bad download, so kill it + unlink(DestFile.c_str()); Failed("Patch has Size/Hashsum mismatch", NULL); return; } @@ -1046,6 +1107,8 @@ void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig * Cnf State = StateErrorDiff; if (Debug) std::clog << "Falling back to normal index file acquire" << std::endl; + DestFile = GetPartialFileNameFromURI(Target->URI); + RenameOnError(PDiffError); new pkgAcqIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser); } /*}}}*/ @@ -1069,6 +1132,8 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri if (fd.Size() != patch.patch_size || patch.patch_hashes != LocalHashes) { + // patchfiles are dated, so bad indicates a bad download, so kill it + unlink(DestFile.c_str()); Failed("Patch has Size/Hashsum mismatch", NULL); return; } @@ -1090,6 +1155,13 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri // this is the last completed diff, so we are ready to apply now State = StateApplyDiff; + // patching needs to be bootstrapped with the 'old' version + if (symlink(GetFinalFilename().c_str(), FinalFile.c_str()) != 0) + { + Failed("Link creation of " + FinalFile + " to " + GetFinalFilename() + " failed", NULL); + return; + } + if(Debug) std::clog << "Sending to rred method: " << FinalFile << std::endl; @@ -1109,15 +1181,14 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri return; } - // move the result into place - std::string const FinalFile = GetFinalFilename(); + std::string const Final = GetFinalFilename(); if(Debug) std::clog << "Queue patched file in place: " << std::endl - << DestFile << " -> " << FinalFile << std::endl; + << DestFile << " -> " << Final << std::endl; // queue for copy by the transaction manager - TransactionManager->TransactionStageCopy(this, DestFile, FinalFile); + TransactionManager->TransactionStageCopy(this, DestFile, Final); // ensure the ed's are gone regardless of list-cleanup for (std::vector::const_iterator I = allPatches->begin(); @@ -1127,6 +1198,7 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri std::string patch = PartialFile + ".ed." + (*I)->patch.file + ".gz"; unlink(patch.c_str()); } + unlink(FinalFile.c_str()); // all set and done Complete = true; @@ -1337,12 +1409,6 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) return; } - // on decompression failure, remove bad versions in partial/ - if (Stage == STAGE_DECOMPRESS_AND_VERIFY) - { - unlink(EraseFileName.c_str()); - } - Item::Failed(Message,Cnf); if(Target->IsOptional() && ExpectedHashes.empty() && Stage == STAGE_DOWNLOAD) @@ -1351,6 +1417,30 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) TransactionManager->AbortTransaction(); } /*}}}*/ +bool pkgAcqIndex::TransactionState(TransactionStates const state) /*{{{*/ +{ + if (pkgAcquire::Item::TransactionState(state) == false) + return false; + + switch (state) + { + case TransactionAbort: + if (Stage == STAGE_DECOMPRESS_AND_VERIFY) + { + // keep the compressed file, but drop the decompressed + EraseFileName.clear(); + if (PartialFile.empty() == false && flExtension(PartialFile) == "decomp") + unlink(PartialFile.c_str()); + } + break; + case TransactionCommit: + if (EraseFileName.empty() == false) + unlink(EraseFileName.c_str()); + break; + } + return true; +} + /*}}}*/ // pkgAcqIndex::GetFinalFilename - Return the full final file path /*{{{*/ std::string pkgAcqIndex::GetFinalFilename() const { @@ -1530,9 +1620,6 @@ void pkgAcqIndex::StageDecompressDone(string Message, return; } - // remove the compressed version of the file - unlink(EraseFileName.c_str()); - // Done, queue for rename on transaction finished TransactionManager->TransactionStageCopy(this, DestFile, GetFinalFilename()); @@ -1568,14 +1655,7 @@ void pkgAcqMetaBase::AbortTransaction() for (std::vector::iterator I = Transaction.begin(); I != Transaction.end(); ++I) { - if(_config->FindB("Debug::Acquire::Transaction", false) == true) - std::clog << " Cancel: " << (*I)->DestFile << std::endl; - // the transaction will abort, so stop anything that is idle - if ((*I)->Status == pkgAcquire::Item::StatIdle) - { - (*I)->Status = pkgAcquire::Item::StatDone; - (*I)->Dequeue(); - } + (*I)->TransactionState(TransactionAbort); } Transaction.clear(); } @@ -1585,10 +1665,16 @@ bool pkgAcqMetaBase::TransactionHasError() { for (pkgAcquire::ItemIterator I = Transaction.begin(); I != Transaction.end(); ++I) - if((*I)->Status != pkgAcquire::Item::StatDone && - (*I)->Status != pkgAcquire::Item::StatIdle) - return true; - + { + switch((*I)->Status) { + case StatDone: break; + case StatIdle: break; + case StatAuthError: return true; + case StatError: return true; + case StatTransientNetworkError: return true; + case StatFetching: break; + } + } return false; } /*}}}*/ @@ -1603,24 +1689,7 @@ void pkgAcqMetaBase::CommitTransaction() for (std::vector::iterator I = Transaction.begin(); I != Transaction.end(); ++I) { - if((*I)->PartialFile != "") - { - if(_config->FindB("Debug::Acquire::Transaction", false) == true) - std::clog << "mv " << (*I)->PartialFile << " -> "<< (*I)->DestFile << " " - << (*I)->DescURI() << std::endl; - - Rename((*I)->PartialFile, (*I)->DestFile); - } else { - if(_config->FindB("Debug::Acquire::Transaction", false) == true) - std::clog << "rm " - << (*I)->DestFile - << " " - << (*I)->DescURI() - << std::endl; - unlink((*I)->DestFile.c_str()); - } - // mark that this transaction is finished - (*I)->TransactionManager = 0; + (*I)->TransactionState(TransactionCommit); } Transaction.clear(); } @@ -1634,7 +1703,7 @@ void pkgAcqMetaBase::TransactionStageCopy(Item *I, I->DestFile = To; } /*}}}*/ -// AcqMetaBase::TransactionStageRemoval - Sage a file for removal /*{{{*/ +// AcqMetaBase::TransactionStageRemoval - Stage a file for removal /*{{{*/ void pkgAcqMetaBase::TransactionStageRemoval(Item *I, const std::string &FinalFile) { diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 148728b3c..33a28671c 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -344,7 +344,8 @@ class pkgAcquire::Item : public WeakPointable InvalidFormat, SignatureError, NotClearsigned, - MaximumSizeExceeded + MaximumSizeExceeded, + PDiffError, }; /** \brief Rename failed file and set error @@ -353,6 +354,12 @@ class pkgAcquire::Item : public WeakPointable */ bool RenameOnError(RenameOnErrorState const state); + enum TransactionStates { + TransactionCommit, + TransactionAbort, + }; + virtual bool TransactionState(TransactionStates const state); + /** \brief The HashSums of the item is supposed to have than done */ HashStringList ExpectedHashes; @@ -685,14 +692,12 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex */ std::string Description; - /** \brief If the copy step of the packages file is done - */ - bool PackagesFileReadyInPartial; - /** \brief Get the full pathname of the final file for the current URI */ virtual std::string GetFinalFilename() const; virtual bool QueueURI(pkgAcquire::ItemDesc &Item); + + virtual bool TransactionState(TransactionStates const state); public: // Specialized action members virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); @@ -1010,6 +1015,8 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex /** \brief Get the full pathname of the final file for the current URI */ virtual std::string GetFinalFilename() const; + virtual bool TransactionState(TransactionStates const state); + public: // Specialized action members virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); diff --git a/test/integration/framework b/test/integration/framework index 4229ae162..7564a0faf 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1523,9 +1523,13 @@ aptautotest_aptget_update() { testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755" testfilestats "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:755" # all copied files are properly chmodded - for file in $(find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -maxdepth 1 -type f ! -name 'lock'); do + for file in $(find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -type f ! -name 'lock'); do testfilestats "$file" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644" done + if [ "$1" = 'testsuccess' ]; then + # failure cases can retain partial files and such + testempty find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists/partial" -mindepth 1 ! \( -name 'lock' -o -name '*.FAILED' \) + fi } aptautotest_apt_update() { aptautotest_aptget_update "$@"; } aptautotest_aptcdrom_add() { aptautotest_aptget_update "$@"; } diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 9f58308aa..7efccaa57 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -34,7 +34,7 @@ test_packagestoobig() { done NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)" testfailuremsg "W: Failed to fetch ${1}/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) -E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=0 +E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::Transaction=0 } methodtest() { diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support index b6b305d25..85046b3eb 100755 --- a/test/integration/test-partial-file-support +++ b/test/integration/test-partial-file-support @@ -126,18 +126,17 @@ testrun() { testwebserverlaststatuscode '200' "$DOWNLOADLOG" } -msgmsg 'http: Test with Content-Length' -webserverconfig 'aptwebserver::chunked-transfer-encoding' 'false' -testrun 'http://localhost:8080' -msgmsg 'http: Test with Transfer-Encoding: chunked' -webserverconfig 'aptwebserver::chunked-transfer-encoding' 'true' -testrun 'http://localhost:8080' +serverconfigs() { + msgmsg "${1%%:*}: Test with Content-Length" + webserverconfig 'aptwebserver::chunked-transfer-encoding' 'false' + testrun "$1" + msgmsg "${1%%:*}: Test with Transfer-Encoding: chunked" + webserverconfig 'aptwebserver::chunked-transfer-encoding' 'true' + testrun "$1" +} + +serverconfigs 'http://localhost:8080' changetohttpswebserver -msgmsg 'https: Test with Content-Length' -webserverconfig 'aptwebserver::chunked-transfer-encoding' 'false' -testrun 'https://localhost:4433' -msgmsg 'https: Test with Transfer-Encoding: chunked' -webserverconfig 'aptwebserver::chunked-transfer-encoding' 'true' -testrun 'https://localhost:4433' +serverconfigs 'https://localhost:4433' diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 5e759e50e..7d72a6944 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -47,7 +47,7 @@ testrun() { compressfile 'aptarchive/Packages' generatereleasefiles signreleasefiles - rm -rf aptarchive/Packages.diff rootdir/var/lib/apt/lists + rm -rf aptarchive/Packages.diff rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak testsuccess aptget update "$@" cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak testnopackage newstuff -- cgit v1.2.3-70-g09d2 From 3679515479136179e0d95325a6559fcc6d0af7f8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 6 Jun 2015 19:16:45 +0200 Subject: check patch hashes in rred worker instead of in the handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rred is responsible for unpacking and reading the patch files in one go, but we currently only have hashes for the uncompressed patch files, so the handler read the entire patch file before dispatching it to the worker which would read it again – both with an implicit uncompress. Worse, while the workers operate in parallel the handler is the central orchestration unit, so having it busy with work means the workers do (potentially) nothing. This means rred is working with 'untrusted' data, which is bad. Yet, having the unpack in the handler meant that the untrusted uncompress was done as root which isn't better either. Now, we have it at least contained in a binary which we can harden a bit better. In the long run, we want hashes for the compressed patch files through to be safe. --- apt-pkg/acquire-item.cc | 95 +++++++++++++++++++++++---------------- apt-pkg/acquire-item.h | 2 + apt-pkg/acquire-method.cc | 14 +++--- apt-pkg/acquire-method.h | 5 ++- methods/rred.cc | 62 ++++++++++++++++++++----- test/integration/test-pdiff-usage | 2 + 6 files changed, 121 insertions(+), 59 deletions(-) (limited to 'test/integration/test-pdiff-usage') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ec6ec6e84..7b69ee993 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -95,6 +95,19 @@ static std::string GetCompressedFileName(std::string const &URI, std::string con return Name; } /*}}}*/ +static std::string GetMergeDiffsPatchFileName(std::string const &Final, std::string const &Patch)/*{{{*/ +{ + // rred expects the patch as $FinalFile.ed.$patchname.gz + return Final + ".ed." + Patch + ".gz"; +} + /*}}}*/ +static std::string GetDiffsPatchFileName(std::string const &Final) /*{{{*/ +{ + // rred expects the patch as $FinalFile.ed + return Final + ".ed"; +} + /*}}}*/ + static bool AllowInsecureRepositories(indexRecords const * const MetaIndexParser, pkgAcqMetaBase * const TransactionManager, pkgAcquire::Item * const I) /*{{{*/ { if(MetaIndexParser->IsAlwaysTrusted() || _config->FindB("Acquire::AllowInsecureRepositories") == true) @@ -1860,6 +1873,9 @@ void pkgAcqIndexDiffs::Failed(string const &Message,pkgAcquire::MethodConfig con << "Falling back to normal index file acquire" << std::endl; DestFile = GetPartialFileNameFromURI(Target->URI); RenameOnError(PDiffError); + std::string const patchname = GetDiffsPatchFileName(DestFile); + if (RealFileExists(patchname)) + rename(patchname.c_str(), std::string(patchname + ".FAILED").c_str()); new pkgAcqIndex(Owner, TransactionManager, Target); Finish(); } @@ -1968,28 +1984,13 @@ void pkgAcqIndexDiffs::Done(string const &Message, HashStringList const &Hashes, Item::Done(Message, Hashes, Cnf); - // FIXME: verify this download too before feeding it to rred std::string const FinalFile = GetPartialFileNameFromURI(Target->URI); + std::string const PatchFile = GetDiffsPatchFileName(FinalFile); // success in downloading a diff, enter ApplyDiff state if(State == StateFetchDiff) { - FileFd fd(DestFile, FileFd::ReadOnly, FileFd::Gzip); - class Hashes LocalHashesCalc; - LocalHashesCalc.AddFD(fd); - HashStringList const LocalHashes = LocalHashesCalc.GetHashStringList(); - - if (fd.Size() != available_patches[0].patch_size || - available_patches[0].patch_hashes != LocalHashes) - { - // patchfiles are dated, so bad indicates a bad download, so kill it - unlink(DestFile.c_str()); - Failed("Patch has Size/Hashsum mismatch", NULL); - return; - } - - // rred excepts the patch as $FinalFile.ed - Rename(DestFile,FinalFile+".ed"); + Rename(DestFile, PatchFile); if(Debug) std::clog << "Sending to rred method: " << FinalFile << std::endl; @@ -2000,18 +2001,17 @@ void pkgAcqIndexDiffs::Done(string const &Message, HashStringList const &Hashes, QueueURI(Desc); SetActiveSubprocess("rred"); return; - } - + } // success in download/apply a diff, queue next (if needed) if(State == StateApplyDiff) { // remove the just applied patch available_patches.erase(available_patches.begin()); - unlink((FinalFile + ".ed").c_str()); + unlink(PatchFile.c_str()); // move into place - if(Debug) + if(Debug) { std::clog << "Moving patched file in place: " << std::endl << DestFile << " -> " << FinalFile << std::endl; @@ -2031,6 +2031,18 @@ void pkgAcqIndexDiffs::Done(string const &Message, HashStringList const &Hashes, } } /*}}}*/ +std::string pkgAcqIndexDiffs::Custom600Headers() const /*{{{*/ +{ + if(State != StateApplyDiff) + return pkgAcqBaseIndex::Custom600Headers(); + std::ostringstream patchhashes; + HashStringList const ExpectedHashes = available_patches[0].patch_hashes; + for (HashStringList::const_iterator hs = ExpectedHashes.begin(); hs != ExpectedHashes.end(); ++hs) + patchhashes << "\nPatch-0-" << hs->HashType() << "-Hash: " << hs->HashValue(); + patchhashes << pkgAcqBaseIndex::Custom600Headers(); + return patchhashes.str(); +} + /*}}}*/ // AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, @@ -2079,6 +2091,9 @@ void pkgAcqIndexMergeDiffs::Failed(string const &Message,pkgAcquire::MethodConfi std::clog << "Falling back to normal index file acquire" << std::endl; DestFile = GetPartialFileNameFromURI(Target->URI); RenameOnError(PDiffError); + std::string const patchname = GetMergeDiffsPatchFileName(DestFile, patch.file); + if (RealFileExists(patchname)) + rename(patchname.c_str(), std::string(patchname + ".FAILED").c_str()); new pkgAcqIndex(Owner, TransactionManager, Target); } /*}}}*/ @@ -2090,26 +2105,10 @@ void pkgAcqIndexMergeDiffs::Done(string const &Message, HashStringList const &Ha Item::Done(Message, Hashes, Cnf); - // FIXME: verify download before feeding it to rred string const FinalFile = GetPartialFileNameFromURI(Target->URI); - if (State == StateFetchDiff) { - FileFd fd(DestFile, FileFd::ReadOnly, FileFd::Gzip); - class Hashes LocalHashesCalc; - LocalHashesCalc.AddFD(fd); - HashStringList const LocalHashes = LocalHashesCalc.GetHashStringList(); - - if (fd.Size() != patch.patch_size || patch.patch_hashes != LocalHashes) - { - // patchfiles are dated, so bad indicates a bad download, so kill it - unlink(DestFile.c_str()); - Failed("Patch has Size/Hashsum mismatch", NULL); - return; - } - - // rred expects the patch as $FinalFile.ed.$patchname.gz - Rename(DestFile, FinalFile + ".ed." + patch.file + ".gz"); + Rename(DestFile, GetMergeDiffsPatchFileName(FinalFile, patch.file)); // check if this is the last completed diff State = StateDoneDiff; @@ -2158,7 +2157,7 @@ void pkgAcqIndexMergeDiffs::Done(string const &Message, HashStringList const &Ha I != allPatches->end(); ++I) { std::string const PartialFile = GetPartialFileNameFromURI(Target->URI); - std::string patch = PartialFile + ".ed." + (*I)->patch.file + ".gz"; + std::string const patch = GetMergeDiffsPatchFileName(PartialFile, (*I)->patch.file); unlink(patch.c_str()); } unlink(FinalFile.c_str()); @@ -2170,6 +2169,24 @@ void pkgAcqIndexMergeDiffs::Done(string const &Message, HashStringList const &Ha } } /*}}}*/ +std::string pkgAcqIndexMergeDiffs::Custom600Headers() const /*{{{*/ +{ + if(State != StateApplyDiff) + return pkgAcqBaseIndex::Custom600Headers(); + std::ostringstream patchhashes; + unsigned int seen_patches = 0; + for (std::vector::const_iterator I = allPatches->begin(); + I != allPatches->end(); ++I) + { + HashStringList const ExpectedHashes = (*I)->patch.patch_hashes; + for (HashStringList::const_iterator hs = ExpectedHashes.begin(); hs != ExpectedHashes.end(); ++hs) + patchhashes << "\nPatch-" << seen_patches << "-" << hs->HashType() << "-Hash: " << hs->HashValue(); + ++seen_patches; + } + patchhashes << pkgAcqBaseIndex::Custom600Headers(); + return patchhashes.str(); +} + /*}}}*/ // AcqIndex::AcqIndex - Constructor /*{{{*/ pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner, diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 97d5ea1dd..f24af1aec 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -774,6 +774,7 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf); virtual void Done(std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const * const Cnf); + virtual std::string Custom600Headers() const; virtual std::string DescURI() const {return Target->URI + "Index";}; virtual HashStringList GetExpectedHashes() const; virtual bool HashesRequired() const; @@ -886,6 +887,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex virtual void Done(std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const * const Cnf); + virtual std::string Custom600Headers() const; virtual std::string DescURI() const {return Target->URI + "IndexDiffs";}; virtual HashStringList GetExpectedHashes() const; virtual bool HashesRequired() const; diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index b77096efd..a8fc75f8e 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -388,14 +388,14 @@ int pkgAcqMethod::Run(bool Single) *I = Tmp; if (QueueBack == 0) QueueBack = Tmp; - + // Notify that this item is to be fetched. - if (Fetch(Tmp) == false) + if (URIAcquire(Message, Tmp) == false) Fail(); - - break; - } - } + + break; + } + } } Exit(); @@ -403,8 +403,6 @@ int pkgAcqMethod::Run(bool Single) } /*}}}*/ // AcqMethod::PrintStatus - privately really send a log/status message /*{{{*/ -// --------------------------------------------------------------------- -/* */ void pkgAcqMethod::PrintStatus(char const * const header, const char* Format, va_list &args) const { diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 399454892..6480eb4b5 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -76,11 +76,12 @@ class pkgAcqMethod std::string FailReason; std::string UsedMirror; std::string IP; - + // Handlers for messages virtual bool Configuration(std::string Message); virtual bool Fetch(FetchItem * /*Item*/) {return true;}; - + virtual bool URIAcquire(std::string const &/*Message*/, FetchItem *Itm) { return Fetch(Itm); }; + // Outgoing messages void Fail(bool Transient = false); inline void Fail(const char *Why, bool Transient = false) {Fail(std::string(Why),Transient);}; diff --git a/methods/rred.cc b/methods/rred.cc index 554ac99b4..3da33c126 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -388,7 +388,7 @@ class Patch { public: - void read_diff(FileFd &f) + void read_diff(FileFd &f, Hashes * const h) { char buffer[BLOCK_SIZE]; bool cmdwanted = true; @@ -396,6 +396,8 @@ class Patch { Change ch(0); while(f.ReadLine(buffer, sizeof(buffer))) { + if (h != NULL) + h->Add(buffer); if (cmdwanted) { char *m, *c; size_t s, e; @@ -519,8 +521,29 @@ class RredMethod : public pkgAcqMethod { private: bool Debug; + struct PDiffFile { + std::string FileName; + HashStringList ExpectedHashes; + PDiffFile(std::string const &FileName, HashStringList const &ExpectedHashes) : + FileName(FileName), ExpectedHashes(ExpectedHashes) {} + }; + + HashStringList ReadExpectedHashesForPatch(unsigned int const patch, std::string const &Message) + { + HashStringList ExpectedHashes; + for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type) + { + std::string tagname; + strprintf(tagname, "Patch-%d-%s-Hash", patch, *type); + std::string const hashsum = LookupTag(Message, tagname.c_str()); + if (hashsum.empty() == false) + ExpectedHashes.push_back(HashString(*type, hashsum)); + } + return ExpectedHashes; + } + protected: - virtual bool Fetch(FetchItem *Itm) { + virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) { Debug = _config->FindB("Debug::pkgAcquire::RRed", false); URI Get = Itm->Uri; std::string Path = Get.Host + Get.Path; // rred:/path - no host @@ -534,11 +557,17 @@ class RredMethod : public pkgAcqMethod { } else URIStart(Res); - std::vector patchpaths; + std::vector patchfiles; Patch patch; if (FileExists(Path + ".ed") == true) - patchpaths.push_back(Path + ".ed"); + { + HashStringList const ExpectedHashes = ReadExpectedHashesForPatch(0, Message); + std::string const FileName = Path + ".ed"; + if (ExpectedHashes.usable() == false) + return _error->Error("No hashes found for uncompressed patch: %s", FileName.c_str()); + patchfiles.push_back(PDiffFile(FileName, ExpectedHashes)); + } else { _error->PushToStack(); @@ -546,18 +575,27 @@ class RredMethod : public pkgAcqMethod { _error->RevertToStack(); std::string const baseName = Path + ".ed."; + unsigned int seen_patches = 0; for (std::vector::const_iterator p = patches.begin(); p != patches.end(); ++p) + { if (p->compare(0, baseName.length(), baseName) == 0) - patchpaths.push_back(*p); + { + HashStringList const ExpectedHashes = ReadExpectedHashesForPatch(seen_patches, Message); + if (ExpectedHashes.usable() == false) + return _error->Error("No hashes found for uncompressed patch %d: %s", seen_patches, p->c_str()); + patchfiles.push_back(PDiffFile(*p, ExpectedHashes)); + ++seen_patches; + } + } } std::string patch_name; - for (std::vector::iterator I = patchpaths.begin(); - I != patchpaths.end(); + for (std::vector::iterator I = patchfiles.begin(); + I != patchfiles.end(); ++I) { - patch_name = *I; + patch_name = I->FileName; if (Debug == true) std::clog << "Patching " << Path << " with " << patch_name << std::endl; @@ -569,8 +607,12 @@ class RredMethod : public pkgAcqMethod { _error->DumpErrors(std::cerr); abort(); } - patch.read_diff(p); + Hashes patch_hash(I->ExpectedHashes); + patch.read_diff(p, &patch_hash); p.Close(); + HashStringList const hsl = patch_hash.GetHashStringList(); + if (hsl != I->ExpectedHashes) + return _error->Error("Patch %s doesn't have the expected hashsum", patch_name.c_str()); } if (Debug == true) @@ -643,7 +685,7 @@ int main(int argc, char **argv) _error->DumpErrors(std::cerr); exit(1); } - patch.read_diff(p); + patch.read_diff(p, NULL); } if (just_diff) { diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 7d72a6944..73df61895 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -170,6 +170,8 @@ SHA256-Patches: generatereleasefiles '+1hour' signreleasefiles testsuccess aptget update "$@" + cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output + testsuccess grep 'have the expected hashsum' rootdir/tmp/aptgetupdate.output testnopackage oldstuff testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff -- cgit v1.2.3-70-g09d2 From 6d3e5bd8e08564c5eb12ecd869de5bd71e25f59d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 7 Jun 2015 02:17:15 +0200 Subject: add more parsing error checking for rred The rred parser is very accepting regarding 'invalid' files. Given that we can't trust the input it might be a bit too relaxed. In any case, checking for more errors can't hurt given that we support only a very specific subset of ed commands. --- methods/rred.cc | 70 +++++++++----- test/integration/test-method-rred | 194 ++++++++++++++++++++++++++++++++++++++ test/integration/test-pdiff-usage | 3 +- 3 files changed, 245 insertions(+), 22 deletions(-) create mode 100755 test/integration/test-method-rred (limited to 'test/integration/test-pdiff-usage') diff --git a/methods/rred.cc b/methods/rred.cc index 3da33c126..81ecf8553 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -35,7 +36,7 @@ class MemBlock { char *start; size_t size; char *free; - struct MemBlock *next; + MemBlock *next; MemBlock(size_t size) : size(size), next(NULL) { @@ -116,7 +117,7 @@ struct Change { size_t add_len; /* bytes */ char *add; - Change(int off) + Change(size_t off) { offset = off; del_cnt = add_cnt = add_len = 0; @@ -388,30 +389,37 @@ class Patch { public: - void read_diff(FileFd &f, Hashes * const h) + bool read_diff(FileFd &f, Hashes * const h) { char buffer[BLOCK_SIZE]; bool cmdwanted = true; - Change ch(0); - while(f.ReadLine(buffer, sizeof(buffer))) - { + Change ch(std::numeric_limits::max()); + if (f.ReadLine(buffer, sizeof(buffer)) == NULL) + return _error->Error("Reading first line of patchfile %s failed", f.Name().c_str()); + do { if (h != NULL) h->Add(buffer); if (cmdwanted) { char *m, *c; size_t s, e; - s = strtol(buffer, &m, 10); - if (m == buffer) { - s = e = ch.offset + ch.add_cnt; - c = buffer; - } else if (*m == ',') { - m++; + errno = 0; + s = strtoul(buffer, &m, 10); + if (unlikely(m == buffer || s == ULONG_MAX || errno != 0)) + return _error->Error("Parsing patchfile %s failed: Expected an effected line start", f.Name().c_str()); + else if (*m == ',') { + ++m; e = strtol(m, &c, 10); + if (unlikely(m == c || e == ULONG_MAX || errno != 0)) + return _error->Error("Parsing patchfile %s failed: Expected an effected line end", f.Name().c_str()); + if (unlikely(e < s)) + return _error->Error("Parsing patchfile %s failed: Effected lines end %lu is before start %lu", f.Name().c_str(), e, s); } else { e = s; c = m; } + if (s > ch.offset) + return _error->Error("Parsing patchfile %s failed: Effected line is after previous effected line", f.Name().c_str()); switch(*c) { case 'a': cmdwanted = false; @@ -422,6 +430,8 @@ class Patch { ch.del_cnt = 0; break; case 'c': + if (unlikely(s == 0)) + return _error->Error("Parsing patchfile %s failed: Change command can't effect line zero", f.Name().c_str()); cmdwanted = false; ch.add = NULL; ch.add_cnt = 0; @@ -430,6 +440,8 @@ class Patch { ch.del_cnt = e - s + 1; break; case 'd': + if (unlikely(s == 0)) + return _error->Error("Parsing patchfile %s failed: Delete command can't effect line zero", f.Name().c_str()); ch.offset = s - 1; ch.del_cnt = e - s + 1; ch.add = NULL; @@ -437,9 +449,11 @@ class Patch { ch.add_len = 0; filechanges.add_change(ch); break; + default: + return _error->Error("Parsing patchfile %s failed: Unknown command", f.Name().c_str()); } } else { /* !cmdwanted */ - if (buffer[0] == '.' && buffer[1] == '\n') { + if (strcmp(buffer, ".\n") == 0) { cmdwanted = true; filechanges.add_change(ch); } else { @@ -465,7 +479,8 @@ class Patch { } } } - } + } while(f.ReadLine(buffer, sizeof(buffer))); + return true; } void write_diff(FILE *f) @@ -601,14 +616,14 @@ class RredMethod : public pkgAcqMethod { << std::endl; FileFd p; + Hashes patch_hash(I->ExpectedHashes); // all patches are compressed, even if the name doesn't reflect it - if (p.Open(patch_name, FileFd::ReadOnly, FileFd::Gzip) == false) { - std::cerr << "Could not open patch file " << patch_name << std::endl; + if (p.Open(patch_name, FileFd::ReadOnly, FileFd::Gzip) == false || + patch.read_diff(p, &patch_hash) == false) + { _error->DumpErrors(std::cerr); - abort(); + return false; } - Hashes patch_hash(I->ExpectedHashes); - patch.read_diff(p, &patch_hash); p.Close(); HashStringList const hsl = patch_hash.GetHashStringList(); if (hsl != I->ExpectedHashes) @@ -624,7 +639,6 @@ class RredMethod : public pkgAcqMethod { FILE *out = fopen(Itm->DestFile.c_str(), "w"); Hashes hash(Itm->ExpectedHashes); - patch.apply_against_file(out, inp, &hash); fclose(out); @@ -657,6 +671,16 @@ class RredMethod : public pkgAcqMethod { return true; } + bool Configuration(std::string Message) + { + if (pkgAcqMethod::Configuration(Message) == false) + return false; + + DropPrivsOrDie(); + + return true; + } + public: RredMethod() : pkgAcqMethod("2.0",SingleInstance | SendConfig), Debug(false) {} }; @@ -685,7 +709,11 @@ int main(int argc, char **argv) _error->DumpErrors(std::cerr); exit(1); } - patch.read_diff(p, NULL); + if (patch.read_diff(p, NULL) == false) + { + _error->DumpErrors(std::cerr); + exit(2); + } } if (just_diff) { diff --git a/test/integration/test-method-rred b/test/integration/test-method-rred new file mode 100755 index 000000000..a8de3ea28 --- /dev/null +++ b/test/integration/test-method-rred @@ -0,0 +1,194 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'i386' + +echo 'Package: coolstuff +Version: 0.8.15 +Description: collection of stuff + A lot, too much to iterate all, but at least this: + - stuff + - more stuff + - even more stuff + . + And a cow. + +Package: oldstuff +Version: 0-1 +Description: collection of outdated stuff + A lot, but of no use nowadays, but at least this: + - stuff + - more stuff + - even more stuff + . + And a dog.' > Packages + +testrred() { + msgtest "$1" "$2" + if [ -z "$3" ]; then + echo -n '' > Packages.ed + else + echo "$3" > Packages.ed + fi + rred() { + cat Packages | runapt "${METHODSDIR}/rred" "$@" + } + testsuccessequal "$4" --nomsg rred -f Packages.ed +} + +testrred 'Remove' 'first line' '1d' "$(tail -n +2 ./Packages)" +testrred 'Remove' 'empty line' '10d' "$(head -n 9 ./Packages) +$(tail -n 9 ./Packages)" +testrred 'Remove' 'line in a paragraph' '5d' "$(head -n 4 ./Packages) +$(tail -n 14 ./Packages)" +testrred 'Remove' 'last line' '19d' "$(head -n -1 ./Packages)" +testrred 'Remove' 'multiple single lines' '17d +7d' "$(sed -e '/^ - even more stuff$/ d' ./Packages)" +testrred 'Remove' 'first paragraph' '1,10d' "$(tail -n 9 ./Packages)" +testrred 'Remove' 'a few lines in the middle' '5,14d' "$(head -n 4 ./Packages) +$(tail -n 5 ./Packages)" +testrred 'Remove' 'second paragraph' '10,19d' "$(head -n 9 ./Packages)" +testrred 'Mass Remove' 'all stuff lines' '15,17d +13d +11d +5,7d +3d +1d' "$(sed '/stuff/ d' ./Packages)" + +testrred 'Single line add' 'first line' '0a +Format: 3.0 (native) +.' "Format: 3.0 (native) +$(cat ./Packages)" +testrred 'Single line add' 'last line' '19a +Multi-Arch: foreign +.' "$(cat ./Packages) +Multi-Arch: foreign" +testrred 'Single line add' 'middle' '9a +Multi-Arch: foreign +.' "$(head -n 9 ./Packages) +Multi-Arch: foreign +$(tail -n 10 ./Packages)" + +testrred 'Multi line add' 'first line' '0a +Format: 3.0 (native) +Source: apt +.' "Format: 3.0 (native) +Source: apt +$(cat ./Packages)" +testrred 'Multi line add' 'last line' '19a +Multi-Arch: foreign +Homepage: https://debian.org +.' "$(cat ./Packages) +Multi-Arch: foreign +Homepage: https://debian.org" +testrred 'Multi line add' 'middle' '9a +Multi-Arch: foreign +Homepage: https://debian.org +.' "$(head -n 9 ./Packages) +Multi-Arch: foreign +Homepage: https://debian.org +$(tail -n 10 ./Packages)" + +testrred 'Single line change' 'first line' '1c +Package: supercoolstuff +.' "Package: supercoolstuff +$(tail -n +2 ./Packages)" +testrred 'Single line change' 'in the middle' '9c + And a super cow. +.' "$(head -n 8 ./Packages) + And a super cow. +$(tail -n 10 ./Packages)" +testrred 'Single line change' 'an empty line' '10c + +.' "$(head -n 9 ./Packages) + +$(tail -n 9 ./Packages)" +testrred 'Single line change' 'a spacy line' '10c + +.' "$(head -n 9 ./Packages) + +$(tail -n 9 ./Packages)" +testrred 'Single line change' 'last line' '19c + And a cat. +.' "$(head -n -1 ./Packages) + And a cat." + +testrred 'Multi line change' 'exchange' '5,7c + - good stuff + - more good stuff + - even more good stuff +.' "$(head -n 4 ./Packages) + - good stuff + - more good stuff + - even more good stuff +$(tail -n 12 ./Packages)" +testrred 'Multi line change' 'less' '5,7c + - good stuff + - more good stuff +.' "$(head -n 4 ./Packages) + - good stuff + - more good stuff +$(tail -n 12 ./Packages)" +testrred 'Multi line change' 'more' '5,7c + - good stuff + - more good stuff + - even more good stuff + - bonus good stuff +.' "$(head -n 4 ./Packages) + - good stuff + - more good stuff + - even more good stuff + - bonus good stuff +$(tail -n 12 ./Packages)" + +failrred() { + msgtest 'Failure caused by' "$1" + echo "$2" > Packages.ed + rred() { + cat Packages | runapt "${METHODSDIR}/rred" "$@" + } + testfailure --nomsg rred -f Packages.ed +} + +failrred 'Bogus content' ' +' + +# not a problem per-se, but we want our parser to be really strict +failrred 'Empty patch file' '' +failrred 'Empty line patch file' ' +' +failrred 'Empty line before command' ' +1d' +failrred 'Empty line after command' '1d +' +failrred 'Empty line between commands' '17d + +7d' +failrred 'Empty spaces lines before command' ' +1d' +failrred 'Empty spaces lines after command' '1d + ' +failrred 'Empty spaces lines between commands' '17d + +7d' + +# the line before the first one can't be deleted/changed +failrred 'zero line delete' '0d' +failrred 'zero line change' '0c +Package: supercoolstuff +.' +# and this makes no sense at all +failrred 'negative line delete' '-1d' +failrred 'negative line change' '-1c +Package: supercoolstuff +.' +failrred 'negative line add' '-1a +Package: supercoolstuff +.' +failrred 'Wrong order of commands' '7d +17d' +failrred 'End before start' '7,6d' diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 73df61895..7a9f6496b 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -165,7 +165,8 @@ SHA256-History: SHA256-Patches: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX - echo 'I am Mallory and I change files' >> $PATCHFILE + # needs to look like a valid command, otherwise the parser will fail before hashes are checked + echo '1d' >> $PATCHFILE cat $PATCHFILE | gzip > ${PATCHFILE}.gz generatereleasefiles '+1hour' signreleasefiles -- cgit v1.2.3-70-g09d2 From 4f51fd8636592a96aecf17c8bf4cfdb3ea2207cc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 8 Jun 2015 00:06:41 +0200 Subject: support hashes for compressed pdiff files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment we only have hashes for the uncompressed pdiff files, but via the new '$HASH-Download' field in the .diff/Index hashes can be provided for the .gz compressed pdiff file, which apt will pick up now and use to verify the download. Now, we "just" need a buy in from the creators of repositories… --- apt-pkg/acquire-item.cc | 72 ++++++++++++++++++++++++++++++++------- apt-pkg/acquire-item.h | 11 +++--- apt-pkg/contrib/hashes.cc | 11 ++++-- apt-pkg/contrib/hashes.h | 7 ++++ apt-pkg/indexrecords.cc | 4 +-- methods/rred.cc | 2 +- test/integration/test-pdiff-usage | 46 +++++++++++++++++++++++-- 7 files changed, 125 insertions(+), 28 deletions(-) (limited to 'test/integration/test-pdiff-usage') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7b69ee993..a3f47242f 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -152,14 +152,18 @@ HashStringList pkgAcqMetaBase::GetExpectedHashes() const APT_CONST bool pkgAcqIndexDiffs::HashesRequired() const { - /* FIXME: We have only hashes for uncompressed pdiffs. - rred uncompresses them on the fly while parsing. - In StateFetchDiff state we also uncompress on the fly for hash check. - Hashes are checked while searching for (next) patch to apply. */ + /* We don't always have the diff of the downloaded pdiff file. + What we have for sure is hashes for the uncompressed file, + but rred uncompresses them on the fly while parsing, so not handled here. + Hashes are (also) checked while searching for (next) patch to apply. */ + if (State == StateFetchDiff) + return available_patches[0].download_hashes.empty() == false; return false; } HashStringList pkgAcqIndexDiffs::GetExpectedHashes() const { + if (State == StateFetchDiff) + return available_patches[0].download_hashes; return HashStringList(); } @@ -168,11 +172,15 @@ APT_CONST bool pkgAcqIndexMergeDiffs::HashesRequired() const /* @see #pkgAcqIndexDiffs::HashesRequired, with the difference that we can check the rred result after all patches are applied as we know the expected result rather than potentially apply more patches */ + if (State == StateFetchDiff) + return patch.download_hashes.empty() == false; return State == StateApplyDiff; } HashStringList pkgAcqIndexMergeDiffs::GetExpectedHashes() const { - if (State == StateApplyDiff) + if (State == StateFetchDiff) + return patch.download_hashes; + else if (State == StateApplyDiff) return GetExpectedHashesFor(Target->MetaKey); return HashStringList(); } @@ -1618,7 +1626,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ std::vector::iterator cur = available_patches.begin(); for (; cur != available_patches.end(); ++cur) { - if (cur->file != filename || unlikely(cur->result_size != size)) + if (cur->file != filename) continue; cur->result_hashes.push_back(HashString(*type, hash)); break; @@ -1630,8 +1638,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ DiffInfo next; next.file = filename; next.result_hashes.push_back(HashString(*type, hash)); - next.result_size = size; - next.patch_size = 0; + next.result_hashes.FileSize(size); available_patches.push_back(next); } else @@ -1679,10 +1686,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ { if (cur->file != filename) continue; - if (unlikely(cur->patch_size != 0 && cur->patch_size != size)) - continue; + if (cur->patch_hashes.empty()) + cur->patch_hashes.FileSize(size); cur->patch_hashes.push_back(HashString(*type, hash)); - cur->patch_size = size; break; } if (cur != available_patches.end()) @@ -1694,6 +1700,48 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ } } + for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type) + { + std::string tagname = *type; + tagname.append("-Download"); + std::string const tmp = Tags.FindS(tagname.c_str()); + if (tmp.empty() == true) + continue; + + string hash, filename; + unsigned long long size; + std::stringstream ss(tmp); + + // FIXME: all of pdiff supports only .gz compressed patches + while (ss >> hash >> size >> filename) + { + if (unlikely(hash.empty() == true || filename.empty() == true)) + continue; + if (unlikely(APT::String::Endswith(filename, ".gz") == false)) + continue; + filename.erase(filename.length() - 3); + + // see if we have a record for this file already + std::vector::iterator cur = available_patches.begin(); + for (; cur != available_patches.end(); ++cur) + { + if (cur->file != filename) + continue; + if (cur->download_hashes.empty()) + cur->download_hashes.FileSize(size); + cur->download_hashes.push_back(HashString(*type, hash)); + break; + } + if (cur != available_patches.end()) + continue; + if (Debug == true) + std::clog << "pkgAcqDiffIndex: " << IndexDiffFile << ": File " << filename + << " wasn't in the list for the first parsed hash! (download)" << std::endl; + break; + } + } + + bool foundStart = false; for (std::vector::iterator cur = available_patches.begin(); cur != available_patches.end(); ++cur) @@ -1729,7 +1777,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ unsigned long long patchesSize = 0; for (std::vector::const_iterator cur = available_patches.begin(); cur != available_patches.end(); ++cur) - patchesSize += cur->patch_size; + patchesSize += cur->patch_hashes.FileSize(); unsigned long long const sizeLimit = ServerSize * _config->FindI("Acquire::PDiffs::SizeLimit", 100); if (sizeLimit > 0 && (sizeLimit/100) < patchesSize) { diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index f24af1aec..910e4131b 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -705,17 +705,14 @@ struct APT_HIDDEN DiffInfo { /*{{{*/ /** The filename of the diff. */ std::string file; - /** The hashes of the diff */ + /** The hashes of the file after the diff is applied */ HashStringList result_hashes; - /** The hashes of the file after the diff is applied */ + /** The hashes of the diff */ HashStringList patch_hashes; - /** The size of the file after the diff is applied */ - unsigned long long result_size; - - /** The size of the diff itself */ - unsigned long long patch_size; + /** The hashes of the compressed diff */ + HashStringList download_hashes; }; /*}}}*/ /** \brief An item that is responsible for fetching client-merge patches {{{ diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index 11a7e479b..46cf0ba08 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -188,6 +188,13 @@ unsigned long long HashStringList::FileSize() const /*{{{*/ return strtoull(hv.c_str(), NULL, 10); } /*}}}*/ +bool HashStringList::FileSize(unsigned long long const Size) /*{{{*/ +{ + std::string size; + strprintf(size, "%llu", Size); + return push_back(HashString("Checksum-FileSize", size)); +} + /*}}}*/ bool HashStringList::supported(char const * const type) /*{{{*/ { for (char const * const * t = HashString::SupportedHashes(); *t != NULL; ++t) @@ -361,9 +368,7 @@ APT_IGNORE_DEPRECATED_PUSH if ((d->CalcHashes & SHA512SUM) == SHA512SUM) hashes.push_back(HashString("SHA512", SHA512.Result().Value())); APT_IGNORE_DEPRECATED_POP - std::string SizeStr; - strprintf(SizeStr, "%llu", d->FileSize); - hashes.push_back(HashString("Checksum-FileSize", SizeStr)); + hashes.FileSize(d->FileSize); return hashes; } APT_IGNORE_DEPRECATED_PUSH diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 176ce4faa..e8d84da9e 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -96,6 +96,13 @@ class HashStringList */ unsigned long long FileSize() const; + /** sets the filesize hash + * + * @param Size of the file + * @return @see #push_back + */ + bool FileSize(unsigned long long const Size); + /** check if the given hash type is supported * * @param type to check diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc index c26868cac..7e6da9558 100644 --- a/apt-pkg/indexrecords.cc +++ b/apt-pkg/indexrecords.cc @@ -121,9 +121,7 @@ bool indexRecords::Load(const string Filename) /*{{{*/ indexRecords::checkSum *Sum = new indexRecords::checkSum; Sum->MetaKeyFilename = Name; Sum->Size = Size; - std::string SizeStr; - strprintf(SizeStr, "%llu", Size); - Sum->Hashes.push_back(HashString("Checksum-FileSize", SizeStr)); + Sum->Hashes.FileSize(Size); APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);) Entries[Name] = Sum; } diff --git a/methods/rred.cc b/methods/rred.cc index 81ecf8553..12cf2b4a5 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -627,7 +627,7 @@ class RredMethod : public pkgAcqMethod { p.Close(); HashStringList const hsl = patch_hash.GetHashStringList(); if (hsl != I->ExpectedHashes) - return _error->Error("Patch %s doesn't have the expected hashsum", patch_name.c_str()); + return _error->Error("Hash Sum mismatch for uncompressed patch %s", patch_name.c_str()); } if (Debug == true) diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 7a9f6496b..3295d5497 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -42,6 +42,8 @@ wasmergeused() { testrun() { msgmsg "Testcase: setup the base with: $*" + local DOWNLOADHASH=true + if [ "$1" = 'nohash' ]; then DOWNLOADHASH=false; shift; fi find aptarchive -name 'Packages*' -type f -delete cp ${PKGFILE} aptarchive/Packages compressfile 'aptarchive/Packages' @@ -76,6 +78,15 @@ SHA256-History: SHA256-Patches: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX + if $DOWNLOADHASH; then + echo "SHA1-Download: + 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz + $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz) +SHA256-Download: + d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz + $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX + fi + generatereleasefiles '+1hour' signreleasefiles find aptarchive -name 'Packages*' -type f -delete @@ -131,6 +142,17 @@ SHA256-Patches: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE) $(sha256sum ${PATCHFILE2} | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}) $(basename ${PATCHFILE2})" > $PATCHINDEX + if $DOWNLOADHASH; then + echo "SHA1-Download: + 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz + $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz) + $(sha1sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz) +SHA256-Download: + d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz + $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz) + $(sha256sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz)" >> $PATCHINDEX + fi + generatereleasefiles '+2hour' signreleasefiles cp -a aptarchive/Packages Packages-future @@ -150,6 +172,7 @@ SHA256-Patches: mkdir -p aptarchive/Packages.diff PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)" diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true + cat $PATCHFILE | gzip > ${PATCHFILE}.gz PATCHINDEX='aptarchive/Packages.diff/Index' echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) SHA1-History: @@ -165,14 +188,22 @@ SHA256-History: SHA256-Patches: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX + if $DOWNLOADHASH; then + echo "SHA1-Download: + 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz + $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz) +SHA256-Download: + d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz + $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX + fi # needs to look like a valid command, otherwise the parser will fail before hashes are checked - echo '1d' >> $PATCHFILE + echo '1d' > $PATCHFILE cat $PATCHFILE | gzip > ${PATCHFILE}.gz generatereleasefiles '+1hour' signreleasefiles testsuccess aptget update "$@" cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output - testsuccess grep 'have the expected hashsum' rootdir/tmp/aptgetupdate.output + testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptgetupdate.output testnopackage oldstuff testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff @@ -201,6 +232,14 @@ SHA256-History: SHA256-Patches: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28 $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE)" > $PATCHINDEX + if $DOWNLOADHASH; then + echo "SHA1-Download: + 2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz + $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz) +SHA256-Download: + d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz + $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX + fi generatereleasefiles '+1hour' signreleasefiles #find aptarchive -name 'Packages*' -type f -delete @@ -215,6 +254,9 @@ echo 'Debug::pkgAcquire::Diffs "true"; Debug::Acquire::Transaction "true"; Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf +testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 +testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 + testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 -- cgit v1.2.3-70-g09d2 From 1eb1836f4b5397497bd34f0cf516e6e4e73117bf Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 15 Jun 2015 16:41:43 +0200 Subject: show item ID in Hit, Ign and Err lines as well Again, consistency is the main sellingpoint here, but this way it is now also easier to explain that some files move through different stages and lines are printed for them hence multiple times: That is a bit hard to believe if the number is changing all the time, but now that it keeps consistent. --- apt-pkg/acquire-item.cc | 2 +- apt-private/acqprogress.cc | 38 +++++++++++++++----- apt-private/acqprogress.h | 3 +- po/apt-all.pot | 12 ++++--- po/ar.po | 18 ++++++---- po/ast.po | 20 ++++++----- po/bg.po | 20 ++++++----- po/bs.po | 8 ++--- po/ca.po | 20 ++++++----- po/cs.po | 20 ++++++----- po/cy.po | 20 ++++++----- po/da.po | 20 ++++++----- po/de.po | 20 ++++++----- po/dz.po | 20 ++++++----- po/el.po | 20 ++++++----- po/es.po | 20 ++++++----- po/eu.po | 20 ++++++----- po/fi.po | 20 ++++++----- po/fr.po | 20 ++++++----- po/gl.po | 20 ++++++----- po/he.po | 12 ++++--- po/hu.po | 20 ++++++----- po/it.po | 21 +++++++----- po/ja.po | 20 ++++++----- po/km.po | 20 ++++++----- po/ko.po | 20 ++++++----- po/ku.po | 16 +++++---- po/lt.po | 20 ++++++----- po/mr.po | 20 ++++++----- po/nb.po | 20 ++++++----- po/ne.po | 20 ++++++----- po/nl.po | 20 ++++++----- po/nn.po | 20 ++++++----- po/pl.po | 20 ++++++----- po/pt.po | 20 ++++++----- po/pt_BR.po | 20 ++++++----- po/ro.po | 20 ++++++----- po/ru.po | 20 ++++++----- po/sk.po | 20 ++++++----- po/sl.po | 20 ++++++----- po/sv.po | 20 ++++++----- po/th.po | 20 ++++++----- po/tl.po | 20 ++++++----- po/tr.po | 20 ++++++----- po/uk.po | 20 ++++++----- po/vi.po | 20 ++++++----- po/zh_CN.po | 20 ++++++----- po/zh_TW.po | 20 ++++++----- test/integration/test-apt-acquire-additional-files | 10 +++--- test/integration/test-apt-cdrom | 4 +-- .../integration/test-apt-get-update-unauth-warning | 14 ++++---- test/integration/test-apt-update-ims | 36 +++++++++---------- test/integration/test-apt-update-not-modified | 40 +++++++++++----------- .../test-bug-595691-empty-and-broken-archive-files | 14 ++++---- test/integration/test-bug-602412-dequote-redirect | 2 +- test/integration/test-pdiff-usage | 2 +- .../test-ubuntu-bug-1098738-apt-get-source-md5sum | 8 ++--- 57 files changed, 618 insertions(+), 422 deletions(-) (limited to 'test/integration/test-pdiff-usage') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 50936b627..5460280ec 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -405,7 +405,7 @@ class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/ // Acquire::Item::Item - Constructor /*{{{*/ APT_IGNORE_DEPRECATED_PUSH pkgAcquire::Item::Item(pkgAcquire * const Owner) : - FileSize(0), PartialSize(0), Mode(0), Complete(false), Local(false), + FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false), Local(false), QueueCounter(0), ExpectedAdditionalItems(0), Owner(Owner) { Owner->Add(this); diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index 0c606e48e..dc92e3b2a 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -49,6 +49,16 @@ void AcqTextStatus::Start() ID = 1; } /*}}}*/ +void AcqTextStatus::AssignItemID(pkgAcquire::ItemDesc &Itm) /*{{{*/ +{ + /* In theory calling it from Fetch() would be enough, but to be + safe we call it from IMSHit and Fail as well. + Also, an Item can pass through multiple stages, so ensure + that it keeps the same number */ + if (Itm.Owner->ID == 0) + Itm.Owner->ID = ID++; +} + /*}}}*/ // AcqTextStatus::IMSHit - Called when an item got a HIT response /*{{{*/ // --------------------------------------------------------------------- /* */ @@ -57,9 +67,11 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm) if (Quiet > 1) return; + AssignItemID(Itm); clearLastLine(); - out << _("Hit ") << Itm.Description; + // TRANSLATOR: Very short word to be displayed before unchanged files in 'apt-get update' + ioprintf(out, _("Hit:%lu %s"), Itm.Owner->ID, Itm.Description.c_str()); out << std::endl; Update = true; } @@ -72,15 +84,16 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) Update = true; if (Itm.Owner->Complete == true) return; - - Itm.Owner->ID = ID++; + AssignItemID(Itm); if (Quiet > 1) return; clearLastLine(); - out << _("Get:") << Itm.Owner->ID << ' ' << Itm.Description; + // TRANSLATOR: Very short word to be displayed for files processed in 'apt-get update' + // Potentially replaced later by "Hit:", "Ign:" or "Err:" if something (bad) happens + ioprintf(out, _("Get:%lu %s"), Itm.Owner->ID, Itm.Description.c_str()); if (Itm.Owner->FileSize != 0) out << " [" << SizeToStr(Itm.Owner->FileSize) << "B]"; out << std::endl; @@ -89,9 +102,10 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) // AcqTextStatus::Done - Completed a download /*{{{*/ // --------------------------------------------------------------------- /* We don't display anything... */ -void AcqTextStatus::Done(pkgAcquire::ItemDesc &/*Itm*/) +void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm) { Update = true; + AssignItemID(Itm); } /*}}}*/ // AcqTextStatus::Fail - Called when an item fails to download /*{{{*/ @@ -106,19 +120,25 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm) if (Itm.Owner->Status == pkgAcquire::Item::StatIdle) return; + AssignItemID(Itm); clearLastLine(); if (Itm.Owner->Status == pkgAcquire::Item::StatDone) { - out << _("Ign ") << Itm.Description << std::endl; + // TRANSLATOR: Very short word to be displayed for files in 'apt-get update' + // which failed to download, but the error is ignored (compare "Err:") + ioprintf(out, _("Ign:%lu %s"), Itm.Owner->ID, Itm.Description.c_str()); if (Itm.Owner->ErrorText.empty() == false && _config->FindB("Acquire::Progress::Ignore::ShowErrorText", false) == true) - out << " " << Itm.Owner->ErrorText << std::endl; + out << std::endl << " " << Itm.Owner->ErrorText; + out << std::endl; } else { - out << _("Err ") << Itm.Description << std::endl; - out << " " << Itm.Owner->ErrorText << std::endl; + // TRANSLATOR: Very short word to be displayed for files in 'apt-get update' + // which failed to download and the error is critical (compare "Ign:") + ioprintf(out, _("Err:%lu %s"), Itm.Owner->ID, Itm.Description.c_str()); + out << std::endl << " " << Itm.Owner->ErrorText << std::endl; } Update = true; diff --git a/apt-private/acqprogress.h b/apt-private/acqprogress.h index 7cf990c65..cbb06fbec 100644 --- a/apt-private/acqprogress.h +++ b/apt-private/acqprogress.h @@ -23,7 +23,8 @@ class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus unsigned long ID; unsigned long Quiet; - void clearLastLine(); + APT_HIDDEN void clearLastLine(); + APT_HIDDEN void AssignItemID(pkgAcquire::ItemDesc &Itm); public: diff --git a/po/apt-all.pot b/po/apt-all.pot index b68d801ea..73b033876 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -1529,19 +1529,23 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " +#, c-format +msgid "Hit:%lu %s" msgstr "" #: apt-private/acqprogress.cc:88 -msgid "Get:" +#, c-format +msgid "Get:%lu %s" msgstr "" #: apt-private/acqprogress.cc:119 -msgid "Ign " +#, c-format +msgid "Ign:%lu %s" msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " +#, c-format +msgid "Err:%lu %s" msgstr "" #: apt-private/acqprogress.cc:150 diff --git a/po/ar.po b/po/ar.po index e2b179d0e..3e71fef80 100644 --- a/po/ar.po +++ b/po/ar.po @@ -1555,20 +1555,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " +#, c-format +msgid "Hit:%lu %s" msgstr "" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "جلب:" +#, c-format +msgid "Get:%lu %s" +msgstr "جلب:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "تجاهل" +#, c-format +msgid "Ign:%lu %s" +msgstr "تجاهل:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "خطأ" +#, c-format +msgid "Err:%lu %s" +msgstr "خطأ:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ast.po b/po/ast.po index 1efbbc1d2..1995c12f6 100644 --- a/po/ast.po +++ b/po/ast.po @@ -1684,20 +1684,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Oxe " +#, c-format +msgid "Hit:%lu %s" +msgstr "Oxe:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Des:" +#, c-format +msgid "Get:%lu %s" +msgstr "Des:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/bg.po b/po/bg.po index bbe6df3ae..7dff005e6 100644 --- a/po/bg.po +++ b/po/bg.po @@ -1720,20 +1720,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Поп " +#, c-format +msgid "Hit:%lu %s" +msgstr "Поп:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Изт:" +#, c-format +msgid "Get:%lu %s" +msgstr "Изт:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Игн " +#, c-format +msgid "Ign:%lu %s" +msgstr "Игн:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Грш " +#, c-format +msgid "Err:%lu %s" +msgstr "Грш:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/bs.po b/po/bs.po index 9cd1adc85..abb9a570a 100644 --- a/po/bs.po +++ b/po/bs.po @@ -1555,19 +1555,19 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " +msgid "Hit:%lu %s" msgstr "" #: apt-private/acqprogress.cc:88 -msgid "Get:" +msgid "Get:%lu %s" msgstr "" #: apt-private/acqprogress.cc:119 -msgid "Ign " +msgid "Ign:%lu %s" msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " +msgid "Err:%lu %s" msgstr "" #: apt-private/acqprogress.cc:150 diff --git a/po/ca.po b/po/ca.po index cdb3ceeb8..065ad0ea7 100644 --- a/po/ca.po +++ b/po/ca.po @@ -1708,20 +1708,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Obj " +#, c-format +msgid "Hit:%lu %s" +msgstr "Obj:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Bai:" +#, c-format +msgid "Get:%lu %s" +msgstr "Bai:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/cs.po b/po/cs.po index 76fc37b6b..3f6bcb4a7 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1734,20 +1734,24 @@ msgid "Full Text Search" msgstr "Fulltextové hledání" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Cíl " +#, c-format +msgid "Hit:%lu %s" +msgstr "Cíl:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Mám:" +#, c-format +msgid "Get:%lu %s" +msgstr "Mám:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/cy.po b/po/cy.po index e29221cd1..b05bc7c59 100644 --- a/po/cy.po +++ b/po/cy.po @@ -1706,20 +1706,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Presennol " +#, c-format +msgid "Hit:%lu %s" +msgstr "Presennol:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Cyrchu:" +#, c-format +msgid "Get:%lu %s" +msgstr "Cyrchu:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Anwybyddu " +#, c-format +msgid "Ign:%lu %s" +msgstr "Anwybyddu:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Gwall " +#, c-format +msgid "Err:%lu %s" +msgstr "Gwall:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/da.po b/po/da.po index 53d3de059..d6b8e07a1 100644 --- a/po/da.po +++ b/po/da.po @@ -1749,20 +1749,24 @@ msgid "Full Text Search" msgstr "Fuldtekst-søgning" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Havde " +#, c-format +msgid "Hit:%lu %s" +msgstr "Havde:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Henter:" +#, c-format +msgid "Get:%lu %s" +msgstr "Henter:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ignorerer " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ignorerer:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Fejl " +#, c-format +msgid "Err:%lu %s" +msgstr "Fejl:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/de.po b/po/de.po index 85b0cb7ac..d4ca0d5a0 100644 --- a/po/de.po +++ b/po/de.po @@ -1810,20 +1810,24 @@ msgid "Full Text Search" msgstr "Volltextsuche" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "OK " +#, c-format +msgid "Hit:%lu %s" +msgstr "OK:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Holen: " +#, c-format +msgid "Get:%lu %s" +msgstr "Holen:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ign:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Fehl " +#, c-format +msgid "Err:%lu %s" +msgstr "Fehl:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/dz.po b/po/dz.po index 8d1e57b35..a4c50d245 100644 --- a/po/dz.po +++ b/po/dz.po @@ -1674,20 +1674,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "ཨེབ།" +#, c-format +msgid "Hit:%lu %s" +msgstr "ཨེབ།:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "ལེན:" +#, c-format +msgid "Get:%lu %s" +msgstr "ལེན:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "ཨེལ་ཇི་ཨེན:" +#, c-format +msgid "Ign:%lu %s" +msgstr "ཨེལ་ཇི་ཨེན:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "ཨི་ཨར་ཨར།" +#, c-format +msgid "Err:%lu %s" +msgstr "ཨི་ཨར་ཨར།:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/el.po b/po/el.po index e0750b61e..98e1f31c9 100644 --- a/po/el.po +++ b/po/el.po @@ -1695,20 +1695,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Hit " +#, c-format +msgid "Hit:%lu %s" +msgstr "Hit:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Φέρε:" +#, c-format +msgid "Get:%lu %s" +msgstr "Φέρε:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Αγνόησε " +#, c-format +msgid "Ign:%lu %s" +msgstr "Αγνόησε:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Σφάλμα " +#, c-format +msgid "Err:%lu %s" +msgstr "Σφάλμα:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/es.po b/po/es.po index e094ccafa..a2a9a71e9 100644 --- a/po/es.po +++ b/po/es.po @@ -1820,20 +1820,24 @@ msgid "Full Text Search" msgstr "Buscar en todo el texto" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Obj " +#, c-format +msgid "Hit:%lu %s" +msgstr "Obj:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Des:" +#, c-format +msgid "Get:%lu %s" +msgstr "Des:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/eu.po b/po/eu.po index e268f6059..f1e90411a 100644 --- a/po/eu.po +++ b/po/eu.po @@ -1678,20 +1678,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Atzituta " +#, c-format +msgid "Hit:%lu %s" +msgstr "Atzituta:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Hartu:" +#, c-format +msgid "Get:%lu %s" +msgstr "Hartu:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ez ikusi " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ez ikusi:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/fi.po b/po/fi.po index d58fb9b04..c40ed8e9e 100644 --- a/po/fi.po +++ b/po/fi.po @@ -1669,20 +1669,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Löytyi " +#, c-format +msgid "Hit:%lu %s" +msgstr "Löytyi:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Nouda:" +#, c-format +msgid "Get:%lu %s" +msgstr "Nouda:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Siv " +#, c-format +msgid "Ign:%lu %s" +msgstr "Siv:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Vrhe " +#, c-format +msgid "Err:%lu %s" +msgstr "Vrhe:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/fr.po b/po/fr.po index cb9d82856..ecb752f5e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1774,20 +1774,24 @@ msgid "Full Text Search" msgstr "Recherche en texte intégral" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Atteint " +#, c-format +msgid "Hit:%lu %s" +msgstr "Atteint:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Réception de : " +#, c-format +msgid "Get:%lu %s" +msgstr "Réception de:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ign:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "Err:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/gl.po b/po/gl.po index d6bb1e92e..2adaa302a 100644 --- a/po/gl.po +++ b/po/gl.po @@ -1706,20 +1706,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Teño " +#, c-format +msgid "Hit:%lu %s" +msgstr "Teño:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Rcb:" +#, c-format +msgid "Get:%lu %s" +msgstr "Rcb:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/he.po b/po/he.po index b3ef8f831..ab7b50745 100644 --- a/po/he.po +++ b/po/he.po @@ -1188,19 +1188,23 @@ msgid "" msgstr "" #: cmdline/acqprogress.cc:55 -msgid "Hit " +#, c-format +msgid "Hit:%lu %s" msgstr "" #: cmdline/acqprogress.cc:79 -msgid "Get:" +#, c-format +msgid "Get:%lu %s" msgstr "" #: cmdline/acqprogress.cc:110 -msgid "Ign " +#, c-format +msgid "Ign:%lu %s" msgstr "" #: cmdline/acqprogress.cc:114 -msgid "Err " +#, c-format +msgid "Err:%lu %s" msgstr "" #: cmdline/acqprogress.cc:135 diff --git a/po/hu.po b/po/hu.po index 313f3a492..635184c75 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1714,20 +1714,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Találat " +#, c-format +msgid "Hit:%lu %s" +msgstr "Találat:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Letöltés:" +#, c-format +msgid "Get:%lu %s" +msgstr "Letöltés:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Mellőz " +#, c-format +msgid "Ign:%lu %s" +msgstr "Mellőz:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Hiba " +#, c-format +msgid "Err:%lu %s" +msgstr "Hiba:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/it.po b/po/it.po index 36173e92c..178754c52 100644 --- a/po/it.po +++ b/po/it.po @@ -1766,21 +1766,24 @@ msgid "Full Text Search" msgstr "Ricerca sul testo" #: apt-private/acqprogress.cc:62 -msgid "Hit " -msgstr "Trovato " +#, c-format +msgid "Hit:%lu %s" +msgstr "Trovato:%lu %s" #: apt-private/acqprogress.cc:83 -msgid "Get:" -msgstr "Scaricamento di:" +#, c-format +msgid "Get:%lu %s" +msgstr "Scaricamento di:%lu %s" -# (ndt) questa non so cosa voglia dire #: apt-private/acqprogress.cc:113 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:120 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:143 #, c-format diff --git a/po/ja.po b/po/ja.po index 6c49f2608..f8f55f8aa 100644 --- a/po/ja.po +++ b/po/ja.po @@ -1750,20 +1750,24 @@ msgid "Full Text Search" msgstr "全文検索" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "ヒット " +#, c-format +msgid "Hit:%lu %s" +msgstr "ヒット:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "取得:" +#, c-format +msgid "Get:%lu %s" +msgstr "取得:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "無視 " +#, c-format +msgid "Ign:%lu %s" +msgstr "無視:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "エラー " +#, c-format +msgid "Err:%lu %s" +msgstr "エラー:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/km.po b/po/km.po index 26bfe4361..8c72865f8 100644 --- a/po/km.po +++ b/po/km.po @@ -1652,20 +1652,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "វាយ​" +#, c-format +msgid "Hit:%lu %s" +msgstr "វាយ​:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "យក​ ៖" +#, c-format +msgid "Get:%lu %s" +msgstr "យក​ ៖:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ko.po b/po/ko.po index 5479ab790..51cc27d61 100644 --- a/po/ko.po +++ b/po/ko.po @@ -1666,20 +1666,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "기존 " +#, c-format +msgid "Hit:%lu %s" +msgstr "기존:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "받기:" +#, c-format +msgid "Get:%lu %s" +msgstr "받기:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "무시" +#, c-format +msgid "Ign:%lu %s" +msgstr "무시:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "오류 " +#, c-format +msgid "Err:%lu %s" +msgstr "오류:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ku.po b/po/ku.po index c14ca94bd..540307937 100644 --- a/po/ku.po +++ b/po/ku.po @@ -1558,20 +1558,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " +#, c-format +msgid "Hit:%lu %s" msgstr "" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Anîn:" +#, c-format +msgid "Get:%lu %s" +msgstr "Anîn:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " +#, c-format +msgid "Ign:%lu %s" msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Çewt" +#, c-format +msgid "Err:%lu %s" +msgstr "Çewt:%lu %s" #: apt-private/acqprogress.cc:150 #, fuzzy, c-format diff --git a/po/lt.po b/po/lt.po index b85a0fbe1..1f485b28d 100644 --- a/po/lt.po +++ b/po/lt.po @@ -1577,20 +1577,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Imamas " +#, c-format +msgid "Hit:%lu %s" +msgstr "Imamas:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Gauti:" +#, c-format +msgid "Get:%lu %s" +msgstr "Gauti:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ignoruotas " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ignoruotas:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Klaida " +#, c-format +msgid "Err:%lu %s" +msgstr "Klaida:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/mr.po b/po/mr.po index 286c5d859..24e470cef 100644 --- a/po/mr.po +++ b/po/mr.po @@ -1656,20 +1656,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "दाबा" +#, c-format +msgid "Hit:%lu %s" +msgstr "दाबा:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "मिळवा:" +#, c-format +msgid "Get:%lu %s" +msgstr "मिळवा:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "आय.जी.एन." +#, c-format +msgid "Ign:%lu %s" +msgstr "आय.जी.एन.:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "दोष इ.आर.आर." +#, c-format +msgid "Err:%lu %s" +msgstr "दोष इ.आर.आर.:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/nb.po b/po/nb.po index 07247be4f..433e33909 100644 --- a/po/nb.po +++ b/po/nb.po @@ -1684,20 +1684,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Funnet " +#, c-format +msgid "Hit:%lu %s" +msgstr "Funnet:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Hent:" +#, c-format +msgid "Get:%lu %s" +msgstr "Hent:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ign:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Feil " +#, c-format +msgid "Err:%lu %s" +msgstr "Feil:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ne.po b/po/ne.po index 54dd771b4..4c6f2d098 100644 --- a/po/ne.po +++ b/po/ne.po @@ -1652,20 +1652,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "हान्नुहोस्" +#, c-format +msgid "Hit:%lu %s" +msgstr "हान्नुहोस्:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "प्राप्त गर्नुहोस्:" +#, c-format +msgid "Get:%lu %s" +msgstr "प्राप्त गर्नुहोस्:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/nl.po b/po/nl.po index 8d226dfef..5c774fe8d 100644 --- a/po/nl.po +++ b/po/nl.po @@ -1776,20 +1776,24 @@ msgid "Full Text Search" msgstr "Volledige tekst doorzoeken" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Geraakt " +#, c-format +msgid "Hit:%lu %s" +msgstr "Geraakt:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Ophalen:" +#, c-format +msgid "Get:%lu %s" +msgstr "Ophalen:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Genegeerd " +#, c-format +msgid "Ign:%lu %s" +msgstr "Genegeerd:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Fout " +#, c-format +msgid "Err:%lu %s" +msgstr "Fout:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/nn.po b/po/nn.po index b3622b6cd..0886c266a 100644 --- a/po/nn.po +++ b/po/nn.po @@ -1668,20 +1668,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Treff " +#, c-format +msgid "Hit:%lu %s" +msgstr "Treff:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Hent:" +#, c-format +msgid "Get:%lu %s" +msgstr "Hent:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ign:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Feil " +#, c-format +msgid "Err:%lu %s" +msgstr "Feil:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/pl.po b/po/pl.po index 0dda22a47..1851fa805 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1749,22 +1749,26 @@ msgstr "" # Ujednolicono z aptitude #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Stary " +#, c-format +msgid "Hit:%lu %s" +msgstr "Stary:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Pobieranie:" +#, c-format +msgid "Get:%lu %s" +msgstr "Pobieranie:%lu %s" # Wyrównane do Hit i Err. #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign. " +#, c-format +msgid "Ign:%lu %s" +msgstr "" # Wyrównane do Hit i Ign. #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Błąd " +#, c-format +msgid "Err:%lu %s" +msgstr "Błąd:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/pt.po b/po/pt.po index a4b1105f8..4f05ada82 100644 --- a/po/pt.po +++ b/po/pt.po @@ -1718,20 +1718,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Hit " +#, c-format +msgid "Hit:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Obter:" +#, c-format +msgid "Get:%lu %s" +msgstr "Obter:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index 0c4d92d02..5e2abd988 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1687,20 +1687,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Atingido " +#, c-format +msgid "Hit:%lu %s" +msgstr "Atingido:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Obter:" +#, c-format +msgid "Get:%lu %s" +msgstr "Obter:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ro.po b/po/ro.po index 63df026ab..9b0a1494a 100644 --- a/po/ro.po +++ b/po/ro.po @@ -1695,20 +1695,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Atins " +#, c-format +msgid "Hit:%lu %s" +msgstr "Atins:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Luat:" +#, c-format +msgid "Get:%lu %s" +msgstr "Luat:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ignorat " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ignorat:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Eroare" +#, c-format +msgid "Err:%lu %s" +msgstr "Eroare:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/ru.po b/po/ru.po index 260bdd513..2028e5420 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1742,20 +1742,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "В кэше " +#, c-format +msgid "Hit:%lu %s" +msgstr "В кэше:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Получено:" +#, c-format +msgid "Get:%lu %s" +msgstr "Получено:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Игн " +#, c-format +msgid "Ign:%lu %s" +msgstr "Игн:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Ош " +#, c-format +msgid "Err:%lu %s" +msgstr "Ош:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/sk.po b/po/sk.po index 912d1fcf7..631ddd826 100644 --- a/po/sk.po +++ b/po/sk.po @@ -1716,20 +1716,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Už existuje " +#, c-format +msgid "Hit:%lu %s" +msgstr "Už existuje:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Získava sa:" +#, c-format +msgid "Get:%lu %s" +msgstr "Získava sa:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Chyba " +#, c-format +msgid "Err:%lu %s" +msgstr "Chyba:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/sl.po b/po/sl.po index 3210fa504..845fe3c5f 100644 --- a/po/sl.po +++ b/po/sl.po @@ -1717,20 +1717,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Zadetek " +#, c-format +msgid "Hit:%lu %s" +msgstr "Zadetek:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Dobi:" +#, c-format +msgid "Get:%lu %s" +msgstr "Dobi:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Prezr " +#, c-format +msgid "Ign:%lu %s" +msgstr "Prezr:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Nap " +#, c-format +msgid "Err:%lu %s" +msgstr "Nap:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/sv.po b/po/sv.po index 70f4b2d2d..52f65b598 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1698,23 +1698,27 @@ msgstr "" # Måste vara tre bokstäver(?) # "Hit" = aktuell version är fortfarande giltig #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Bra " +#, c-format +msgid "Hit:%lu %s" +msgstr "Bra:%lu %s" # "Get:" = hämtar ny version #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Läs:" +#, c-format +msgid "Get:%lu %s" +msgstr "Läs:%lu %s" # "Ign" = hoppar över #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ign " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ign:%lu %s" # "Err" = fel vid hämtning #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Fel " +#, c-format +msgid "Err:%lu %s" +msgstr "Fel:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/th.po b/po/th.po index 147c3b8b8..60a468ea4 100644 --- a/po/th.po +++ b/po/th.po @@ -1696,20 +1696,24 @@ msgid "Full Text Search" msgstr "ค้นทั่วทั้งเนื้อความ" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "เจอ " +#, c-format +msgid "Hit:%lu %s" +msgstr "เจอ:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "ดึง:" +#, c-format +msgid "Get:%lu %s" +msgstr "ดึง:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "ข้าม " +#, c-format +msgid "Ign:%lu %s" +msgstr "ข้าม:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "ปัญหา " +#, c-format +msgid "Err:%lu %s" +msgstr "ปัญหา:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/tl.po b/po/tl.po index e3da79c8a..970b0b387 100644 --- a/po/tl.po +++ b/po/tl.po @@ -1677,20 +1677,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Tumama " +#, c-format +msgid "Hit:%lu %s" +msgstr "Tumama:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Kunin: " +#, c-format +msgid "Get:%lu %s" +msgstr "Kunin:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "DiPansin " +#, c-format +msgid "Ign:%lu %s" +msgstr "DiPansin:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Err " +#, c-format +msgid "Err:%lu %s" +msgstr "Err:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/tr.po b/po/tr.po index 5d9c3cee3..1e6f38903 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1753,20 +1753,24 @@ msgid "Full Text Search" msgstr "Tam Metin Arama" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Bağlandı " +#, c-format +msgid "Hit:%lu %s" +msgstr "Bağlandı:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Alınıyor: " +#, c-format +msgid "Get:%lu %s" +msgstr "Alınıyor:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Yoksay " +#, c-format +msgid "Ign:%lu %s" +msgstr "Yoksay:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Hata " +#, c-format +msgid "Err:%lu %s" +msgstr "Hata:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/uk.po b/po/uk.po index faeedf941..47976d39c 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1736,20 +1736,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "В кеші " +#, c-format +msgid "Hit:%lu %s" +msgstr "В кеші:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Отр:" +#, c-format +msgid "Get:%lu %s" +msgstr "Отр:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Ігн " +#, c-format +msgid "Ign:%lu %s" +msgstr "Ігн:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Пом " +#, c-format +msgid "Err:%lu %s" +msgstr "Пом:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/vi.po b/po/vi.po index 089d8461a..2edb52f22 100644 --- a/po/vi.po +++ b/po/vi.po @@ -1752,20 +1752,24 @@ msgid "Full Text Search" msgstr "Tìm kiếm toàn văn" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "Tìm thấy " +#, c-format +msgid "Hit:%lu %s" +msgstr "Tìm thấy:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "Lấy:" +#, c-format +msgid "Get:%lu %s" +msgstr "Lấy:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "Bỏq " +#, c-format +msgid "Ign:%lu %s" +msgstr "Bỏq:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "Lỗi " +#, c-format +msgid "Err:%lu %s" +msgstr "Lỗi:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/zh_CN.po b/po/zh_CN.po index 2ff5bcf01..6e9610ac9 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1693,20 +1693,24 @@ msgid "Full Text Search" msgstr "全文搜索" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "命中 " +#, c-format +msgid "Hit:%lu %s" +msgstr "命中:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "获取:" +#, c-format +msgid "Get:%lu %s" +msgstr "获取:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "忽略 " +#, c-format +msgid "Ign:%lu %s" +msgstr "忽略:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "错误 " +#, c-format +msgid "Err:%lu %s" +msgstr "错误:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/po/zh_TW.po b/po/zh_TW.po index e35910df2..201d9d675 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -1646,20 +1646,24 @@ msgid "Full Text Search" msgstr "" #: apt-private/acqprogress.cc:66 -msgid "Hit " -msgstr "已有 " +#, c-format +msgid "Hit:%lu %s" +msgstr "已有:%lu %s" #: apt-private/acqprogress.cc:88 -msgid "Get:" -msgstr "下載:" +#, c-format +msgid "Get:%lu %s" +msgstr "下載:%lu %s" #: apt-private/acqprogress.cc:119 -msgid "Ign " -msgstr "略過 " +#, c-format +msgid "Ign:%lu %s" +msgstr "略過:%lu %s" #: apt-private/acqprogress.cc:126 -msgid "Err " -msgstr "錯誤 " +#, c-format +msgid "Err:%lu %s" +msgstr "錯誤:%lu %s" #: apt-private/acqprogress.cc:150 #, c-format diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files index ffb9f3135..3465c0a16 100755 --- a/test/integration/test-apt-acquire-additional-files +++ b/test/integration/test-apt-acquire-additional-files @@ -49,8 +49,8 @@ testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists 'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 'http://localhost:8080/dists/unstable/main/Contents-amd64.bz2' localhost:8080_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris -testsuccessequal "Hit http://localhost:8080 unstable InRelease -Get:1 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease +Get:2 http://localhost:8080 unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] Reading package lists..." aptget update testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64' find rootdir/var/lib/apt/lists -name '*Contents*' @@ -74,8 +74,8 @@ testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists 'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 'http://localhost:8080/dists/unstable/main/Contents-amd64.gz.bz2' localhost:8080_dists_unstable_main_Contents-amd64.gz 0 " aptget update --print-uris -testsuccessequal "Hit http://localhost:8080 unstable InRelease -Get:1 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease +Get:2 http://localhost:8080 unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] Reading package lists..." aptget update testequal 'rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_Contents-amd64.gz' find rootdir/var/lib/apt/lists -name '*Contents*' @@ -89,7 +89,7 @@ testequal "'http://localhost:8080/dists/unstable/InRelease' localhost:8080_dists 'http://localhost:8080/dists/unstable/main/binary-amd64/Packages.bz2' localhost:8080_dists_unstable_main_binary-amd64_Packages 0 'http://localhost:8080/dists/unstable/main/i18n/Translation-en.bz2' localhost:8080_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris -testsuccessequal "Hit http://localhost:8080 unstable InRelease +testsuccessequal "Hit:1 http://localhost:8080 unstable InRelease Reading package lists..." aptget update testempty find rootdir/var/lib/apt/lists -name '*Contents*' diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom index 6a218ffb8..108805daa 100755 --- a/test/integration/test-apt-cdrom +++ b/test/integration/test-apt-cdrom @@ -136,14 +136,14 @@ aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' && mv rootdir/media/cdrom-unmounted rootdir/media/cdrom-ejected msgmsg "ensure an update doesn't mess with cdrom sources" testsuccess aptget update -testfileequal rootdir/tmp/testsuccess.output 'Hit cdrom://Debian APT Testdisk 0.8.15 stable InRelease +testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease Reading package lists...' mv rootdir/media/cdrom-ejected rootdir/media/cdrom-unmounted testcdromusage msgmsg 'and again to check that it withstands the temptation even if it could mount' testsuccess aptget update -testfileequal rootdir/tmp/testsuccess.output 'Hit cdrom://Debian APT Testdisk 0.8.15 stable InRelease +testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease Reading package lists...' testcdromusage diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning index 1f4a14e23..5b81d56d2 100755 --- a/test/integration/test-apt-get-update-unauth-warning +++ b/test/integration/test-apt-get-update-unauth-warning @@ -20,9 +20,9 @@ APTARCHIVE=$(readlink -f ./aptarchive) rm -f $APTARCHIVE/dists/unstable/*Release* # update without authenticated files leads to warning -testfailureequal "Ign file:$APTARCHIVE unstable InRelease +testfailureequal "Ign:1 file:$APTARCHIVE unstable InRelease File not found -Err file:$APTARCHIVE unstable Release +Err:2 file:$APTARCHIVE unstable Release File not found W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository. E: Use --allow-insecure-repositories to force the update" aptget update --no-allow-insecure-repositories @@ -36,13 +36,13 @@ filesize() { stat -c%s "$(aptget files --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz" } # allow override -testwarningequal "Ign file:$APTARCHIVE unstable InRelease +testwarningequal "Ign:1 file:$APTARCHIVE unstable InRelease File not found -Ign file:$APTARCHIVE unstable Release +Ign:2 file:$APTARCHIVE unstable Release File not found -Get:1 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B] -Get:2 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B] -Get:3 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] +Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B] +Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B] +Get:5 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] Reading package lists... W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." aptget update --allow-insecure-repositories # ensure we can not install the package diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims index 7385e701a..2b662171c 100755 --- a/test/integration/test-apt-update-ims +++ b/test/integration/test-apt-update-ims @@ -43,7 +43,7 @@ runtest() { testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" # ensure that we still do a hash check for other files on ims hit of Release - if grep -q '^Hit .* InRelease$' expected.output || ! grep -q '^Ign .* Release\(\.gpg\)\?$' expected.output; then + if grep -q '^Hit:[0-9]\+ .* InRelease$' expected.output || ! grep -q '^Ign:[0-9]\+ .* Release\(\.gpg\)\?$' expected.output; then $TEST aptget update -o Debug::Acquire::gpgv=1 cp rootdir/tmp/${TEST}.output goodsign.output testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" @@ -55,7 +55,7 @@ runtest() { } msgmsg 'InRelease' -EXPECT='Hit http://localhost:8080 unstable InRelease +EXPECT='Hit:1 http://localhost:8080 unstable InRelease Reading package lists...' echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest @@ -63,9 +63,9 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest msgmsg 'Release/Release.gpg' -EXPECT='Ign http://localhost:8080 unstable InRelease +EXPECT='Ign:1 http://localhost:8080 unstable InRelease 404 Not Found -Hit http://localhost:8080 unstable Release +Hit:2 http://localhost:8080 unstable Release Reading package lists...' find aptarchive -name 'InRelease' -delete echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex @@ -74,10 +74,10 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest msgmsg 'Release only' -EXPECT="Ign http://localhost:8080 unstable InRelease +EXPECT="Ign:1 http://localhost:8080 unstable InRelease 404 Not Found -Hit http://localhost:8080 unstable Release -Ign http://localhost:8080 unstable Release.gpg +Hit:2 http://localhost:8080 unstable Release +Ign:3 http://localhost:8080 unstable Release.gpg 404 Not Found Reading package lists... W: The data from 'http://localhost:8080 unstable Release' is not signed. Packages from that repository can not be authenticated." @@ -96,7 +96,7 @@ Valid-Until: $(date -d '-1 weeks' '+%a, %d %b %Y %H:%M:%S %Z')" '{}' \; signreleasefiles msgmsg 'expired InRelease' -EXPECT='Hit http://localhost:8080 unstable InRelease +EXPECT='Hit:1 http://localhost:8080 unstable InRelease E: Release file for http://localhost:8080/dists/unstable/InRelease is expired (invalid since). Updates for this repository will not be applied.' echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest 'failure' @@ -104,9 +104,9 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest 'failure' msgmsg 'expired Release/Release.gpg' -EXPECT='Ign http://localhost:8080 unstable InRelease +EXPECT='Ign:1 http://localhost:8080 unstable InRelease 404 Not Found -Hit http://localhost:8080 unstable Release +Hit:2 http://localhost:8080 unstable Release E: Release file for http://localhost:8080/dists/unstable/Release is expired (invalid since). Updates for this repository will not be applied.' find aptarchive -name 'InRelease' -delete echo 'Acquire::GzipIndexes "0";' > rootdir/etc/apt/apt.conf.d/02compressindex @@ -115,10 +115,10 @@ echo 'Acquire::GzipIndexes "1";' > rootdir/etc/apt/apt.conf.d/02compressindex runtest 'failure' msgmsg 'expired Release only' -EXPECT="Ign http://localhost:8080 unstable InRelease +EXPECT="Ign:1 http://localhost:8080 unstable InRelease 404 Not Found -Hit http://localhost:8080 unstable Release -Ign http://localhost:8080 unstable Release.gpg +Hit:2 http://localhost:8080 unstable Release +Ign:3 http://localhost:8080 unstable Release.gpg 404 Not Found W: The data from 'http://localhost:8080 unstable Release' is not signed. Packages from that repository can not be authenticated. E: Release file for http://localhost:8080/dists/unstable/Release is expired (invalid since). Updates for this repository will not be applied." @@ -130,13 +130,13 @@ runtest 'failure' 'warning' msgmsg 'no Release at all' -EXPECT="Ign http://localhost:8080 unstable InRelease +EXPECT="Ign:1 http://localhost:8080 unstable InRelease 404 Not Found -Ign http://localhost:8080 unstable Release +Ign:2 http://localhost:8080 unstable Release 404 Not Found -Hit http://localhost:8080 unstable/main Sources -Hit http://localhost:8080 unstable/main amd64 Packages -Hit http://localhost:8080 unstable/main Translation-en +Hit:3 http://localhost:8080 unstable/main Sources +Hit:4 http://localhost:8080 unstable/main amd64 Packages +Hit:5 http://localhost:8080 unstable/main Translation-en Reading package lists... W: The repository 'http://localhost:8080 unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository." find aptarchive -name '*Release*' -delete diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified index 32818658f..6d176a655 100755 --- a/test/integration/test-apt-update-not-modified +++ b/test/integration/test-apt-update-not-modified @@ -20,14 +20,14 @@ methodtest() { listcurrentlistsdirectory > listsdir.lst # hit again with a good cache - testsuccessequal "Hit $1 unstable InRelease + testsuccessequal "Hit:1 $1 unstable InRelease Reading package lists..." aptget update testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" # drop an architecture, which means the file should be gone now configarchitecture 'i386' sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst - testsuccessequal "Hit $1 unstable InRelease + testsuccessequal "Hit:1 $1 unstable InRelease Reading package lists..." aptget update testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)" @@ -42,9 +42,9 @@ Architecture: amd64 Version: 1 EOF compressfile aptarchive/dists/unstable/main/binary-amd64/Packages - testfailureequal "Hit $1 unstable InRelease -Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] -Err $1 unstable/main amd64 Packages + testfailureequal "Hit:1 $1 unstable InRelease +Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] +Err:2 $1 unstable/main amd64 Packages Hash Sum mismatch W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz Hash Sum mismatch @@ -54,8 +54,8 @@ E: Some index files failed to download. They have been ignored, or old ones used cp -a aptarchive/dists.good aptarchive/dists # … now everything is fine again - testsuccessequal "Hit $1 unstable InRelease -Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] + testsuccessequal "Hit:1 $1 unstable InRelease +Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] Reading package lists..." aptget update testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" @@ -74,18 +74,18 @@ Reading package lists..." aptget update listcurrentlistsdirectory > listsdir.lst # hit again with a good cache - testsuccessequal "Ign $1 unstable InRelease + testsuccessequal "Ign:1 $1 unstable InRelease 404 Not Found -Hit $1 unstable Release +Hit:2 $1 unstable Release Reading package lists..." aptget update testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" # drop an architecture, which means the file should be gone now configarchitecture 'i386' sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst - testsuccessequal "Ign $1 unstable InRelease + testsuccessequal "Ign:1 $1 unstable InRelease 404 Not Found -Hit $1 unstable Release +Hit:2 $1 unstable Release Reading package lists..." aptget update testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)" @@ -100,11 +100,11 @@ Architecture: amd64 Version: 1 EOF compressfile aptarchive/dists/unstable/main/binary-amd64/Packages - testfailureequal "Ign $1 unstable InRelease + testfailureequal "Ign:1 $1 unstable InRelease 404 Not Found -Hit $1 unstable Release -Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] -Err $1 unstable/main amd64 Packages +Hit:2 $1 unstable Release +Get:4 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] +Err:4 $1 unstable/main amd64 Packages Hash Sum mismatch W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz Hash Sum mismatch @@ -115,18 +115,18 @@ E: Some index files failed to download. They have been ignored, or old ones used find aptarchive/dists -name 'InRelease' -delete # … now everything is fine again - testsuccessequal "Ign $1 unstable InRelease + testsuccessequal "Ign:1 $1 unstable InRelease 404 Not Found -Hit $1 unstable Release -Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] +Hit:2 $1 unstable Release +Get:4 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B] Reading package lists..." aptget update testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)" webserverconfig 'aptwebserver::support::modified-since' 'false' webserverconfig 'aptwebserver::support::last-modified' 'false' - testsuccessequal "Ign $1 unstable InRelease + testsuccessequal "Ign:1 $1 unstable InRelease 404 Not Found -Get:1 $1 unstable Release [$(stat -c '%s' 'aptarchive/dists/unstable/Release') B] +Get:2 $1 unstable Release [$(stat -c '%s' 'aptarchive/dists/unstable/Release') B] Reading package lists..." aptget update webserverconfig 'aptwebserver::support::modified-since' 'true' webserverconfig 'aptwebserver::support::last-modified' 'true' 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 3042d116d..47dd62712 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -13,7 +13,7 @@ setupflataptarchive testaptgetupdate() { rm -rf rootdir/var/lib/apt aptget update >testaptgetupdate.diff 2>&1 || true - sed -i -e '/Ign /,+1d' -e '/Release/ d' -e 's#Get:[0-9]\+ #Get: #' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff + sed -i -e '/Ign /,+1d' -e '/Release/ d' -e 's#\[[0-9]* [kMGTPY]*B\]#\[\]#' testaptgetupdate.diff GIVEN="$1" shift msgtest "Test for correctness of" "apt-get update with $*" @@ -47,12 +47,12 @@ testoverfile() { forcecompressor "$1" createemptyarchive 'Packages' - testaptgetupdate "Get: file:$APTARCHIVE Packages [] + testaptgetupdate "Get:2 file:$APTARCHIVE Packages [] Reading package lists..." "empty archive Packages.$COMPRESS over file" createemptyfile 'Packages' - testaptgetupdate "Get: file:$APTARCHIVE Packages -Err file:$APTARCHIVE Packages + testaptgetupdate "Get:2 file:$APTARCHIVE Packages +Err:2 file:$APTARCHIVE Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:${APTARCHIVE}/Packages.$COMPRESS Empty files can't be valid archives @@ -63,13 +63,13 @@ testoverhttp() { forcecompressor "$1" createemptyarchive 'Packages' - testaptgetupdate "Get: http://localhost:8080 Packages [] + testaptgetupdate "Get:2 http://localhost:8080 Packages [] Reading package lists..." "empty archive Packages.$COMPRESS over http" createemptyfile 'Packages' #FIXME: we should response with a good error message instead - testaptgetupdate "Get: http://localhost:8080 Packages -Err http://localhost:8080 Packages + testaptgetupdate "Get:2 http://localhost:8080 Packages +Err:2 http://localhost:8080 Packages Empty files can't be valid archives W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages.${COMPRESS}) Empty files can't be valid archives diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect index ca2378c19..b9d232f90 100755 --- a/test/integration/test-bug-602412-dequote-redirect +++ b/test/integration/test-bug-602412-dequote-redirect @@ -21,7 +21,7 @@ testrun() { testsuccess --nomsg aptget update # check that I-M-S header is kept in redirections - testsuccessequal "Hit $1 unstable InRelease + testsuccessequal "Hit:1 $1 unstable InRelease Reading package lists..." aptget update msgtest 'Test redirection works in' 'package download' diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index 3295d5497..e5fe21e0f 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -98,7 +98,7 @@ SHA256-Download: msgmsg "Testcase: index is already up-to-date: $*" find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete testsuccess aptget update "$@" - testequal 'Hit http://localhost:8080 InRelease + testequal 'Hit:1 http://localhost:8080 InRelease Reading package lists...' aptget update "$@" -o Debug::Acquire::Transaction=0 -o Debug::pkgAcquire::Diffs=0 testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff diff --git a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum index 6abb5d12a..48a7f0562 100755 --- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum +++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum @@ -176,10 +176,10 @@ testmismatch() { Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B] -Err http://localhost:8080 $1 1.0 (dsc) +Err:1 http://localhost:8080 $1 1.0 (dsc) Hash Sum mismatch Get:2 http://localhost:8080 $1 1.0 (tar) [3 B] -Err http://localhost:8080 $1 1.0 (tar) +Err:2 http://localhost:8080 $1 1.0 (tar) Hash Sum mismatch E: Failed to fetch http://localhost:8080/${1}_1.0.dsc Hash Sum mismatch @@ -242,7 +242,7 @@ Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (tar) [3 B] Get:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) [3 B] -Err http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) +Err:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) Hash Sum mismatch E: Failed to fetch http://localhost:8080/pkg-mixed-sha1-bad_1.0.dsc Hash Sum mismatch @@ -253,7 +253,7 @@ testfailureequal 'Reading package lists... Building dependency tree... Need to get 6 B of source archives. Get:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) [3 B] -Err http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) +Err:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) Hash Sum mismatch Get:2 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (dsc) [3 B] E: Failed to fetch http://localhost:8080/pkg-mixed-sha2-bad_1.0.tar.gz Hash Sum mismatch -- cgit v1.2.3-70-g09d2