ports/78597: [PATCH] bsd.port.mk's add-plist-docs fails if port not installed
Jilles Tjoelker
jilles at stack.nl
Tue Mar 8 18:00:11 UTC 2005
>Number: 78597
>Category: ports
>Synopsis: [PATCH] bsd.port.mk's add-plist-docs fails if port not installed
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 08 18:00:08 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Jilles Tjoelker
>Release: FreeBSD 5.3-RELEASE-p2 i386
>Organization:
MCGV Stack
>Environment:
System: FreeBSD turtle.stack.nl 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #5: Thu Dec 2 17:25:55 CET 2004 jilles at snail.stack.nl:/usr/obj/usr/src/sys/SNAIL i386
>Description:
Cannot generate-plist and add-plist-docs if the port is not installed and
uses PORTDOCS.
This results in a few "@echo: not found" error messages and a plist without
documentation files.
>How-To-Repeat:
Attempt to make generate-plist and add-plist-docs on a non-installed port
that uses PORTDOCS, such as mbone/xspeakfree, mbone/udpcast or java/javamail.
jilles at turtle /home/jilles% (cd /usr/ports/mbone/xspeakfree && make -dl generate-plist TMPPLIST=/home/jilles/tmp/test-plist)
echo "===> Generating temporary packing list"
===> Generating temporary packing list
[snip]
jilles at turtle /home/jilles% (cd /usr/ports/mbone/xspeakfree && make -dl add-plist-docs TMPPLIST=/home/jilles/tmp/test-plist)
if /usr/bin/egrep -qe '^@cw?d' /home/jilles/tmp/test-plist && [ "`/usr/bin/sed -En -e '/^@cw?d[ ]*/s,,,p' /home/jilles/tmp/test-plist | /usr/bin/tail -n 1`" != "/usr/X11R6" ]; then echo "@cwd /usr/X11R6" >> /home/jilles/tmp/test-plist; fi
if [ ! -e /usr/X11R6/share/doc/xspeakfree/BUGS ]; then @echo /usr/X11R6/share/doc/xspeakfree/BUGS | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
if [ ! -e /usr/X11R6/share/doc/xspeakfree/HISTORY ]; then @echo /usr/X11R6/share/doc/xspeakfree/HISTORY | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
if [ ! -e /usr/X11R6/share/doc/xspeakfree/INSTALL ]; then @echo /usr/X11R6/share/doc/xspeakfree/INSTALL | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
if [ ! -e /usr/X11R6/share/doc/xspeakfree/LICENSE ]; then @echo /usr/X11R6/share/doc/xspeakfree/LICENSE | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
if [ ! -e /usr/X11R6/share/doc/xspeakfree/README ]; then @echo /usr/X11R6/share/doc/xspeakfree/README | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
if [ ! -e /usr/X11R6/share/doc/xspeakfree/TODO ]; then @echo /usr/X11R6/share/doc/xspeakfree/TODO | /usr/bin/sed -e 's,^/usr/X11R6/,,' >> /home/jilles/tmp/test-plist; fi
@echo: not found
/usr/bin/find -P /usr/X11R6/share/doc/xspeakfree/BUGS /usr/X11R6/share/doc/xspeakfree/HISTORY /usr/X11R6/share/doc/xspeakfree/INSTALL /usr/X11R6/share/doc/xspeakfree/LICENSE /usr/X11R6/share/doc/xspeakfree/README /usr/X11R6/share/doc/xspeakfree/TODO ! -type d 2>/dev/null | /usr/bin/sed -ne 's,^/usr/X11R6/,,p' >> /home/jilles/tmp/test-plist
/usr/bin/find -P -d /usr/X11R6/share/doc/xspeakfree/BUGS /usr/X11R6/share/doc/xspeakfree/HISTORY /usr/X11R6/share/doc/xspeakfree/INSTALL /usr/X11R6/share/doc/xspeakfree/LICENSE /usr/X11R6/share/doc/xspeakfree/README /usr/X11R6/share/doc/xspeakfree/TODO -type d 2>/dev/null | /usr/bin/sed -ne 's,^/usr/X11R6/, at dirrm ,p' >> /home/jilles/tmp/test-plist
echo "@dirrm share/doc/xspeakfree" >> /home/jilles/tmp/test-plist
jilles at turtle /home/jilles%
>Fix:
Apply the attached patch.
The resulting plist often still has multiple @dirrm lines for the same
directory but for many purposes it should be usable.
--- bsd.port.mk.patch begins here ---
--- ports/Mk/bsd.port.mk.orig Thu Mar 3 21:58:36 2005
+++ ports/Mk/bsd.port.mk Tue Mar 8 18:15:24 2005
@@ -4803,7 +4803,7 @@
fi
.for x in ${PORTDOCS}
@if [ ! -e ${DOCSDIR}/${x} ]; then \
- @${ECHO_CMD} ${DOCSDIR}/${x} | \
+ ${ECHO_CMD} ${DOCSDIR}/${x} | \
${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \
fi
.endfor
--- bsd.port.mk.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list