Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Aug 2009 09:30:17 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Thomas Backman <serenity@exscape.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: portversion and pkg_version have different opinions on current versions
Message-ID:  <4A86E299.9050303@FreeBSD.org>
In-Reply-To: <B787D58E-9157-48E7-ADF3-E8D54F8AF22F@exscape.org>
References:  <B787D58E-9157-48E7-ADF3-E8D54F8AF22F@exscape.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Backman wrote:
> First off: not subscribed to this list, please make sure to Cc me or I
> won't see your answers! :)
> 
> Oh, and I use portsnap, in crontab:
> 0 19 * * *  portsnap -I cron update
> 
> So, long story short:
> 
> [root@chaos ~]# pkgdb -aF
> --->  Checking the package registry database
> [root@chaos ~]# portversion -l '<'
> dnsmasq                     <
> ezm3                        <
> libtool                     <
> python26                    <
> [root@chaos ~]# pkg_version | awk '$2 !~ /=/'
> [root@chaos ~]# portupgrade -a
> [root@chaos ~]#

Off hand I'd say this looks like your pkgdb might be corrupt or out of
sync, but I am far from an expert in portupgrade.

> ... How do I figure out which is correct,

pkg_version is authoritative since by default it checks the version of
what you have installed against what's in the port's Makefile. Nick
was right and you can just use the following:

pkg_version -L '='

> and which/what should I use in
> my crontab to check for out-of-date packages?

If you want to run it every night after portsnap runs I'd just add "&&
pkg_version -L '='" to the end of your crontab. If you want a little
nicer output there is a periodic script to check package status. You
could copy the lines about 400.status-pkg from
/etc/defaults/periodic.conf to /etc/periodic.conf, enable it there,
and then do: && /etc/periodic/weekly/400.status-pkg at the end of your
crontab line.

> I'm pretty new to FreeBSD

Welcome!

> (testing use since May, but I've used it briefly before), but have
> almost 10 years of Linux experience, mostly Gentoo, so I'm not new to
> *nix-like OS's, not to mention that Gentoo's portage is based on FreeBSD
> ports - except that it has an official interface (i.e. emerge), rather
> than portupgrade, portmaster, portmanager, etc. A bit of a mess in my
> outsider opinion. ;)

One person's mess is another person's freedom of choice. :)  Each of
those tools has its positives and negatives, and each of them has a
user base that is happy with the tool.

In any case, hope that answers your question and good luck!


Doug

-- 

    This .signature sanitized for your protection




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A86E299.9050303>