portversion and pkg_version have different opinions on current
versions
Thomas Backman
serenity at exscape.org
Sat Aug 15 18:50:13 UTC 2009
On Aug 15, 2009, at 20:31, Miroslav Lachman wrote:
> 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
Thanks, guys!
However, a new issue appeared... Kind of. I know I read something
about portsnap and INDEX on the -current list recently, so I'm
guessing this is related? Maybe not, though (see later in the mail).
[root at chaos /usr/ports/ports-mgmt]# portsnap -I fetch update >/dev/null
[root at chaos /usr/ports/ports-mgmt]# pkg_version -vL=
[root at chaos /usr/ports/ports-mgmt]# pkg_version -vIL=
curl-7.19.5_1 < needs updating (index has
7.19.6)
dnsmasq-2.49_1 < needs updating (index has
2.49_2)
ezm3-1.1_2 < needs updating (index has 1.2_1)
libtool-1.5.26 ! Comparison failed
postfix-2.6.2_1,1 < needs updating (index has
2.6.3,1)
python26-2.6.2_1 < needs updating (index has
2.6.2_2)
vnstat-1.7_2 < needs updating (index has 1.8)
vsftpd-ssl-2.1.2 < needs updating (index has 2.2.0)
[root at chaos /usr/ports/ports-mgmt]# portupgrade -a
[root at chaos /usr/ports/ports-mgmt]# ls -l /usr/ports/INDEX-*
-rw-r--r-- 1 root wheel 17370624 Jul 31 19:45 /usr/ports/INDEX-5
-rw-r--r-- 1 root wheel 19813792 Aug 15 20:42 /usr/ports/INDEX-6
-rw-r--r-- 1 root wheel 19808537 Aug 15 20:42 /usr/ports/INDEX-7
-rw-r--r-- 1 root wheel 34316288 May 8 10:35 /usr/ports/INDEX-7.db
-rw-r--r-- 1 root wheel 19816190 Aug 15 20:42 /usr/ports/INDEX-8
-rw-r--r-- 1 root wheel 1291821 May 30 12:06 /usr/ports/INDEX-8.bz2
-rw-r--r-- 1 root wheel 34869248 Aug 14 19:30 /usr/ports/INDEX-8.db
[root at chaos /usr/ports/ports-mgmt]# date
Sat Aug 15 20:43:07 CEST 2009
[root at chaos /usr/ports/ports-mgmt]#
So... Using the index causes problems (or the opposite!). Could I be
using an index for something like HEAD despite not using that ports
tree? (Again, pretty new to this!)
I don't know how the INDEX files work, but I do know (thank you
DTrace) that INDEX-8 was the only one read during "pkg_version -vIL=".
Oh, and my understanding is that the INDEX-8 is fetched via portsnap?
Running the "fetch update" took less than 20 seconds (the cron job ran
about 2 hours ago, though), so I guess it cannot have been built (that
does take a lot of time, yes?)?
Regards,
Thomas
More information about the freebsd-ports
mailing list