Ports - installation & upgrade history

Wayne Sierke ws at au.dyndns.ws
Wed Dec 1 06:18:28 UTC 2010


On Tue, 2010-11-30 at 11:39 -0800, Doug Barton wrote:
> On 11/30/2010 10:24, David Southwell wrote:
> >
> > Hi
> >
> > I was idly wondering how easy/difficult it might be to maintain and access an
> > historical record of port installations and upgrades on a particular system.
> 
> ports-mgmt/portmaster has the capability to log this information for 
> you. Look in the man page in the ENVIRONMENT section for more information.

ports-mgmt/portupgrade also has a logging capability. See this post for
details on configuring pkgtools.conf for date-stamped logfiles:

http://lists.freebsd.org/pipermail/freebsd-ports/2004-December/019221.html

I've been using this to retain the date-stamped portupgrade history for
each port:

        require "date"
          PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] || \
            '-v -D --results-file /var/tmp/portupgrade.results ' + \
            '--log-file /var/tmp/portupgrade-%s::%s-' + \
            DateTime.now.strftime("%Y%m%d%H%M%S") + '.log'
        

Of course, this technique is only effective when the corresponding tool
is used, but not for "cd portdir && make [de|re]install"
installs/updates.

I'm currently working on a script to record config file changes to a
subversion repo and had already thought that it should be useful for
recording changes in /var/db/ports and /var/db/pkg which ought to track
something useful about port upgrades and port options changes. I suppose
it wouldn't be too hard to keep a "shadow" copy of these dirs and cron a
daily script to record diffs, etc., too.


Wayne




More information about the freebsd-ports mailing list