Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2006 18:56:22 -0000
From:      Shaun Amott <shaun@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105917: bsd.port.subdir.mk: Fix 'make search' with non-default ${PORTSDIR}
Message-ID:  <1164653782.2683@charon.picobyte.net>
Resent-Message-ID: <200611272030.kARKUHr2073536@freefall.freebsd.org>

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

>Number:         105917
>Category:       ports
>Synopsis:       bsd.port.subdir.mk: Fix 'make search' with non-default ${PORTSDIR}
>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:   Mon Nov 27 20:30:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Shaun Amott
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:

>Description:

'make search' returns no results when used with a non-default
${PORTSDIR} location -- unless INDEX was generated with the same value
of ${PORTSDIR}.

>How-To-Repeat:

# cd /usr/ports
# make fetchindex
# mv /usr/ports /usr/temp
# cd /usr/temp
# make search PORTSDIR=/usr/temp

[observe no results]

>Fix:

This fix replaces the hard-coded /usr/ports with ${PORTSDIR} while
searching.

--- make-search.diff begins here ---
Index: bsd.port.subdir.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.subdir.mk,v
retrieving revision 1.65
diff -u -r1.65 bsd.port.subdir.mk
--- bsd.port.subdir.mk	4 Aug 2006 12:34:41 -0000	1.65
+++ bsd.port.subdir.mk	27 Nov 2006 18:48:12 -0000
@@ -420,6 +420,8 @@
 	    } \
 	  } \
 	  { \
+	    if (match($$2, "^/usr/ports/[^/]*/[^/]*$$") > 0) \
+	      sub("^/usr/ports", "${PORTSDIR}", $$2); \
 	    if (substr($$2, 1, therelen) != there) \
 	      next; \
 	    for (i in parms) \
--- make-search.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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