-chroot "$${SYSROOT}" apt-get update
chroot "$${SYSROOT}" ln -sf /bin/true /usr/local/sbin/invoke-rc.d
chroot "$${SYSROOT}" ln -sf /bin/true /usr/sbin/udevadm
+ mountpoint "$${SYSROOT}/proc" || mount -o bind /proc "$${SYSROOT}/proc"
chroot "$${SYSROOT}" apt-get --yes -t "${release}" install ${PACKAGES}
mkdir -p -m 755 "$${SYSROOT}/var/lib/deborphan/"
chroot "$${SYSROOT}" sh -c 'printf "%s\\n" ${PACKAGES} >/var/lib/deborphan/keep'
-chroot "$${SYSROOT}" sh -c 'apt-get --yes purge $$(deborphan -an |sed "s;^.* ;;g")'
chroot "$${SYSROOT}" apt-get --yes --auto-remove purge
-chroot "$${SYSROOT}" apt-get --yes --auto-remove upgrade
+ -umount "$${SYSROOT}/proc"
chroot "$${SYSROOT}" apt-get clean
chroot "$${SYSROOT}" rm /usr/local/sbin/invoke-rc.d
chroot "$${SYSROOT}" rm /usr/sbin/udevadm