Skip site navigation (1)Skip section navigation (2)
Date:      Wed,  5 Mar 2014 23:17:18 +0100 (CET)
From:      Klaus Aehlig <aehlig@linta.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/187306: [PATCH] ports-mgmt/portsearch portsearch -u hangs on empty PLIST
Message-ID:  <20140305221718.6ECAC385552@howard.linta.de>
Resent-Message-ID: <201403052230.s25MU0Op078355@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140305221718.6ECAC385552>