Subject: pkg/22957: xpkgwedge should only update a non-zero-length HOSTDEF file
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 09/25/2003 15:08:06
>Number:         22957
>Category:       pkg
>Synopsis:       xpkgwedge should only update a non-zero-length HOSTDEF file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 25 19:09:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        2003/09/17
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

	xpkgwedge should only update an HOSTDEF file if it's not empty,
	otherwise it should replace it.

>How-To-Repeat:

>Fix:

Index: pkgtools/xpkgwedge/INSTALL
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/pkgtools/xpkgwedge/INSTALL,v
retrieving revision 1.5
diff -c -r1.5 INSTALL
*** pkgtools/xpkgwedge/INSTALL	10 Sep 2003 17:31:43 -0000	1.5
--- pkgtools/xpkgwedge/INSTALL	19 Sep 2003 14:22:18 -0000
***************
*** 24,30 ****
  		fi
  	done
  
! 	if [ ${PKG_PREFIX} = ${X11BASE} -o -f ${HOSTDEF} ]; then
  		${ECHO} -n "Updating ${HOSTDEF}..."
  		${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
  	else
--- 24,30 ----
  		fi
  	done
  
! 	if [ ${PKG_PREFIX} = ${X11BASE} -o -s ${HOSTDEF} ]; then
  		${ECHO} -n "Updating ${HOSTDEF}..."
  		${CP} -f ${HOSTDEF} ${HOSTDEF}.bak
  	else
>Release-Note:
>Audit-Trail:
>Unformatted: