how to determine the date a port is installed

Peter Pentchev roam at ringlet.net
Wed Jun 11 17:34:15 UTC 2008


On Wed, Jun 11, 2008 at 01:40:19PM +0100, Florent Thoumie wrote:
> On Wed, Jun 11, 2008 at 8:31 AM, Peter Pentchev <roam at ringlet.net> wrote:
> > On Tue, Jun 10, 2008 at 10:41:25PM -0700, Jeremy Chadwick wrote:
> >> On Wed, Jun 11, 2008 at 12:09:33AM -0500, Novembre wrote:
> >> > Two questions:
> >> > 1) Is it possible to determine the date a port/package is installed?
> >>
> >> ls -ld /var/db/pkg/<port>, use the mtime of the directory.
> >>
> >> > 2) How can I delete all the ports/packages installed after a certain date?
> >>
> >> Use a combination of find with the -mtime flag, and pkg_delete.
> >
> > Not really.  This is a bit dangerous.
> >
> > The dangerous part is "the mtime of the directory".  It would be much
> > better to use the mtime of the +CONTENTS file, since it never changes
> > *after* the package has been installed.
> 
> It actually does if you're using portupgrade (and probably
> portmaster), see the @pkgdep entries.
> 
> Use +DESC, +COMMENT or +MTREE_DIRS instead.

Yep.  Sorry.  Any of those would be a better candidate.
I'd simply forgotten about port management tools modifying
the dependencies in-place.

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net    roam at cnsys.bg    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
Thit sentence is not self-referential because "thit" is not a word.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080611/d6151a8d/attachment.pgp


More information about the freebsd-questions mailing list