Date: Mon, 08 Nov 2010 18:38:50 +0000 From: "Tom Judge" <tom@tomjudge.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: jpaetzel@FreeBSD.org Subject: ports/152059: devel/pear/bsd.pear.mk: Fix a plist generation bug when no files are installed into a directory. Message-ID: <20101108183644.B1D0548BE0@tomjudge.vm.bytemark.co.uk> Resent-Message-ID: <201011081840.oA8Ie6Vg060057@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101108183644.B1D0548BE0>