[PC-BSD Commits] r3970 - pbibuild/pbibuilder/scripts
svn at pcbsd.org
svn at pcbsd.org
Tue May 19 12:38:40 PDT 2009
Author: kris
Date: 2009-05-19 12:38:40 -0700 (Tue, 19 May 2009)
New Revision: 3970
Modified:
pbibuild/pbibuilder/scripts/3.makepbi.sh
pbibuild/pbibuilder/scripts/autopopulate.sh
Log:
Added a new option to pbibuilder, PBIAUTOPOPULATE, and give it possible values of YES / NO / FULL
Modified: pbibuild/pbibuilder/scripts/3.makepbi.sh
===================================================================
--- pbibuild/pbibuilder/scripts/3.makepbi.sh 2009-05-19 19:34:11 UTC (rev 3969)
+++ pbibuild/pbibuilder/scripts/3.makepbi.sh 2009-05-19 19:38:40 UTC (rev 3970)
@@ -83,20 +83,19 @@
export PBILOCALBASE
fi
-
# Check if we have auto-populate set for this PBI
-if [ "${PBIAUTOPOPULATE}" = "YES" ]
+if [ "${PBIAUTOPOPULATE}" = "FULL" -o "${PBIAUTOPOPULATE}" = "YES" ]
then
# This PBI wants to populate automatically with port plist info
cp ${PROGDIR}/scripts/autopopulate.sh ${PDESTDIR}/autopopulate.sh
chmod 755 ${PDESTDIR}/autopopulate.sh
rm -rf ${PDESTDIR}/tmp/autodupdir >/dev/null 2>/dev/null
export PORTNAME PORTVER
+ export PBIAUTOPOPULATE
else
rm ${PDESTDIR}/autopopulate.sh >/dev/null 2>/dev/null
fi
-
# Create the script which chroot will run
echo '#!/bin/sh
@@ -118,7 +117,12 @@
if [ -e "/autopopulate.sh" ]
then
echo "/autopopulate.sh ${PORTNAME}-${PORTVER} ${PBILOCALBASE} ${PBIDIR} /autopopulate.sh"
- /autopopulate.sh "${PORTNAME}-${PORTVER}" "${PBILOCALBASE}" "${PBIDIR}" "/autopopulate.sh"
+ if [ "${PBIAUTOPOPULATE}" = "FULL" ]
+ then
+ /autopopulate.sh "${PORTNAME}-${PORTVER}" "${PBILOCALBASE}" "${PBIDIR}" "/autopopulate.sh"
+ else
+ /autopopulate.sh "${PORTNAME}-${PORTVER}" "${PBILOCALBASE}" "${PBIDIR}"
+ fi
fi
if [ -e "/module/copy-files" ]
Modified: pbibuild/pbibuilder/scripts/autopopulate.sh
===================================================================
--- pbibuild/pbibuilder/scripts/autopopulate.sh 2009-05-19 19:34:11 UTC (rev 3969)
+++ pbibuild/pbibuilder/scripts/autopopulate.sh 2009-05-19 19:38:40 UTC (rev 3970)
@@ -14,9 +14,9 @@
fi
# First, check if we have required variables
-if [ -z "${1}" -o -z "${2}" -o -z "${3}" -o -z "${4}" ]
+if [ -z "${1}" -o -z "${2}" -o -z "${3}" ]
then
- echo "Missing flags for starting port, PBIBASE, PBIDIR and AUTOPOPPATH"
+ echo "Missing flags for starting port, PBIBASE, PBIDIR"
exit 1
fi
@@ -68,19 +68,23 @@
touch "${DUPDIR}/${PORTPOPULATE}"
-# Now, check the dependancies of the working port, and recursively call autopopulate.sh on each of them
-pkg_info -r ${PORTPOPULATE} > ${DPLIST}
-while read dpfile
-do
- if [ ! -z "${dpfile}" ]
- then
- DPPORT=`echo ${dpfile} | cut -d ":" -f 2 | sed -e "s| ||g"`
- if [ ! -z "${DPPORT}" ]
+# Check if we are given path to recursively populate from each dependancy
+if [ ! -z "${AUTOPOPPATH}" ]
+then
+
+ # Now, check the dependancies of the working port, and recursively call autopopulate.sh on each of them
+ pkg_info -r ${PORTPOPULATE} > ${DPLIST}
+ while read dpfile
+ do
+ if [ ! -z "${dpfile}" ]
then
- #echo "./autopopulate.sh ${DPPORT} ${PBIBASE} ${PBIDIR} ${AUTOPOPPATH}"
- ${AUTOPOPPATH} "${DPPORT}" "${PBIBASE}" "${PBIDIR}" "${AUTOPOPPATH}"
+ DPPORT=`echo ${dpfile} | cut -d ":" -f 2 | sed -e "s| ||g"`
+ if [ ! -z "${DPPORT}" ]
+ then
+ ${AUTOPOPPATH} "${DPPORT}" "${PBIBASE}" "${PBIDIR}" "${AUTOPOPPATH}"
+ fi
fi
- fi
-done <"${DPLIST}"
-rm ${DPLIST}
+ done <"${DPLIST}"
+ rm ${DPLIST}
+fi
More information about the Commits
mailing list