ports/151799: [PATCH] Mk/bsd.port.mk: fix PLIST_DIRSTRY

Sunpoet Po-Chuan Hsieh sunpoet at FreeBSD.org
Thu Oct 28 15:00:23 UTC 2010


>Number:         151799
>Category:       ports
>Synopsis:       [PATCH] Mk/bsd.port.mk: fix PLIST_DIRSTRY
>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:   Thu Oct 28 15:00:22 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 8.1-STABLE amd64
>Organization:
SUNPOET.net
>Environment:
System: FreeBSD bonjour.sunpoet.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Sat Oct 23 16:01:16 CST 2010 sunpoet at bonjour.sunpoet.net:/usr/obj/usr/src/sys/bonjour amd64
	
>Description:
PLIST_DIRSTRY is broken now. After a brief analysis, I found that dirrmtry
substitution (PLIST_REINPLACE_DIRRMTRY) was executed before PLIST_DIRSTRY
substitution. Therefore, @dirrmtry entries are left in WRKDIR/.PLIST.mktmp.
It breaks port installation.

The solution is to reorder the execution of PLIST_REINPLACE_DIRRMTRY and
PLIST_DIRSTRY substitution.

	
>How-To-Repeat:

Take ports/databases/pgsphere/Makefile,v 1.6 for example.

% cd /usr/ports/databases/pgsphere
% make install
...
===>   Registering installation for pgsphere-1.1.1_1
pkg_create: read_plist: unknown command '@dirrmtry share/postgresql/contrib' (package tools out of date?)
pkg_create: write_plist: unknown command type -1 (share/postgresql/contrib)
*** Error code 2

Stop in /usr/ports/databases/pgsphere.

% cat `make -V WRKDIR`/.PLIST.mktmp
lib/postgresql/pg_sphere.so
share/postgresql/contrib/pg_sphere.sql
@dirrmtry share/postgresql/contrib
@exec /sbin/ldconfig -m /usr/local/lib
@unexec /sbin/ldconfig -R

	
>Fix:

--- bsd.port.mk.patch begins here ---
Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.651
diff -u -r1.651 bsd.port.mk
--- Mk/bsd.port.mk	25 Oct 2010 18:36:56 -0000	1.651
+++ Mk/bsd.port.mk	28 Oct 2010 14:23:37 -0000
@@ -5708,11 +5708,6 @@
 	@if [ -f ${PLIST} ]; then \
 		${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} >> ${TMPPLIST}; \
 	fi
-.for reinplace in ${PLIST_REINPLACE}
-.if defined(PLIST_REINPLACE_${reinplace:U})
-	@${SED} -i "" -e '${PLIST_REINPLACE_${reinplace:U}}' ${TMPPLIST}
-.endif
-.endfor
  
 .for dir in ${PLIST_DIRS}
 	@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^, at dirrm ,' >> ${TMPPLIST}
@@ -5720,6 +5715,13 @@
 .for dir in ${PLIST_DIRSTRY}
 	@${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^, at dirrmtry ,' >> ${TMPPLIST}
 .endfor
+
+.for reinplace in ${PLIST_REINPLACE}
+.if defined(PLIST_REINPLACE_${reinplace:U})
+	@${SED} -i "" -e '${PLIST_REINPLACE_${reinplace:U}}' ${TMPPLIST}
+.endif
+.endfor
+
 .if defined(USE_LINUX_PREFIX)
 .if defined(USE_LDCONFIG)
 	@${ECHO_CMD} "@exec ${LDCONFIG_CMD}" >> ${TMPPLIST}
--- bsd.port.mk.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list