From owner-freebsd-questions@FreeBSD.ORG Wed Jun 11 13:04:54 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAB8D106568D for ; Wed, 11 Jun 2008 13:04:54 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id A58EF8FC13 for ; Wed, 11 Jun 2008 13:04:54 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so2307266wah.3 for ; Wed, 11 Jun 2008 06:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=iKeJYlQDRUndHP7nhjNALWhYCawF9JQWhpefEXpWCsg=; b=kAYFU+HFVJhzgVgvHQ6YVYw3rws7Sok/wygWpxVfWm1w4tzzfDKVCZKSBb/W57eUaX sm3C3zONfb0eVCGMFFpGxx/cjEFbZgBWD8rs6o3VT4LywOWonzl5JVERnwyOJljxOiHt s0pKvyDpIfMKur56qfvZMGKK5tjtKqBs20qvY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=MKqd8xdQKlmsmtWXe2/QSx17wVBKexQJpB3Q4ifL9hoIhX7gYMmemHhBSxWh4vT7WH /ngpyLCTo+xz3IkVS1yHKxnmC3Fbjf8ahiTg8lks9vVmxljAwJdXcgpI1aCogkg33Rin miE99zrlAh8vOc1T6k1dMLl7WzCkwUUo1CRKA= Received: by 10.114.120.1 with SMTP id s1mr6457818wac.31.1213188019355; Wed, 11 Jun 2008 05:40:19 -0700 (PDT) Received: by 10.114.60.15 with HTTP; Wed, 11 Jun 2008 05:40:19 -0700 (PDT) Message-ID: Date: Wed, 11 Jun 2008 13:40:19 +0100 From: "Florent Thoumie" Sender: florent.thoumie@gmail.com To: "Peter Pentchev" In-Reply-To: <20080611073108.GA1184@straylight.m.ringlet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3b47caa90806102209w5161d96cjdd41d55f0315429c@mail.gmail.com> <20080611054125.GA15965@eos.sc1.parodius.com> <20080611073108.GA1184@straylight.m.ringlet.net> X-Google-Sender-Auth: 67b3c318132ab3b8 Cc: Jeremy Chadwick , Novembre , freebsd-ports@freebsd.org, FreeBSD Questions Subject: Re: how to determine the date a port is installed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2008 13:04:54 -0000 On Wed, Jun 11, 2008 at 8:31 AM, Peter Pentchev 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/, 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