From nobody@FreeBSD.org  Mon Mar 12 03:12:37 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 770BA37B718
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Mar 2001 03:12:37 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f2CBCaw97888;
	Mon, 12 Mar 2001 03:12:36 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200103121112.f2CBCaw97888@freefall.freebsd.org>
Date: Mon, 12 Mar 2001 03:12:36 -0800 (PST)
From: ggong@cal.alumni.berkeley.edu
To: freebsd-gnats-submit@FreeBSD.org
Subject: mergemaster -a is not automatic when it finds a file that is missing
X-Send-Pr-Version: www-1.0

>Number:         25731
>Category:       misc
>Synopsis:       mergemaster -a is not automatic when it finds a file that is missing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 12 03:20:01 PST 2001
>Closed-Date:    Sun Jun 3 21:18:14 PDT 2001
>Last-Modified:  Sun Jun 03 21:18:41 PDT 2001
>Originator:     Gilbert Gong
>Release:        4.2-STABLE
>Organization:
>Environment:
FreeBSD ggong.baycis.com 4.2-STABLE FreeBSD 4.2-STABLE #0: Fri Mar  2 00:15:19 PST 2001     root@ggong.baycis.com:/usr/src/sys/compile/KERNEL4X  i386

>Description:
When mergemaster, running with -a, finds a file which does not exist in the target directory, it queries the user.
>How-To-Repeat:
run mergemaster -a with a file missing from a target directory.
>Fix:
c161 - root@ggong:/usr/src/usr.sbin/mergemaster#diff -u mergemaster.orig.sh mergemaster.sh 
--- mergemaster.orig.sh Mon Mar 12 03:01:05 2001
+++ mergemaster.sh      Mon Mar 12 03:07:15 2001
@@ -675,8 +675,17 @@
   # diff_loop function knows how to handle it.
   #
   if [ ! -e "${DESTDIR}${COMPFILE#.}" ]; then
-    diff_loop
-    continue
+    case "${AUTO_RUN}" in
+      '')
+        diff_loop
+        continue
+        ;;
+      *)
+        # If this is an auto run, make it official
+        echo "   *** ${COMPFILE} will remain for your consideration"
+        continue
+        ;;
+    esac # Auto run test
   fi
 
   case "${STRICT}" in

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Sun Mar 25 01:00:41 PST 2001 
Responsible-Changed-Why:  

mm is my baby, I'll be taking a look at this one 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25731 
State-Changed-From-To: open->analyzed 
State-Changed-By: dougb 
State-Changed-When: Mon May 28 02:35:50 PDT 2001 
State-Changed-Why:  

Thank you for bringing this to my attention. I had to tweak the fix you 
supplied a little to handle the auto-install case. Also, for your own 
edification, the duplicate "continue" statements are redundant. If you're 
going to continue anyway it's slightly more efficient to put it outside 
the conditional. 

Will MFC after a bit. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25731 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dougb 
State-Changed-When: Sun Jun 3 21:18:14 PDT 2001 
State-Changed-Why:  

Fix was MFC'ed 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25731 
>Unformatted:
