lh_chroot_linux-image: Install dependencies differently when using aptitude

We must use "aptitude install <pkgname>" to install dependencies of a
dpkg-installed <pkgname>, or aptitude's resolver will remove it. apt-get
does not have this "feature".

This was causing a problem when using a custom versions of live-initramfs
as they would be removed, causing a boot failure.
This commit is contained in:
Chris Lamb 2008-03-22 02:44:18 +00:00 committed by Daniel Baumann
parent 02a9e29e09
commit 6e9f8956ee
1 changed files with 9 additions and 2 deletions

View File

@ -98,8 +98,15 @@ EOF
Chroot "find /root -name *.deb" > chroot/root/initfs Chroot "find /root -name *.deb" > chroot/root/initfs
Chroot "xargs --arg-file=/root/initfs dpkg -i" || true Chroot "xargs --arg-file=/root/initfs dpkg -i" || true
# Cleaning dependencies # Install dependencies
Apt install -f case "${LH_APT}" in
aptitude)
Apt install ${LH_INITRAMFS}
;;
apt-get)
Apt install -f
;;
esac
# Removing package files # Removing package files
rm -f chroot/root/${LH_INITRAMFS}*.deb rm -f chroot/root/${LH_INITRAMFS}*.deb