From tataz@tataz.chchile.org  Mon Dec 10 20:52:43 2007
Return-Path: <tataz@tataz.chchile.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F57716A41B;
	Mon, 10 Dec 2007 20:52:43 +0000 (UTC)
	(envelope-from tataz@tataz.chchile.org)
Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42])
	by mx1.freebsd.org (Postfix) with ESMTP id E0FD413C44B;
	Mon, 10 Dec 2007 20:52:42 +0000 (UTC)
	(envelope-from tataz@tataz.chchile.org)
Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35])
	by postfix1-g20.free.fr (Postfix) with ESMTP id E05091FF6A44;
	Mon, 10 Dec 2007 21:34:09 +0100 (CET)
Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1])
	by smtp5-g19.free.fr (Postfix) with ESMTP id B637B3F6202;
	Mon, 10 Dec 2007 21:34:07 +0100 (CET)
Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98])
	by smtp5-g19.free.fr (Postfix) with ESMTP id 807F33F621B;
	Mon, 10 Dec 2007 21:34:06 +0100 (CET)
Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25])
	by tatooine.tataz.chchile.org (Postfix) with ESMTP id DEA1B9B497;
	Mon, 10 Dec 2007 20:31:48 +0000 (UTC)
Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000)
	id D64E4405B; Mon, 10 Dec 2007 21:31:48 +0100 (CET)
Message-Id: <20071210203148.D64E4405B@obiwan.tataz.chchile.org>
Date: Mon, 10 Dec 2007 21:31:48 +0100 (CET)
From: Jeremie Le Hen <jeremie@le-hen.org>
Reply-To: Jeremie Le Hen <jeremie@le-hen.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: DougB@FreeBSD.org, jeremie@le-hen.org
Subject: [patch] mergemaster: fix top level ${SOURCEDIR} to ${SOURCEDIR}/etc
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         118536
>Category:       bin
>Synopsis:       [patch] [request] mergemaster(8): fix top level ${SOURCEDIR} to ${SOURCEDIR}/etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 10 21:00:07 UTC 2007
>Closed-Date:    Tue Apr 01 22:01:06 UTC 2008
>Last-Modified:  Tue Apr 01 22:01:06 UTC 2008
>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:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 10 21:32:49 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118536 

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Jeremie Le Hen <jeremie@le-hen.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org, DougB@FreeBSD.org
Subject: Re: bin/118536: [patch] mergemaster: fix top level ${SOURCEDIR} to
	${SOURCEDIR}/etc
Date: Fri, 14 Dec 2007 15:41:00 +0300

 On Mon, Dec 10, 2007 at 09:31:48PM +0100, Jeremie Le Hen wrote:
 > 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/.
 
 Please see PR bin/96528 which fixes this, along with making
 mergemaster(8) upgrade- and cross-friendly.
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer
State-Changed-From-To: open->closed 
State-Changed-By: brd 
State-Changed-When: Tue Apr 1 21:59:16 UTC 2008 
State-Changed-Why:  
Closed with Jeremie Le Hen's permission, since 96528 supersedes it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118536 
>Unformatted:
