From owner-freebsd-ports Thu Mar 1 12:14:40 2001 Delivered-To: freebsd-ports@freebsd.org Received: from blizzard.sabbo.net (pop3.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id 138A437B71A; Thu, 1 Mar 2001 12:14:24 -0800 (PST) (envelope-from max@vic.sabbo.net) Received: from vic.sabbo.net (root@vic.sabbo.net [193.193.218.112]) by blizzard.sabbo.net (8.10.1/8.10.1) with ESMTP id f21KEHk12991; Thu, 1 Mar 2001 22:14:19 +0200 Received: (from max@localhost) by vic.sabbo.net (8.11.2/8.11.2) id f21KESc59992; Thu, 1 Mar 2001 22:14:28 +0200 (EET) (envelope-from sobomax@FreeBSD.org) From: Maxim Sobolev Message-Id: <200103012014.f21KESc59992@vic.sabbo.net> Subject: Re: [patch] which package functionality for pkg_info To: rooneg@electricjellyfish.net (Garrett Rooney) Date: Thu, 1 Mar 2001 22:13:57 +0200 (EET) Cc: sobomax@FreeBSD.ORG (Maxim Sobolev), ports@FreeBSD.ORG, jhk@FreeBSD.ORG, gad@FreeBSD.ORG, reg@FreeBSD.ORG In-Reply-To: <20010301145950.B90945@electricjellyfish.net> from "Garrett Rooney" at Mar 01, 2001 02:59:51 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > On Thu, Mar 01, 2001 at 09:53:53PM +0200, Maxim Sobolev wrote: > > > On Thu, Mar 01, 2001 at 07:55:24PM +0200, Maxim Sobolev wrote: > > > > Attached please find revised patch that uses matchinstalled() instead of fts > > > > loop. IMO the code looks much cleaner. I fixed several other issues as well > > > > (leak of opened file, useless snprintf(&a, strlen(b), b) useless include etc.). > > > > > > [snip] > > > > > > done! > > > > > > one more thing. i notice that matchinstalled() returns a null terminated > > > array of strings, but they don't seem to be being freed anywhere. should > > > they? > > > > No, matchinstalled() does it automagically if invoked several times. ;) > > > > > +.Op Fl W Ar filename > > > > Probably should be ".Op Fl W Ar filename ..." (-W accepts multiple arguments). > > well, it's not so much that -W accepts multiple arguments, it's that -W can be > specified a number of times. > > i don't (offhand) know what it'll do for "pkg_info -W foo bar", since i'm not > on the machine with the code on it, i can't check at the moment. i think i'll > treat the second argument as a package, not as a filename. what it can do is > "pkg_info -W foo -W bar", which is why i left it as ".Op Fl W Ar filename". Ah, you are correct. > > Looks almost finished, I'll look if I can commit it tomorrow. > > cool! it'll be nice to have this functionality. any chance of getting it > (and your regex stuff) MFCed before 4.3? Chances are pretty high, after usual chill-off period (1-2 weeks). > i'd like to actually be able to sue > it, Please don't sue it! :-P > and i don't currently run -CURRENT ;-) Smart choice. 8-) -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message