forked from josch/mmdebstrap
m-a-b-q: replace test_installed by dpkg-checkbuilddeps
This commit is contained in:
parent
8e2f62d08c
commit
98b3c7f2cd
1 changed files with 7 additions and 15 deletions
|
@ -273,26 +273,14 @@ case "$ARCHITECTURE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
test_installed() {
|
||||
pkg="$1"
|
||||
if [ "$(dpkg-query -f '${db:Status-Status}' -W "$pkg")" != installed ]; then
|
||||
die "please install $pkg"
|
||||
fi
|
||||
}
|
||||
|
||||
for pkg in autopkgtest dosfstools e2fsprogs fdisk mount mtools passwd uidmap libarchive13; do
|
||||
test_installed "$pkg"
|
||||
done
|
||||
|
||||
if test "$(dpkg-query -f '${db:Status-Status}' -W binutils-multiarch)" = installed; then
|
||||
GNU_PREFIX=
|
||||
BINUTILS=
|
||||
else
|
||||
test_installed dpkg-dev
|
||||
GNU_ARCHITECTURE="$(dpkg-architecture "-a$ARCHITECTURE" -qDEB_HOST_GNU_TYPE)"
|
||||
GNU_PREFIX="$GNU_ARCHITECTURE-"
|
||||
GNU_SUFFIX="-$(echo "$GNU_ARCHITECTURE" | tr _ -)"
|
||||
test "$(dpkg-query -f '${db:Status-Status}' -W "binutils$GNU_SUFFIX")" = installed ||
|
||||
die "please install binutils$GNU_SUFFIX or binutils-multiarch"
|
||||
BINUTILS=", binutils$GNU_SUFFIX | binutils-multiarch"
|
||||
fi
|
||||
|
||||
arches=" $(dpkg --print-architecture) $(dpkg --print-foreign-architectures | tr '\n' ' ') "
|
||||
|
@ -301,7 +289,11 @@ case $arches in
|
|||
*) die "enable $ARCHITECTURE by running: sudo dpkg --add-architecture $ARCHITECTURE && sudo apt update" ;;
|
||||
esac
|
||||
|
||||
test_installed "systemd-boot-efi:$ARCHITECTURE"
|
||||
test "$(dpkg-query -f '${db:Status-Status}' -W "dpkg-dev")" = installed ||
|
||||
die "please install dpkg-dev"
|
||||
|
||||
dpkg-checkbuilddeps -d "autopkgtest, dosfstools, e2fsprogs, fdisk, mount, mtools, passwd, uidmap, libarchive13, systemd-boot-efi:$ARCHITECTURE $BINUTILS" /dev/null ||
|
||||
die "please install the required packages listed above"
|
||||
|
||||
BOOTSTUB="/usr/lib/systemd/boot/efi/linux${EFIIMG#boot}.stub"
|
||||
|
||||
|
|
Loading…
Reference in a new issue