diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-11-25 12:10:15 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-12-07 19:12:51 +0100 |
commit | 016bea8214e1826b289025f03890f70a5805db87 (patch) | |
tree | cc3c1ca686ab6c7abdef4abce92ade26e9e37a99 /test/integration/framework | |
parent | 4e6a7e260eb713318b1b5019a72073050242ac3c (diff) |
correct architecture detection for 'rc' packages for purge
We were already considering these cases, but the code was flawed, so
that packages changing architectures are incorrectly handled and hence
the wrong architecture is used to call dpkg with, so that dpkg says the
package isn't installed (which it isn't for the requested architecture).
Closes: 770898
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/test/integration/framework b/test/integration/framework index ff059f59e..298f4c9b2 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -635,12 +635,8 @@ buildaptarchive() { createaptftparchiveconfig() { local COMPRESSORS="$(cut -d' ' -f 1 ${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf | tr '\n' ' ')" - COMPRESSORS="${COMPRESSORS%* }" - local ARCHS="$(find pool/ -name '*.deb' | grep -oE '_[a-z0-9-]+\.deb$' | sort | uniq | sed -e '/^_all.deb$/ d' -e 's#^_\([a-z0-9-]*\)\.deb$#\1#' | tr '\n' ' ')" - if [ -z "$ARCHS" ]; then - # the pool is empty, so we will operate on faked packages - let us use the configured archs - ARCHS="$(getarchitectures)" - fi + local COMPRESSORS="${COMPRESSORS%* }" + local ARCHS="$(getarchitectures)" echo -n 'Dir { ArchiveDir "' >> ftparchive.conf echo -n $(readlink -f .) >> ftparchive.conf @@ -1489,3 +1485,19 @@ aptautotest_aptget_update() { done } aptautotest_apt_update() { aptautotest_aptget_update "$@"; } + +testaptautotestnodpkgwarning() { + local TESTCALL="$1" + while [ -n "$2" ]; do + if [ "$2" = '-s' ]; then return; fi + shift + done + testfailure grep '^dpkg: warning:.*ignor.*' "${TMPWORKINGDIRECTORY}/rootdir/tmp-before/${TESTCALL}.output" +} + +aptautotest_aptget_install() { testaptautotestnodpkgwarning "$@"; } +aptautotest_aptget_remove() { testaptautotestnodpkgwarning "$@"; } +aptautotest_aptget_purge() { testaptautotestnodpkgwarning "$@"; } +aptautotest_apt_install() { testaptautotestnodpkgwarning "$@"; } +aptautotest_apt_remove() { testaptautotestnodpkgwarning "$@"; } +aptautotest_apt_purge() { testaptautotestnodpkgwarning "$@"; } |