From owner-freebsd-current@FreeBSD.ORG Thu Nov 22 07:35:39 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B01BF16A41A for ; Thu, 22 Nov 2007 07:35:39 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.freebsd.org (Postfix) with ESMTP id 83D8D13C45D for ; Thu, 22 Nov 2007 07:35:39 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so8202485pyb for ; Wed, 21 Nov 2007 23:35:22 -0800 (PST) Received: by 10.64.250.7 with SMTP id x7mr18464800qbh.1195701657884; Wed, 21 Nov 2007 19:20:57 -0800 (PST) Received: from ?192.168.2.2? ( [67.85.89.184]) by mx.google.com with ESMTPS id e13sm413969qba.2007.11.21.19.20.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Nov 2007 19:20:57 -0800 (PST) Message-ID: <4744F590.80702@gmail.com> Date: Wed, 21 Nov 2007 22:20:48 -0500 From: "Aryeh M. Friedman" User-Agent: Thunderbird 2.0.0.9 (X11/20071120) MIME-Version: 1.0 To: freebsd-current@freebsd.org X-Enigmail-Version: 0.95.5 Content-Type: multipart/mixed; boundary="------------030900060200090107080005" Subject: PATCH: prevent mergemaster from doing a "make builldworld" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 07:35:39 -0000 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--