+ configdpkg
+}
+
+configdpkg() {
+ if [ ! -e rootdir/var/lib/dpkg/status ]; then
+ local STATUSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/status-/' -e 's/^skip-/status-/')
+ if [ -f "${TESTDIRECTORY}/${STATUSFILE}" ]; then
+ cp "${TESTDIRECTORY}/${STATUSFILE}" rootdir/var/lib/dpkg/status
+ else
+ echo -n > rootdir/var/lib/dpkg/status
+ fi
+ fi
+ if $(which dpkg) --assert-multi-arch; then
+ local ARCHS="$(getarchitectures)"
+ if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
+ DPKGARCH="$(dpkg --print-architecture)"
+ for ARCH in ${ARCHS}; do
+ if [ "${ARCH}" != "${DPKGARCH}" ]; then dpkg --add-architecture ${ARCH}; fi
+ done
+ if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
+ insertinstalledpackage 'dpkg' "all" '1.16.2~wipmultiarch~fake'
+ fi
+ fi
+ fi