Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2015 23:24:39 +0000 (UTC)
From:      Allan Jude <allanjude@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280234 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <201503182324.t2INOdVJ056338@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: allanjude (doc committer)
Date: Wed Mar 18 23:24:38 2015
New Revision: 280234
URL: https://svnweb.freebsd.org/changeset/base/280234

Log:
  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.

Modified:
  head/usr.sbin/bsdinstall/scripts/docsinstall

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/docsinstall	Wed Mar 18 23:24:25 2015	(r280233)
+++ head/usr.sbin/bsdinstall/scripts/docsinstall	Wed Mar 18 23:24:38 2015	(r280234)
@@ -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
 ################################################################################



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503182324.t2INOdVJ056338>