From owner-freebsd-bugs Sun Jan 28 14:20:18 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F094937B400 for ; Sun, 28 Jan 2001 14:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0SMK1X43725; Sun, 28 Jan 2001 14:20:01 -0800 (PST) (envelope-from gnats) Date: Sun, 28 Jan 2001 14:20:01 -0800 (PST) Message-Id: <200101282220.f0SMK1X43725@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/24695: [patch] pkg_info: prefix search for a package Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/24695; it has been noted by GNATS. From: Peter Pentchev To: Edwin Groothuis Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/24695: [patch] pkg_info: prefix search for a package Date: Mon, 29 Jan 2001 00:18:09 +0200 On Sun, Jan 28, 2001 at 10:56:19PM +0100, Edwin Groothuis wrote: > On Sun, Jan 28, 2001 at 07:44:49PM +0200, Peter Pentchev wrote: > > Shouldn't the FuzzySearch opendir/readdir logic be outside of the pkg_do() > > routine, and call pkg_do() once for every file it finds? Currently you > > stop at the very first file you find, which might not be so good if > > Yes, besides that pkg_do actually consists of two functions in one: > find the right files and display the information on them. I've > pulled them apart and I've added your suggestion. > > > multiple versions of a package are installed, or if the user deliberately > > tries to query several packages with a common prefix (e.g. mysql-client/ > > mysql-server). > > That's something I hadn't thought about yet :-) > > Here is a new patch, which implements your suggestion. It euh... > has two things now in it: > > pkg_info -F stringsomehwereinthepackagename > pkg_info -P stringprefixofthepackagename > > So people looking for the twenty versions of mysql are happy with > the -P and people which are looking for all packages related to > mysql are happy with the -F. This one works great! Hmm.. now to find somebody to look over the patch and possibly even commit it.. :) G'luck, Peter -- I've heard that this sentence is a rumor. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message