Date: Wed, 11 Jun 2008 13:40:19 +0100 From: "Florent Thoumie" <flz@xbsd.org> To: "Peter Pentchev" <roam@ringlet.net> Cc: Jeremy Chadwick <koitsu@freebsd.org>, Novembre <novembre@gmail.com>, freebsd-ports@freebsd.org, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: how to determine the date a port is installed Message-ID: <a01628140806110540t69f35f34p821d6b482f360b62@mail.gmail.com> In-Reply-To: <20080611073108.GA1184@straylight.m.ringlet.net> References: <3b47caa90806102209w5161d96cjdd41d55f0315429c@mail.gmail.com> <20080611054125.GA15965@eos.sc1.parodius.com> <20080611073108.GA1184@straylight.m.ringlet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 11, 2008 at 8:31 AM, Peter Pentchev <roam@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. -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a01628140806110540t69f35f34p821d6b482f360b62>