Passing chroot directory explicitly to Apt() in preparation for multi-arch.

This commit is contained in:
Daniel Baumann 2010-12-05 14:06:12 +01:00
parent ed42278155
commit d703d361fc
3 changed files with 11 additions and 8 deletions

View File

@ -10,13 +10,16 @@
Apt ()
{
CHROOT="${1}"
shift
case "${LB_APT}" in
apt|apt-get)
Chroot chroot apt-get ${APT_OPTIONS} ${@}
Chroot ${CHROOT} apt-get ${APT_OPTIONS} ${@}
;;
aptitude)
Chroot chroot aptitude ${APTITUDE_OPTIONS} ${@}
Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} ${@}
;;
esac
}

View File

@ -138,7 +138,7 @@ case "${LB_BINARY_IMAGES}" in
net)
if [ ! -f chroot/usr/bin/smbmount ]
then
Apt install smbfs
Apt chroot install smbfs
fi
if [ ! -d chroot/etc/initramfs-tools ]

View File

@ -411,15 +411,15 @@ EOF
Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
fi
Apt update
Apt upgrade
Apt dist-upgrade
Apt chroot update
Apt chroot upgrade
Apt chroot dist-upgrade
# Installing keyring packages
if [ -n "${LB_KEYRING_PACKAGES}" ]
then
Chroot chroot "apt-get --yes --force-yes install ${LB_KEYRING_PACKAGES}"
Apt update
Apt chroot update
fi
if [ "${LB_CACHE_INDICES}" = "true" ]
@ -625,7 +625,7 @@ EOF
fi
# Updating indices
Apt update
Apt chroot update
# Cleaning apt package cache
rm -rf chroot/var/cache/apt