hooks/merged-usr: acquire native architecture from apt-config

`dpkg --print-architecture` will be wrong when creating a foreign
architecture chroot and we cannot chroot() as the chroot directory is
still empty.
debextract
parent cffd47e087
commit 790294ddca
Signed by untrusted user: josch
GPG Key ID: F2CBA5C78FBD83E1

@ -47,11 +47,8 @@ fi
TARGET="$1"
if [ -e "$TARGET/var/lib/dpkg/arch" ]; then
ARCH=$(head -1 "$TARGET/var/lib/dpkg/arch")
else
ARCH=$(dpkg --print-architecture)
fi
ARCH=$(dpkg --print-architecture)
eval "$(APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-config shell ARCH Apt::Architecture)"
if [ -e /usr/share/debootstrap/functions ]; then
. /usr/share/debootstrap/functions

Loading…
Cancel
Save