Date: Thu, 29 Jul 1999 20:56:04 +0100 From: Tom Hukins <tom@freebsd.org> To: Tim Vanderhoek <vanderh@ecf.utoronto.ca> Cc: Nik Clayton <nik@nothing-going-on.demon.co.uk>, ports@freebsd.org Subject: Re: Move "search" from /usr/ports/Makefile to bsd.port.mk Message-ID: <19990729205604.A486@hukins.freeserve.co.uk> In-Reply-To: <19990727172846.C37558@mad>; from Tim Vanderhoek on Tue, Jul 27, 1999 at 05:28:46PM -0400 References: <19990727163124.A33168@kilt.nothing-going-on.org> <19990727172846.C37558@mad>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 27, 1999 at 05:28:46PM -0400, Tim Vanderhoek wrote: > > This more or less equates to rewriting the search target. Currently > search works by doing a simple grep through the ports/INDEX file. > Probably easy enough to make it grep for both a key and a category. > > To make it work in an arbitrary subdir would be different. The > INDEX is mostly constructed from the output of make describe. The > describe target will work in an arbitrary subdir. It wouldn't be > hard to do This type of thing can be done very easily with my FreeBSD::Ports::* Perl modules: my $ports = tie my %port, 'FreeBSD::Ports::Index', '/usr/ports/INDEX'; $ports->category('audio'); print $_->as_ascii foreach keys %port; > And that will work and give the desired effect (tested), but it will > be slow. Yes, parsing the INDEX file is slow. Version 0.02 of my modules will hopefully use Perl's Storable, or something similar, to dump out a parsed version of an INDEX file. Unfortunately, I've not had any time to work on these modules in ages, but I'm hoping to get more work done some time in August. Regards, Tom 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?19990729205604.A486>