Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2001 12:57:08 +0200 (EET)
From:      Maxim Sobolev <sobomax@freebsd.org>
To:        rooneg@electricjellyfish.net (Garrett Rooney)
Cc:        ports@freebsd.org, jhk@freebsd.org, sobomax@freebsd.org, gad@freebsd.org, reg@freebsd.org
Subject:   Re: [patch] which package functionality for pkg_info
Message-ID:  <200102251057.f1PAvor63002@vic.sabbo.net>
In-Reply-To: <20010225001624.A41801@electricjellyfish.net> from "Garrett Rooney" at Feb 25, 2001 12:16:24 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> --envbJBWh7q8WU6mo
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> a few days ago, i got frustrated with how much of a pain it was to determine
> what package a given file on my system came from.  rather than simply using
> the old 'grep /var/db/pkg/*/+CONTENTS' method, i wrote a script to do some
> better searching, and then after a little inspection of the pkg_info code, i
> came up with a patch adding this functionality to pkg_info.
> 
> the patch (attatched, and available a
> http://electricjellyfish.net/garrett/code/pkg_info.patch) adds a -w flag,
> which takes as its argument a path (either absolute or relative) to a file on
> the system.  before anyone asks, -w was chosen because it isn't in use yet,
> and because the command tells you 'which package' the file came from.
> 
> i would very much like this to be added to the base system in some manner, as
> i have often had people ask me how to get this information, but i've never
> actually had someone point out a good (one line) way to do it well.
> 
> some ideas for future extension that i and others have come up with include
> better integration with the rest of the options of pkg_info (have the package
> that is found become the target of any other flags on the command line
> perhaps), making the code smarter about symbolic links (perhaps trying both 
> the target file and the link), and an option to md5 checksum the file so as to 
> determine if it has changed since it has been installed.
> 
> while all of these are interesting extensions, the patch as it stands seems
> useful to me, and i felt it could be useful to others as it is.
> 
> i would welcome any comments, both on the code itself, and on how a feature
> like this should operate.

I believe that some time ago Jeremy Leas <reg@FreeBSD.org> did something
similar, but for some reasons his patch had not been merged into base
system yet (see http://people.freebsd.org/~reg/). Therefore I would like
to see your patches merged with his before they will be committed.

-Maxim

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?200102251057.f1PAvor63002>