Date: Wed, 21 Nov 2007 22:20:48 -0500 From: "Aryeh M. Friedman" <aryeh.friedman@gmail.com> To: freebsd-current@freebsd.org Subject: PATCH: prevent mergemaster from doing a "make builldworld" Message-ID: <4744F590.80702@gmail.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------030900060200090107080005 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patch attached. - From the new man page: BUGS If run without the -M flag on the "current" source tree as defined in development(7) make(1) will be called, even if invocation of mergemaster(8) follows immediate after a call to "make buildworld" or "make installworld". The reason for not using a non-flagged workaround is it is not possible to determine which SOURCEDIR your working in if they are symlinked back to /FreeBSD/xxx. - -- Aryeh M. Friedman Developer, not business, friendly http://www.flosoft-systems.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHRPWQJ9+1V27SttsRAruBAJ0Qwf4kiycurQfPe3OUKbhS3ClT5gCfSOo2 wD3V2B1z6zIIZ0Wshmq5GkU= =iTtQ -----END PGP SIGNATURE----- --------------030900060200090107080005 Content-Type: text/x-patch; name="mergemaster.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mergemaster.diff" Index: mergemaster.8 =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.8,v retrieving revision 1.36 diff -u -a -u -r1.36 mergemaster.8 --- mergemaster.8 30 Apr 2006 22:09:47 -0000 1.36 +++ mergemaster.8 22 Nov 2007 03:14:02 -0000 @@ -218,6 +218,10 @@ .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +.It Fl M +Do not run +.Xr make 1 +on any uncompiled sources .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root @@ -405,7 +409,12 @@ This manual page and the script itself were written by .An Douglas Barton Aq DougB@FreeBSD.org . .Sh BUGS -There are no known bugs. +If run without the -M flag on the "current" source tree as defined in +.Xr development 7 +.Xr make 1 +will be called, even if invocation of +.Xr mergemaster 8 +follows immediate after a call to "make buildworld" or "make installworld". Please report any problems, comments or suggestions to the author. Several of the Index: mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.54 diff -u -a -u -r1.54 mergemaster.sh --- mergemaster.sh 29 Apr 2006 18:21:43 -0000 1.54 +++ mergemaster.sh 22 Nov 2007 03:14:02 -0000 @@ -15,7 +15,7 @@ display_usage () { VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` echo "mergemaster version ${VERSION_NUMBER}" - echo 'Usage: mergemaster [-scrvahipCP] [-m /path]' + echo 'Usage: mergemaster [-scrvahipCMP] [-m /path]' echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]' echo "Options:" echo " -s Strict comparison (diff every pair of files)" @@ -29,6 +29,7 @@ echo ' -C Compare local rc.conf variables to the defaults' echo ' -P Preserve files that are overwritten' echo " -m /path/directory Specify location of source to do the make in" + echo " -M Do not run make on any unmade source files" echo " -t /path/directory Specify temp root directory" echo " -d Add date and time to directory name (e.g., /var/tmp/temproot.`date +%m%d.%H.%M`)" echo " -u N Specify a numeric umask" @@ -262,7 +263,7 @@ # Check the command line options # -while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do +while getopts ":ascrvhipCPMm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) ARCHSTRING='MACHINE_ARCH='${OPTARG} @@ -311,6 +312,9 @@ m) SOURCEDIR=${OPTARG} ;; + M) + NO_MAKE="NO_MAKE" + ;; t) TEMPROOT=${OPTARG} ;; @@ -548,18 +552,21 @@ case "${PRE_WORLD}" in '') - { cd ${SOURCEDIR} && + { + cd ${SOURCEDIR} && case "${DESTDIR}" in '') ;; *) make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs - ;; - esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + ;; + esac + if [ ! ${NO_MAKE} ]; then + make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ + DESTDIR=${DESTDIR} distribution; + fi } || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; --------------030900060200090107080005--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4744F590.80702>