From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Mar 5 22:30:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB496494 for ; Wed, 5 Mar 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 991647BF for ; Wed, 5 Mar 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s25MU0jX078356 for ; Wed, 5 Mar 2014 22:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s25MU0Op078355; Wed, 5 Mar 2014 22:30:00 GMT (envelope-from gnats) Resent-Date: Wed, 5 Mar 2014 22:30:00 GMT Resent-Message-Id: <201403052230.s25MU0Op078355@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Klaus Aehlig Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A876D428 for ; Wed, 5 Mar 2014 22:24:18 +0000 (UTC) Received: from linta.de (isilmar-3.linta.de [188.40.101.200]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED02D795 for ; Wed, 5 Mar 2014 22:24:17 +0000 (UTC) Received: (qmail 21087 invoked by uid 10); 5 Mar 2014 22:17:33 -0000 Received: from howard.linta.de by isilmar.linta.de with BSMTP; 5 Mar 2014 22:17:33 -0000 Received: by howard.linta.de (Postfix, from userid 1001) id 6ECAC385552; Wed, 5 Mar 2014 23:17:18 +0100 (CET) Message-Id: <20140305221718.6ECAC385552@howard.linta.de> Date: Wed, 5 Mar 2014 23:17:18 +0100 (CET) From: Klaus Aehlig To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/187306: [PATCH] ports-mgmt/portsearch portsearch -u hangs on empty PLIST X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Klaus Aehlig List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 22:30:00 -0000 >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: