]> git.saurik.com Git - apt.git/commitdiff
test: Make sure we always find a dpkg in status file
authorJulian Andres Klode <jak@debian.org>
Tue, 23 Aug 2016 22:48:22 +0000 (00:48 +0200)
committerJulian Andres Klode <jak@debian.org>
Fri, 26 Aug 2016 20:17:55 +0000 (22:17 +0200)
Especially on non-Debian platforms, dpkg might not list itself
on the host system, and thus dpkg --assert-multi-arch fails.

Gbp-Dch: ignore

test/integration/framework

index 827226b7de80766746a3af04c2c684137f4c58ca..3bbb8bc251a7ffb0fda855e0fa3fb348993b1bfc 100644 (file)
@@ -523,6 +523,14 @@ configdpkg() {
                fi
        fi
        rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg
+       # if multi-arch make sure dpkg can detect itself as capable of it
+       if getarchitectures | grep -E -q '[^ ]+ [^ ]+'; then
+               if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
+                       # dpkg doesn't really check the version as long as it is fully installed,
+                       # but just to be sure we choose one above the required version
+                       insertinstalledpackage 'dpkg' "all" '1.16.2+fake'
+               fi
+       fi
        if command dpkg --assert-multi-arch >/dev/null 2>&1 ; then
                local ARCHS="$(getarchitectures)"
                local DPKGARCH="$(dpkg --print-architecture)"
@@ -538,14 +546,6 @@ configdpkg() {
                                fi
                        fi
                done
-               # if multi-arch make sure dpkg can detect itself as capable of it
-               if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
-                       if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
-                               # dpkg doesn't really check the version as long as it is fully installed,
-                               # but just to be sure we choose one above the required version
-                               insertinstalledpackage 'dpkg' "all" '1.16.2+fake'
-                       fi
-               fi
        fi
 }