Date: Sun, 25 Feb 2001 19:26:32 -0500 From: Garrett Rooney <rooneg@electricjellyfish.net> To: Maxim Sobolev <sobomax@freebsd.org> Cc: ports@freebsd.org, jhk@freebsd.org, gad@freebsd.org, reg@freebsd.org Subject: Re: [patch] which package functionality for pkg_info Message-ID: <20010225192632.C37487@electricjellyfish.net> In-Reply-To: <200102252125.f1PLPH132145@vic.sabbo.net>; from sobomax@freebsd.org on Sun, Feb 25, 2001 at 11:25:17PM %2B0200 References: <20010225161633.C94657@electricjellyfish.net> <200102252125.f1PLPH132145@vic.sabbo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
in a desparate effort to avoid doing homework, here is a somewhat revised patch, incorporating some of Maxim's suggestions. in addition to a few minor cleanups (like using sprintf instead of strlcpy and strlcat), this changes the behaviour to be a bit closer to that found in Jeremy's patch. instead of returning once a match is found, the entire database is now searched, and an error is printed if more than one package claims to have installed the file. the description in the man page has also been expanded, to cover the fact that if the file isn't an absolute path, and cannot be found in the current directory, which(1) is used to search the PATH for it. i looked at using matchinstalled() as Maxim suggested, but it seems that the only way to make that possible would be to alter matchinstalled() to take a pointer to a comparison function as one of its arguments, and i don't think this will be all that easy. if people feel this is worthwhile, i'll take a look at it, but i'm not sure if it's worth it. as always, any suggestions would be much appreciated. -- garrett rooney Unix was not designed to stop you from rooneg@electricjellyfish.net doing stupid things, because that would http://electricjellyfish.net/ stop you from doing clever things. 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?20010225192632.C37487>