portversion and pkg_version have different opinions on current versions

Miroslav Lachman 000.fbsd at quip.cz
Sat Aug 15 18:32:06 UTC 2009


Thomas Backman wrote:
[...]
> [root at chaos ~]# pkgdb -aF
> --->  Checking the package registry database
> [root at chaos ~]# portversion -l '<'
> dnsmasq                     <
> ezm3                        <
> libtool                     <
> python26                    <
> [root at chaos ~]# pkg_version | awk '$2 !~ /=/'
> [root at chaos ~]# portupgrade -a
> [root at chaos ~]#
[...]

As was mentioned, you can use pkg_version -L =, or you can compare it 
with INDEX.db instead of ports tree: pkg_version -IL =. This is 
significantly faster.

pkg_version -L =
Usr: 7.286s  Krnl: 3.984s  Totl: 0:31.77s

pkg_version -IL =
Usr: 0.195s  Krnl: 0.015s  Totl: 0:00.21s

And if you want to know the version of newer (available) port, you can 
use pkg_version -vIL =
It gives you something like this:

png-1.2.35                   <   needs updating (index has 1.2.38)
postfix-2.5.6,1              <   needs updating (index has 2.6.3,1)
vim-lite-7.2.209             <   needs updating (index has 7.2.239)

Miroslav Lachman


More information about the freebsd-ports mailing list