Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 1999 16:46:07 -0700 (PDT)
From:      asami@freebsd.org (Satoshi - Ports Wraith - Asami)
To:        vanderh@ecf.utoronto.ca
Cc:        nik@nothing-going-on.demon.co.uk, ports@freebsd.org
Subject:   Re: Move "search" from /usr/ports/Makefile to bsd.port.mk
Message-ID:  <199907272346.QAA39470@silvia.hip.berkeley.edu>
In-Reply-To: <19990727172846.C37558@mad> (message from Tim Vanderhoek on Tue, 27 Jul 1999 17:28:46 -0400)
References:  <19990727163124.A33168@kilt.nothing-going-on.org> <19990727172846.C37558@mad>

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: Tim Vanderhoek <vanderh@ecf.utoronto.ca>

 * On Tue, Jul 27, 1999 at 04:31:24PM +0100, Nik Clayton wrote:
 * > 
 * > 	Agreed.  Along similar lines I'd *love* to see the search target of
 * > 	/usr/ports/Makefile moved into bsd.port.mk in such a way so that one
 * > 	could change to a subdirectory such as /usr/ports/print and run a
 * > 	`make search' for just that part of the tree.

Is this really necessary?  I don't really see how this could be
useful, especially with us planning to add deeper subtrees (and thus
making it harder to guess which category the port would be in).
Something that can be done against the whole tree with more options
seems better.

 * Cheating by grepping INDEX first for the category and then for the key
 * is easy enough.
 * 
 * Adding this to each subdirectory Makefile will work.  I suggest this
 * solution rather than a bsd.port.mk solution, although changed to
 * look more nicer and more sexier.

I'd rather put it in bsd.port.subdir.mk than all the subdir
Makefiles....

 * PORTSDIR?=      /usr/ports
 * 
 * search: ${PORTSDIR}/INDEX
 * 	@grep ${.CURDIR} ${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); }'

Well, this won't work if ${PORTSDIR} is a symlink.  You need to
"normalize" the ${.CURDIR} part to match what INDEX uses.

Maybe we can add another keyword ("category" or something) that can be
used for search.  (Or just add "-E" to the grep command line and have
people use extended regexps to specify the category alongside the
keyword. ;)

Satoshi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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