Mount local pacman cache to workdir

This commit is contained in:
Dennis ten Hoove 2024-02-29 20:32:40 +01:00
parent 21021353aa
commit 31fa4d3f40

View file

@ -206,8 +206,16 @@ if [[ $type == 'archlinux' ]]; then
# Read package list and install secondary system components, skip if not used # Read package list and install secondary system components, skip if not used
if [[ -e $variantdir/package.list ]]; then if [[ -e $variantdir/package.list ]]; then
printf '\e[1;34m-->\e[0m\e[1m Installing secondary packages\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Installing secondary packages\e[0m\n'
# Mount the pacman cache
mount --bind /var/cache/pacman/pkg $workdir/var/cache/pacman/pkg
# Read package list and install
readarray packages < $variantdir/package.list readarray packages < $variantdir/package.list
arch-chroot $workdir pacman -S --noconfirm ${packages[*]} || cleanup_and_quit 'Failed to install base packages' arch-chroot $workdir pacman -S --noconfirm ${packages[*]} || cleanup_and_quit 'Failed to install base packages'
# Unmount pacman cache
umount $workdir/var/cache/pacman/pkg
fi fi
# Run post-install script if exists # Run post-install script if exists