ports/187306: [PATCH] ports-mgmt/portsearch portsearch -u hangs on empty PLIST
Klaus Aehlig
aehlig at linta.de
Wed Mar 5 22:30:00 UTC 2014
>Number: 187306
>Category: ports
>Synopsis: [PATCH] ports-mgmt/portsearch portsearch -u hangs on empty PLIST
>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: Wed Mar 05 22:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Klaus Aehlig
>Release: FreeBSD 9.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD howard.linta.de 9.2-STABLE FreeBSD 9.2-STABLE #17 r260666: Wed Jan 15 08:28:35 CET 2014 root at howard.linta.de:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
On a current ports checkout with a freshly installed portsearch,
the command portsearch -u hangs. More precisely it hangs on
make -C /usr/ports/archivers/py-librtfcomp -f /usr/local/share/portsearch/Makefile -f /usr/ports/archivers/py-librtfcomp/Makefile show-plist
The reason is, that PLIST is empty for this port. However, while the
empty string is not the name of an existing file, [ -f ] still returns
zero. Quoting the argument of -f fixes the problem.
>How-To-Repeat:
install ports-mgmt/portsearch, then make index, then portsearch -u
>Fix:
Put the following patch in a newly created files subdirectory
and bump PORTREVISION. Alternatively, fix upstream (as maintainer
is also upstream).
--- patch-Mk__Makefile begins here ---
--- ./Mk/Makefile.orig 2006-01-16 09:51:32.000000000 +0100
+++ ./Mk/Makefile 2014-03-05 21:53:38.000000000 +0100
@@ -25,7 +25,7 @@
done
.endif
.endfor
- @if [ -f ${PLIST} ]; then \
+ @if [ -f "${PLIST}" ]; then \
${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} ; \
fi
--- patch-Mk__Makefile ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list