Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 2004 22:24:07 +0200 (CEST)
From:      dirk.meyer@dinoex.sub.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/65304: Fix deinstall INFO in bsd.port.mk
Message-ID:  <200404072024.i37KO7ab046123@home.dinoex.sub.de>
Resent-Message-ID: <200404072030.i37KUFqa046318@freefall.freebsd.org>

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

>Number:         65304
>Category:       ports
>Synopsis:       Fix deinstall INFO in bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 07 13:30:15 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Meyer
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
privat
>Environment:

	any port that uses INFO=

>Description:

	if a port uses INFO, deinstallation will leave stale files
	the test for an empty info/dir file is executed before
	the info file is unregistered

----------------
@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi
@unexec install-info --delete %D/info/gperf.info %D/info/dir
info/gperf.info
@comment MD5:c24d0f79fc49548783ca03386c58828a
@exec install-info %D/info/gperf.info %D/info/dir
----------------

>How-To-Repeat:

	/usr/local/info/ must be empty.
	on an almost clean "/usr/local" do:

	$ cd /usr/ports/devel/gperf && make clean install deinstall

>Fix:

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.486
diff -u -r1.486 bsd.port.mk
--- bsd.port.mk	3 Apr 2004 23:59:50 -0000	1.486
+++ bsd.port.mk	7 Apr 2004 20:15:33 -0000
@@ -4901,9 +4901,6 @@
 .for dir in ${PLIST_DIRS}
 	@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} | ${SED} -e 's,^,@dirrm ,' >> ${TMPPLIST}
 .endfor
-.if !defined(NO_MTREE)
-	@${ECHO_CMD} "@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi" >> ${TMPPLIST}
-.endif
 .if defined(INSTALLS_SHLIB) && !defined(INSTALL_AS_USER)
 	@${ECHO_CMD} "@exec ${LDCONFIG} -m ${LDCONFIG_PLIST}" >> ${TMPPLIST}
 	@${ECHO_CMD} "@unexec ${LDCONFIG} -R" >> ${TMPPLIST}
@@ -4952,6 +4949,9 @@
 	@${ECHO_CMD} "@exec install-info %D/${INFO_PATH}/$i.info %D/${INFO_PATH}/dir" \
 		>> ${TMPPLIST}
 .endfor
+.if !defined(NO_MTREE)
+	@${ECHO_CMD} "@unexec if [ -f %D/${INFO_PATH}/dir ]; then if sed -e '1,/Menu:/d' %D/${INFO_PATH}/dir | grep -q '^[*] '; then true; else rm %D/${INFO_PATH}/dir; fi; fi" >> ${TMPPLIST}
+.endif
 
 # Compress (or uncompress) and symlink manpages.
 .if !target(compress-man)

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



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