forked from josch/mmdebstrap
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.
This commit is contained in:
parent
cffd47e087
commit
790294ddca
1 changed files with 2 additions and 5 deletions
|
@ -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…
Reference in a new issue