From nobody@FreeBSD.org  Fri Jun 15 20:25:36 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 35B1F37B401
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 15 Jun 2001 20:25:36 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.3/8.11.3) id f5G3Pa601560;
	Fri, 15 Jun 2001 20:25:36 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200106160325.f5G3Pa601560@freefall.freebsd.org>
Date: Fri, 15 Jun 2001 20:25:36 -0700 (PDT)
From: James Halstead <James_Bond_79@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Mergemaster lying about install problems
X-Send-Pr-Version: www-1.0

>Number:         28190
>Category:       misc
>Synopsis:       Mergemaster lying about install problems
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 15 20:30:02 PDT 2001
>Closed-Date:    Wed Jul 25 10:44:04 PDT 2001
>Last-Modified:  Wed Jul 25 10:44:35 PDT 2001
>Originator:     James Halstead
>Release:        4-stable
>Organization:
>Environment:
FreeBSD Halstead007 4.3-STABLE FreeBSD 4.3-STABLE #2: Fri Jun  1 18:47:12 EDT 2001     jah@Halstead007:/usr/obj/usr/src/sys/MYKERN  i386
>Description:
mergemaster will tell you it had problems installing files and they will be left to merge by hand, however the file will have been installed and it is already deleted from the temproot.
>How-To-Repeat:
use mergemaster after an update, and install a file.
>Fix:
add the '-c' to the install commands. there was an update to have it do install && test && rm, but install has already removed the file, causing rm to fail and thus pollute the $? shell variable.

Patch:
--- mergemaster.sh.orig Fri Jun 15 00:41:45 2001
+++ mergemaster.sh      Sat Jun 16 03:27:18 2001
@@ -471,7 +471,7 @@
     echo ' *** Press [Enter] or [Return] key to continue'
     read ANY_KEY
     unset ANY_KEY
-    diff -qr ${DESTDIR}/etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER}
+    diff -qr ${DESTDIR}/etc ${TEMPROOT}/etc | grep "^Only in ${DESTDIR}/etc" |
${PAGER}
     echo ''
     echo ' *** Press [Enter] or [Return] key to continue'
     read ANY_KEY
@@ -592,7 +592,7 @@
       NEED_CAP_MKDB=yes
       ;;
     /etc/master.passwd)
-      install -m 600 "${1}" "${DESTDIR}${INSTALL_DIR}" &&
+      install -c -m 600 "${1}" "${DESTDIR}${INSTALL_DIR}" &&
         [ -f "${1}" ] && rm "${1}"
       NEED_PWD_MKDB=yes
       DONT_INSTALL=yes
@@ -651,7 +651,7 @@
 
     case "${DONT_INSTALL}" in
     '')
-      install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
+      install -c -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
         [ -f "${1}" ] && rm "${1}"
       ;;
     *)
@@ -664,7 +664,7 @@
       NEED_MAKEDEV=yes
       ;;
     esac
-    install -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
+    install -c -m "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" &&
       [ -f "${1}" ] && rm "${1}"
   fi
   return $?

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Wed Jul 25 10:44:04 PDT 2001 
State-Changed-Why:  

The fix for this was MFC'ed a while ago 


Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Wed Jul 25 10:44:04 PDT 2001 
Responsible-Changed-Why:  

mm is my baby 

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