Fix the handbook install option in bsdinstall

bsdconfig's f_package_add doesn't seem to support using the pkg repo from /etc/pkg/FreeBSD.conf, it also tries to run the commands on the installer image, not in the destination chroot

Instead, manually bootstrap pkg in the chroot, and then install the requested packages (in the chroot)

Doesn't use pkg -c, because pkg is not installed on the installer image

PR:		196250
Differential Revision:	https://reviews.freebsd.org/D2026
Approved by:	bapt
Sponsored by:	ScaleEngine Inc.
This commit is contained in:
allanjude 2015-03-18 23:24:38 +00:00
parent 3617a765ed
commit 19ab8c6fb0

View File

@ -151,13 +151,20 @@ f_dialog_menutag_fetch selected
# Let pkg_add be able to use name servers
f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
if [ ! -x $BSDINSTALL_CHROOT ]; then
ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg bootstrap
fi
#
# Install each of the selected packages
#
docsets=""
for lang in $selected; do
f_package_add $lang-freebsd-doc || return $FAILURE
docsets="$docsets $lang-freebsd-doc"
done
ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install $docsets || return $FAILURE
################################################################################
# END
################################################################################