ports/152059: devel/pear/bsd.pear.mk: Fix a plist generation bug when no files are installed into a directory.
Tom Judge
tom at tomjudge.com
Mon Nov 8 18:40:07 UTC 2010
>Number: 152059
>Category: ports
>Synopsis: devel/pear/bsd.pear.mk: Fix a plist generation bug when no files are installed into a directory.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 08 18:40:06 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Tom Judge
>Release: FreeBSD 8.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD tinderbox.home.tomjudge.com 8.1-STABLE FreeBSD 8.1-STABLE #0 r213720: Tue Oct 12 14:02:02 UTC 2010 tj at tinderbox.home.tomjudge.com:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
When using bsd.pear.mk for pear modules it is possible to generate a plist missing some @rmdir statements.
Consider the following:
TESTS= Latin1Test.php locale/en_GB/LC_MESSAGES/test.mo \
locale/en_GB/LC_MESSAGES/test.php locale/en_GB/LC_MESSAGES/test.po \
locale/en_GB/LC_MESSAGES/test2.mo locale/en_GB/LC_MESSAGES/test2.po \
locale/es_ES/LC_MESSAGES/test.mo locale/es_ES/LC_MESSAGES/test.po \
locale/fr_FR/LC_MESSAGES/test.mo locale/fr_FR/LC_MESSAGES/test.php \
locale/fr_FR/LC_MESSAGES/test.po locale/fr_FR/LC_MESSAGES/test2.mo \
locale/fr_FR/LC_MESSAGES/test2.php locale/fr_FR/LC_MESSAGES/test2.po
The current code will generate @rmdir's for:
locale/en_GB/LC_MESSAGES
locale/es_ES/LC_MESSAGES
locale/fr_FR/LC_MESSAGES
But not for:
locale/en_GB
locale/es_ES
locale/fr_FR
locale
The attached patch fixes the DIRFILTER to generate the missing @rmdir's.
>How-To-Repeat:
>Fix:
--- bsd.pear.mk.dir-fix.txt begins here ---
--- bsd.pear.mk.orig 2010-11-08 16:32:03.000000000 +0000
+++ bsd.pear.mk 2010-11-08 18:19:57.000000000 +0000
@@ -97,7 +97,19 @@
@${FALSE}
.endif
-DIRFILTER= ${SED} -En '\:^.*/[^/]*$$:s:^(.+)/[^/]*$$:\1:p' | ${SORT} -ru
+DIRFILTER= ${SED} -En '\:^.*/[^/]*$$:s:^(.+)/[^/]*$$:\1:p' \
+ | ( while read r; do \
+ C=1; \
+ while [ $$C = 1 ]; do \
+ echo $$r; \
+ if echo $$r | ${GREP} '/' > /dev/null; then \
+ r=`${DIRNAME} $$r`; \
+ else \
+ C=0; \
+ fi; \
+ done; \
+ done \
+ ) | ${SORT} -ur
.if !defined(USE_PHPIZE)
do-generate-plist:
--- bsd.pear.mk.dir-fix.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list