[PC-BSD Commits] r16129 - pcbsd/current/src-sh/pc-metapkgmanager

svn at pcbsd.org svn at pcbsd.org
Mon Apr 2 08:53:30 PDT 2012


Author: kris
Date: 2012-04-02 15:53:29 +0000 (Mon, 02 Apr 2012)
New Revision: 16129

Modified:
   pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
Log:

Allow pc-metapkgmanager to find alternative chroot default pkgsets



Modified: pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
===================================================================
--- pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-04-02 15:48:23 UTC (rev 16128)
+++ pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-04-02 15:53:29 UTC (rev 16129)
@@ -28,7 +28,6 @@
 DBDIR="/var/db/pc-metapkgmanager/pkgsets"
 LOGFILE="/tmp/.pc-metapkgmanager.log"
 FTP_PASSIVE_MODE="YES" ; export FTP_PASSIVE_MODE
-PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
 
 display_usage() {
         cat <<EOF
@@ -594,8 +593,10 @@
 # The default PKGSET
 PKGSET="pcbsd"
 
+
 # Check if we have a different dataset specified in pcbsd.conf
-_pkgChk="`sed -n 's/PCBSD_METAPKGSET: //p' ${PCBSD_ETCCONF}`"
+PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
+_pkgChk="`sed -n 's/PCBSD_METAPKGSET: //p' ${PCBSD_ETCCONF} 2>/dev/null`"
 if [ -n "${_pkgChk}" ] ; then PKGSET="$_pkgChk" ; fi
 MPDIR="${DBDIR}/${PKGSET}"
 
@@ -618,6 +619,11 @@
 	    fi
 	    _pkgflags="-C ${_chroot}"
 	    _chrootcmd="chroot ${_chroot}"
+
+	    # Check for an alternative default pkgset in this chroot
+	    PCBSD_ETCCONF="${_chroot}/usr/local/etc/pcbsd.conf"
+	    _pkgChk="`sed -n 's/PCBSD_METAPKGSET: //p' ${PCBSD_ETCCONF} 2>/dev/null`"
+	    if [ -n "${_pkgChk}" ] ; then PKGSET="$_pkgChk" ; fi
 	    shift
             ;;
   --pkgset) if [ -z "$2" ] ; then display_usage ; fi  



More information about the Commits mailing list