diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-07-07 20:45:28 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-07-07 21:52:40 +0200 |
commit | eb191ca3584816533e82cd6b8cd1f133ae28149a (patch) | |
tree | 8248c5ff221fcfe5f9a689e8aa9075e3837e143a /test | |
parent | 4f445ff78220568e0fcfa373ba1b06e0ad13e63d (diff) |
properly handle (currently unused) dpkg pass-through
Git-Dch: ignore
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-dpkg-assert-multi-arch | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch index e6be6ac7d..b3fbbf0eb 100755 --- a/test/integration/test-dpkg-assert-multi-arch +++ b/test/integration/test-dpkg-assert-multi-arch @@ -26,15 +26,17 @@ testqualifier() { fi } -# non-multiarch or "ubuntus" old multiarchified dpkg +msgmsg 'non-multiarch or "ubuntus" old multiarchified dpkg' echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper -echo '#! /bin/sh -if echo "$*" | grep -q -- "--assert-multi-arch"; then +cat > ./dpkg-wrapper <<EOF +#! /bin/sh +if echo "\$*" | grep -q -- "--assert-multi-arch"; then echo >&2 'dpkg: Fehler: unbekannte Option --assert-multi-arch' echo >&1 'dpkg: Info: unbekannte Option --assert-multi-arch' - exit 2; + exit 2 fi -return $*' > ./dpkg-wrapper +exec "\$@" +EOF chmod +x ./dpkg-wrapper testqualifier 'native-pkg' 'native-pkg' @@ -61,17 +63,18 @@ testqualifier 'all-foreign-pkg-' 'all-foreign-pkg' testqualifier 'always-all-pkg-' 'always-all-pkg' testqualifier 'always-all-foreign-pkg-' 'always-all-foreign-pkg' -# multiarch dpkg (new interface version) - +msgmsg 'multiarch dpkg (new interface version)' rm rootdir/var/lib/dpkg/status touch rootdir/var/lib/dpkg/status echo 'Dir::Bin::dpkg "./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper -echo '#! /bin/sh -if echo "$*" | grep -q -- "--assert-multi-arch"; then - exit 0 -else - exit 1 -fi' > ./dpkg-wrapper +cat > ./dpkg-wrapper <<EOF +#! /bin/sh +if echo "\$*" | grep -q -- "--assert-multi-arch"; then + exit 0 +fi +exec "\$@" +EOF +chmod +x ./dpkg-wrapper testqualifier 'native-pkg' 'native-pkg:amd64' testqualifier 'native-pkg:amd64' 'native-pkg:amd64' |