Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2007 21:31:48 +0100 (CET)
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        DougB@FreeBSD.org, jeremie@le-hen.org
Subject:   bin/118536: [patch] mergemaster: fix top level ${SOURCEDIR} to ${SOURCEDIR}/etc
Message-ID:  <20071210203148.D64E4405B@obiwan.tataz.chchile.org>
Resent-Message-ID: <200712102100.lBAL07nJ077614@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118536
>Category:       bin
>Synopsis:       [patch] mergemaster: fix top level ${SOURCEDIR} to ${SOURCEDIR}/etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 10 21:00:07 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Jeremie Le Hen
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD 6.2-RELEASE

>Description:
	The manual page states that the -m option allows to specify an
	alternate source directory.  I understood this was the top level
	source dir (/usr/src) and mergemaste(8) ended up in almost
	rebuilding world in /var/tmp/temproot/.
>How-To-Repeat:
>Fix:
	This patch simply checks if a etc/ subdirectory is available and
	asks the user whether he wants to fix the source directory.

--- mergemaster_fix_SOURCEDIR.patch begins here ---
--- mergemaster.sh.0	2007-12-10 12:58:53.000000000 +0000
+++ mergemaster.sh	2007-12-10 13:05:07.000000000 +0000
@@ -413,6 +413,20 @@
 # Assign the source directory
 #
 SOURCEDIR=${SOURCEDIR:-/usr/src/etc}
+if [ -d "${SOURCEDIR}/etc" -a -z "${AUTO_RUN}" ]; then
+  echo "*** The directory specified to locate the source, ${SOURCEDIR},"
+  echo "    seems to be the top level source directory while usually the etc/"
+  echo "    subdirectory should be provided."
+  echo -n "    Do you want mergemaster to fix it to ${SOURCEDIR}/etc? [yes] "
+  read FIX_SOURCEDIR
+
+  case "${FIX_SOURCEDIR}" in
+  [nN]*) ;;
+  *)
+    SOURCEDIR=${SOURCEDIR}/etc
+    ;;
+  esac
+fi
 
 # Check DESTDIR against the mergemaster mtree database to see what
 # files the user changed from the reference files.
--- mergemaster_fix_SOURCEDIR.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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