ports/147476: [PATCH] Mk/bsd.port.mk: fix 'make deinstall' for @comment entries in PLIST_DIRS

Sunpoet Po-Chuan Hsieh sunpoet at sunpoet.net
Fri Jun 4 17:00:11 UTC 2010


>Number:         147476
>Category:       ports
>Synopsis:       [PATCH] Mk/bsd.port.mk: fix 'make deinstall' for @comment entries in PLIST_DIRS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 04 17:00:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 8.1-PRERELEASE amd64
>Organization:
SUNPOET.net
>Environment:
System: FreeBSD bonjour.sunpoet.net 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Wed May 19 00:13:00 CST 2010 sunpoet at bonjour.sunpoet.net:/usr/obj/usr/src/sys/bonjour amd64


	
>Description:
This patch is dealing with deinstallation of @comment entries in PLIST_DIRS.
For example, ports/databases/pgsphere with NOPORTDOCS=yes.

% cd /usr/ports/databases/pgsphere
% make -V PLIST_DIRS
%%DATADIR%%/contrib  %%PORTDOCS%%%%DOCSDIR%%/contrib
% make NOPORTDOCS=yes install deinstall
...
===>  Deinstalling for databases/pgsphere
===>   Deinstalling pgsphere-1.1.1
pkg_delete: file '/usr/local/@comment share/doc/postgresql/contrib' doesn't exist
pkg_delete: unable to completely remove directory '/usr/local/@comment share/doc/postgresql/contrib'
pkg_delete: couldn't entirely delete package (perhaps the packing list is incorrectly specified?)
% cat `make -V TMPPLIST`
lib/postgresql/pg_sphere.so
share/postgresql/contrib/pg_sphere.sql
@comment share/doc/postgresql/contrib/README.pg_sphere
@comment share/doc/postgresql/contrib/COPYRIGHT.pg_sphere
@dirrm share/postgresql/contrib
@dirrm @comment share/doc/postgresql/contrib
@exec /sbin/ldconfig -m /usr/local/lib
@unexec /sbin/ldconfig -R

	
>How-To-Repeat:
	
>Fix:

--- /usr/ports/Mk/bsd.port.mk	2010-06-04 17:32:00.000000000 +0800
+++ /usr/ports/sunpoet/bsd.port.mk	2010-06-04 22:01:48.000000000 +0800
@@ -5793,7 +5793,7 @@
 .endfor
  
 .for dir in ${PLIST_DIRS}
-	@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^, at dirrm ,' >> ${TMPPLIST}
+	@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^, at dirrm ,' -e 's,^@dirrm @comment , at comment @dirrm ,' >> ${TMPPLIST}
 .endfor
 # To be removed once INSTALLS_SHLIB has been eradicated.
 .if defined(INSTALLS_SHLIB) && !defined(INSTALL_AS_USER)

	


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



More information about the freebsd-ports-bugs mailing list