From b0fa553969d4eefc5fc401ac6c2ccaedb5afcc3d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 17 Sep 2014 16:14:03 +0200 Subject: import framework and disable not-relevant tests --- test/integration/framework | 36 +++++- test/integration/run-tests | 64 +++++++---- .../skip-bug-601016-description-translation | 124 +++++++++++++++++++++ ...ip-ubuntu-bug-784473-InRelease-one-message-only | 31 ++++++ .../skip-ubuntu-bug-859188-multiarch-reinstall | 28 +++++ .../test-bug-601016-description-translation | 124 --------------------- ...st-ubuntu-bug-784473-InRelease-one-message-only | 31 ------ .../test-ubuntu-bug-859188-multiarch-reinstall | 28 ----- 8 files changed, 261 insertions(+), 205 deletions(-) create mode 100755 test/integration/skip-bug-601016-description-translation create mode 100755 test/integration/skip-ubuntu-bug-784473-InRelease-one-message-only create mode 100755 test/integration/skip-ubuntu-bug-859188-multiarch-reinstall delete mode 100755 test/integration/test-bug-601016-description-translation delete mode 100755 test/integration/test-ubuntu-bug-784473-InRelease-one-message-only delete mode 100755 test/integration/test-ubuntu-bug-859188-multiarch-reinstall diff --git a/test/integration/framework b/test/integration/framework index 13f03a201..9b95434c6 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1,5 +1,7 @@ #!/bin/sh -- # no runable script, just for vi +EXIT_CODE=0 + # we all like colorful messages if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null && \ expr match "$(readlink -f /proc/$$/fd/2)" '/dev/pts/[0-9]\+' > /dev/null; then @@ -36,7 +38,12 @@ msgtest() { } msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; } msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; } -msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; } +msgfail() { + if [ $# -gt 0 ]; then printf "${CFAIL}FAIL: $*${CNORMAL}\n" >&2; + else printf "${CFAIL}FAIL${CNORMAL}\n" >&2; fi + EXIT_CODE=$((EXIT_CODE+1)); +} + # enable / disable Debugging MSGLEVEL=${MSGLEVEL:-3} @@ -113,9 +120,32 @@ gdb() { APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1 } +exitwithstatus() { + # error if we about to overflow, but ... + # "255 failures ought to be enough for everybody" + if [ $EXIT_CODE -gt 255 ]; then + msgdie "Total failure count $EXIT_CODE too big" + fi + exit $((EXIT_CODE <= 255 ? EXIT_CODE : 255)); +} + +shellsetedetector() { + local exit_status=$? + if [ "$exit_status" != '0' ]; then + printf >&2 "${CERROR}E: Looks like the testcases ended prematurely with exitcode: ${exit_status}${CNORMAL}\n" + if [ "$EXIT_CODE" = '0' ]; then + EXIT_CODE="$exit_status" + fi + fi +} + addtrap() { - CURRENTTRAP="$CURRENTTRAP $1" - trap "$CURRENTTRAP exit;" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + if [ "$1" = 'prefix' ]; then + CURRENTTRAP="$2 $CURRENTTRAP" + else + CURRENTTRAP="$CURRENTTRAP $1" + fi + trap "shellsetedetector; $CURRENTTRAP exitwithstatus;" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM } setupenvironment() { diff --git a/test/integration/run-tests b/test/integration/run-tests index 75f2ad662..c39a2ac68 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -2,39 +2,65 @@ set -e FAIL=0 +PASS=0 +ALL=0 + +FAILED_TESTS="" DIR=$(readlink -f $(dirname $0)) -if [ "$1" = "-q" ]; then - export MSGLEVEL=2 -elif [ "$1" = "-v" ]; then - export MSGLEVEL=4 -fi +while [ -n "$1" ]; do + if [ "$1" = "-q" ]; then + export MSGLEVEL=2 + elif [ "$1" = "-v" ]; then + export MSGLEVEL=4 + elif [ "$1" = '--color=no' ]; then + export MSGCOLOR='NO' + else + echo >&2 "WARNING: Unknown parameter »$1« will be ignored" + fi + shift +done +export MSGLEVEL="${MSGLEVEL:-3}" -if expr match "$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev/null; then +if [ "$MSGCOLOR" != 'NO' ]; then + if [ ! -t 1 ]; then # but check that we output to a terminal + export MSGCOLOR='NO' + fi +fi +if [ "$MSGCOLOR" != 'NO' ]; then CTEST='\033[1;32m' CHIGH='\033[1;35m' CRESET='\033[0m' -elif [ -z "${MSGLEVEL}" ]; then - export MSGLEVEL=2 -fi - -if [ -z "$MSGLEVEL" ]; then - MSGLEVEL=5 +else + CTEST='' + CHIGH='' + CRESET='' fi +TOTAL="$(run-parts --list $DIR | grep '/test-' | wc -l)" for testcase in $(run-parts --list $DIR | grep '/test-'); do if [ "$MSGLEVEL" -le 2 ]; then - echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " + printf "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " else - echo "${CTEST}Run Testcase ${CHIGH}$(basename ${testcase})${CRESET}" + printf "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}$(basename ${testcase})${CRESET}\n" fi if ! ${testcase}; then - FAIL=$((FAIL+1)) - echo "$(basename $testcase) ... FAIL" - fi + FAIL=$((FAIL+1)) + FAILED_TESTS="$FAILED_TESTS $(basename $testcase)" + echo >&2 "$(basename $testcase) ... FAIL" + else + PASS=$((PASS+1)) + fi + ALL=$((ALL+1)) if [ "$MSGLEVEL" -le 2 ]; then echo fi done -echo "failures: $FAIL" -exit $FAIL +echo >&2 "Statistics: $ALL tests were run: $PASS successfully and $FAIL failed" +if [ -n "$FAILED_TESTS" ]; then + echo >&2 "Failed tests: $FAILED_TESTS" +else + echo >&2 'All tests seem to have been run successfully. What could possibly go wrong?' +fi +# ensure we don't overflow +exit $((FAIL <= 255 ? FAIL : 255)) diff --git a/test/integration/skip-bug-601016-description-translation b/test/integration/skip-bug-601016-description-translation new file mode 100755 index 000000000..03fddbfda --- /dev/null +++ b/test/integration/skip-bug-601016-description-translation @@ -0,0 +1,124 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' 'amd64' + +# we need a valid locale here, otherwise the language configuration +# will be overridden by LC_ALL=C +LOCALE="$(echo "$LANG" | cut -d'_' -f 1)" + +PACKAGESTANZA="Package: apt +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team +Architecture: i386 +Version: 0.8.7 +Filename: pool/main/a/apt/apt_0.8.7_i386.deb +Size: 2140230 +MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08 +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c" + +PACKAGESTANZA2='Package: apt +Priority: important +Section: admin +Installed-Size: 5984 +Maintainer: APT Development Team +Architecture: amd64 +Version: 0.8.7 +Filename: pool/main/a/apt/apt_0.8.7_amd64.deb +Size: 2210342 +MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c' + +echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 +Description: Advanced front-end for dpkg" > aptarchive/Packages + +echo "Package: apt +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c +Description-${LOCALE}: Mächtige Oberfläche für dpkg + Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff + auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die + APT-Dselect-Methode. Beides sind einfache und sicherere Wege, + um Pakete zu installieren und Upgrades durchzuführen." | bzip2 > aptarchive/${LOCALE}.bz2 + +# the $LOCALE translation file will not be included as it is a flat archive it came from and therefore +# its name can not be guessed correctly… (in non-flat archives the files are called Translation-*) +echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate + +NOLONGSTANZA="$PACKAGESTANZA +Description: Advanced front-end for dpkg +" + +ENGLISHSTANZA="$PACKAGESTANZA +Description: Advanced front-end for dpkg +" + +LOCALESTANZA="$PACKAGESTANZA +Description-${LOCALE}: Mächtige Oberfläche für dpkg + Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff + auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die + APT-Dselect-Methode. Beides sind einfache und sicherere Wege, + um Pakete zu installieren und Upgrades durchzuführen. +" +LOCALESTANZA2="$PACKAGESTANZA2 +Description-${LOCALE}: Mächtige Oberfläche für dpkg + Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff + auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die + APT-Dselect-Methode. Beides sind einfache und sicherere Wege, + um Pakete zu installieren und Upgrades durchzuführen. +" + +testrun() { + echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages + export LC_ALL="" + rm -rf rootdir/var/lib/apt/lists + setupaptarchive + testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE} + testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE} + testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE} + testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} + testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE} + LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE} + export LC_ALL="" + echo "Acquire::Languages { \"ww\"; \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages + testequal "$LOCALESTANZA" aptcache show apt -o Test=File-ww-${LOCALE} + echo "Acquire::Languages { \"ww\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages + testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-ww +} + +testrun + +echo "$PACKAGESTANZA +Description: Advanced front-end for dpkg + +$PACKAGESTANZA2 +Description: Advanced front-end for dpkg" > aptarchive/Packages + +echo "Package: apt +Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c +Description-en: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages." | bzip2 > aptarchive/en.bz2 + +ENGLISHSTANZA="$PACKAGESTANZA +Description-en: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. +" +ENGLISHSTANZA2="$PACKAGESTANZA2 +Description-en: Advanced front-end for dpkg + This is Debian's next generation front-end for the dpkg package manager. + It provides the apt-get utility and APT dselect method that provides a + simpler, safer way to install and upgrade packages. +" + +testrun diff --git a/test/integration/skip-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/skip-ubuntu-bug-784473-InRelease-one-message-only new file mode 100755 index 000000000..d97011914 --- /dev/null +++ b/test/integration/skip-ubuntu-bug-784473-InRelease-one-message-only @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertpackage 'unstable' 'apt' 'i386' '0.8.11' + +setupaptarchive + +rm -rf rootdir/var/lib/apt/lists + +find aptarchive/ -name 'Release.gpg' -delete +find aptarchive/ -name 'InRelease' -exec cp {} {}.old \; + +for RELEASE in $(find aptarchive/ -name 'InRelease'); do + (echo 'Origin: Marvin +Label: Marvin +Suite: experimental +Codename: experimental +MD5Sum: + 65fd410587b6978de2277f2912523f09 9360 Packages + d27b294ed172a1fa9dd5a53949914c5d 4076 Packages.bz2 + 2182897e0a2a0c09e760beaae117a015 2023 Packages.diff/Index + 1b895931853981ad8204d2439821b999 4144 Packages.gz'; echo; cat ${RELEASE}.old;) > ${RELEASE} +done +aptget update -qq > /dev/null 2> starts-with-unsigned.msg +sed -i 's#File .*InRelease#File InRelease#' starts-with-unsigned.msg +testfileequal starts-with-unsigned.msg "W: GPG error: file: unstable InRelease: File InRelease doesn't start with a clearsigned message" diff --git a/test/integration/skip-ubuntu-bug-859188-multiarch-reinstall b/test/integration/skip-ubuntu-bug-859188-multiarch-reinstall new file mode 100755 index 000000000..0fdf97485 --- /dev/null +++ b/test/integration/skip-ubuntu-bug-859188-multiarch-reinstall @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' 'armel' + +buildsimplenativepackage 'libsame' 'amd64,i386,armel' '1.0' 'unstable' 'Multi-Arch: same' + +# FIXME: hack around dpkg's current inability to handle multiarch, a clean install would be better… +insertinstalledpackage 'libsame' 'amd64,i386' '1.0' 'Multi-Arch: same' +sed -e 's#/installed#/unstable#' -e 's#Installed-Size: 42#Installed-Size: 1#' -i rootdir/var/lib/dpkg/status + +setupaptarchive + +REINSTALL='Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. +Inst libsame [1.0] (1.0 unstable [amd64]) +Inst libsame:i386 [1.0] (1.0 unstable [i386]) +Conf libsame (1.0 unstable [amd64]) +Conf libsame:i386 (1.0 unstable [i386])' + +testequal "$REINSTALL" aptget install --reinstall libsame -s +testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s +testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s +testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s diff --git a/test/integration/test-bug-601016-description-translation b/test/integration/test-bug-601016-description-translation deleted file mode 100755 index 03fddbfda..000000000 --- a/test/integration/test-bug-601016-description-translation +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'i386' 'amd64' - -# we need a valid locale here, otherwise the language configuration -# will be overridden by LC_ALL=C -LOCALE="$(echo "$LANG" | cut -d'_' -f 1)" - -PACKAGESTANZA="Package: apt -Priority: important -Section: admin -Installed-Size: 5984 -Maintainer: APT Development Team -Architecture: i386 -Version: 0.8.7 -Filename: pool/main/a/apt/apt_0.8.7_i386.deb -Size: 2140230 -MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08 -Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c" - -PACKAGESTANZA2='Package: apt -Priority: important -Section: admin -Installed-Size: 5984 -Maintainer: APT Development Team -Architecture: amd64 -Version: 0.8.7 -Filename: pool/main/a/apt/apt_0.8.7_amd64.deb -Size: 2210342 -MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a -Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c' - -echo "$PACKAGESTANZA -Description: Advanced front-end for dpkg - -$PACKAGESTANZA2 -Description: Advanced front-end for dpkg" > aptarchive/Packages - -echo "Package: apt -Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c -Description-${LOCALE}: Mächtige Oberfläche für dpkg - Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff - auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die - APT-Dselect-Methode. Beides sind einfache und sicherere Wege, - um Pakete zu installieren und Upgrades durchzuführen." | bzip2 > aptarchive/${LOCALE}.bz2 - -# the $LOCALE translation file will not be included as it is a flat archive it came from and therefore -# its name can not be guessed correctly… (in non-flat archives the files are called Translation-*) -echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate - -NOLONGSTANZA="$PACKAGESTANZA -Description: Advanced front-end for dpkg -" - -ENGLISHSTANZA="$PACKAGESTANZA -Description: Advanced front-end for dpkg -" - -LOCALESTANZA="$PACKAGESTANZA -Description-${LOCALE}: Mächtige Oberfläche für dpkg - Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff - auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die - APT-Dselect-Methode. Beides sind einfache und sicherere Wege, - um Pakete zu installieren und Upgrades durchzuführen. -" -LOCALESTANZA2="$PACKAGESTANZA2 -Description-${LOCALE}: Mächtige Oberfläche für dpkg - Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff - auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die - APT-Dselect-Methode. Beides sind einfache und sicherere Wege, - um Pakete zu installieren und Upgrades durchzuführen. -" - -testrun() { - echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages - export LC_ALL="" - rm -rf rootdir/var/lib/apt/lists - setupaptarchive - testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE} - testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE} - testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE} - testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE} - testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE} - LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE} - export LC_ALL="" - echo "Acquire::Languages { \"ww\"; \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages - testequal "$LOCALESTANZA" aptcache show apt -o Test=File-ww-${LOCALE} - echo "Acquire::Languages { \"ww\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages - testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-ww -} - -testrun - -echo "$PACKAGESTANZA -Description: Advanced front-end for dpkg - -$PACKAGESTANZA2 -Description: Advanced front-end for dpkg" > aptarchive/Packages - -echo "Package: apt -Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c -Description-en: Advanced front-end for dpkg - This is Debian's next generation front-end for the dpkg package manager. - It provides the apt-get utility and APT dselect method that provides a - simpler, safer way to install and upgrade packages." | bzip2 > aptarchive/en.bz2 - -ENGLISHSTANZA="$PACKAGESTANZA -Description-en: Advanced front-end for dpkg - This is Debian's next generation front-end for the dpkg package manager. - It provides the apt-get utility and APT dselect method that provides a - simpler, safer way to install and upgrade packages. -" -ENGLISHSTANZA2="$PACKAGESTANZA2 -Description-en: Advanced front-end for dpkg - This is Debian's next generation front-end for the dpkg package manager. - It provides the apt-get utility and APT dselect method that provides a - simpler, safer way to install and upgrade packages. -" - -testrun diff --git a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only deleted file mode 100755 index d97011914..000000000 --- a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'i386' - -insertpackage 'unstable' 'apt' 'i386' '0.8.11' - -setupaptarchive - -rm -rf rootdir/var/lib/apt/lists - -find aptarchive/ -name 'Release.gpg' -delete -find aptarchive/ -name 'InRelease' -exec cp {} {}.old \; - -for RELEASE in $(find aptarchive/ -name 'InRelease'); do - (echo 'Origin: Marvin -Label: Marvin -Suite: experimental -Codename: experimental -MD5Sum: - 65fd410587b6978de2277f2912523f09 9360 Packages - d27b294ed172a1fa9dd5a53949914c5d 4076 Packages.bz2 - 2182897e0a2a0c09e760beaae117a015 2023 Packages.diff/Index - 1b895931853981ad8204d2439821b999 4144 Packages.gz'; echo; cat ${RELEASE}.old;) > ${RELEASE} -done -aptget update -qq > /dev/null 2> starts-with-unsigned.msg -sed -i 's#File .*InRelease#File InRelease#' starts-with-unsigned.msg -testfileequal starts-with-unsigned.msg "W: GPG error: file: unstable InRelease: File InRelease doesn't start with a clearsigned message" diff --git a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall deleted file mode 100755 index 0fdf97485..000000000 --- a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -set -e - -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework -setupenvironment -configarchitecture 'amd64' 'i386' 'armel' - -buildsimplenativepackage 'libsame' 'amd64,i386,armel' '1.0' 'unstable' 'Multi-Arch: same' - -# FIXME: hack around dpkg's current inability to handle multiarch, a clean install would be better… -insertinstalledpackage 'libsame' 'amd64,i386' '1.0' 'Multi-Arch: same' -sed -e 's#/installed#/unstable#' -e 's#Installed-Size: 42#Installed-Size: 1#' -i rootdir/var/lib/dpkg/status - -setupaptarchive - -REINSTALL='Reading package lists... -Building dependency tree... -0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded. -Inst libsame [1.0] (1.0 unstable [amd64]) -Inst libsame:i386 [1.0] (1.0 unstable [i386]) -Conf libsame (1.0 unstable [amd64]) -Conf libsame:i386 (1.0 unstable [i386])' - -testequal "$REINSTALL" aptget install --reinstall libsame -s -testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s -testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s -testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s -- cgit v1.2.3