From ataraxia@cox.net  Fri Dec 13 17:14:35 2002
Return-Path: <ataraxia@cox.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 385E137B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Dec 2002 17:14:35 -0800 (PST)
Received: from lakemtao01.cox.net (lakemtao01.cox.net [68.1.17.244])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8437343E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Dec 2002 17:14:34 -0800 (PST)
	(envelope-from ataraxia@cox.net)
Received: from arkadia.nv.cox.net ([68.98.181.29]) by lakemtao01.cox.net
          (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
          id <20021214011432.ZFHA4411.lakemtao01.cox.net@arkadia.nv.cox.net>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Fri, 13 Dec 2002 20:14:32 -0500
Received: by arkadia.nv.cox.net (Postfix, from userid 1001)
	id 99A3C1144D; Fri, 13 Dec 2002 20:14:33 -0500 (EST)
Message-Id: <20021214011433.99A3C1144D@arkadia.nv.cox.net>
Date: Fri, 13 Dec 2002 20:14:33 -0500 (EST)
From: Ray Kohler <ataraxia@cox.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] bsd.port.subdir.mk missing some INDEX->${INDEXFILE} conversions
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46248
>Category:       ports
>Synopsis:       [patch] bsd.port.subdir.mk missing some INDEX->${INDEXFILE} conversions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 13 17:20:00 PST 2002
>Closed-Date:    Fri Jan 24 16:36:16 PST 2003
>Last-Modified:  Fri Jan 24 16:36:16 PST 2003
>Originator:     Ray Kohler
>Release:        FreeBSD 5.0-RC i386
>Organization:
>Environment:
System: FreeBSD arkadia.nv.cox.net 5.0-RC FreeBSD 5.0-RC #5: Thu Dec 12 19:23:27 EST 2002 root@arkadia.nv.cox.net:/usr/obj/usr/src/sys/ARKADIA i386

bsd.port.subdir.mk:
     $FreeBSD: ports/Mk/bsd.port.subdir.mk,v 1.46 2002/12/04 17:17:48 kris Exp $

	
>Description:

	The "search:" target of this file still uses hard-coded references to
	INDEX, which makes the target fail on current.
	
>How-To-Repeat:

	cd /usr/ports && make search key=foo
	
>Fix:

	Apply this patch:

--- bsd.port.subdir.mk~	Wed Dec  4 18:14:37 2002
+++ bsd.port.subdir.mk	Fri Dec 13 20:04:20 2002
@@ -262,15 +262,15 @@
 
 
 
-search: ${PORTSDIR}/INDEX
+search: ${PORTSDIR}/${INDEXFILE}
 	@here=`pwd`; \
 	cd ${PORTSDIR}; \
 	top=`pwd -P`; \
 	there=`echo "$$here/" | sed s%$$top%${PORTSDIR}%`; \
 	if [ -n "$$key" ]; then \
-	  grep $$there ${PORTSDIR}/INDEX | grep -i "${key}" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \
+	  grep $$there ${PORTSDIR}/${INDEXFILE} | grep -i "${key}" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \
 	elif [ $$name ]; then \
-	  grep $$there ${PORTSDIR}/INDEX | grep -i "^[^|]*${name}[^|]*|" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \
+	  grep $$there ${PORTSDIR}/${INDEXFILE} | grep -i "^[^|]*${name}[^|]*|" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \
 	else \
 	  echo "The search target requires a keyword parameter or name parameter,"; \
 	  echo "e.g.: \"make search key=somekeyword\""; \


	

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->portmgr 
Responsible-Changed-By: lioux 
Responsible-Changed-When: Fri Dec 13 17:32:11 PST 2002 
Responsible-Changed-Why:  
Over to maintainer(s) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46248 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Fri Jan 24 16:36:03 PST 2003 
State-Changed-Why:  
Thanks, I committed a copy of this patch a few weeks ago. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46248 
>Unformatted:
