portversion and pkg_version have different opinions on current
versions
Thomas Backman
serenity at exscape.org
Sun Aug 16 08:41:35 UTC 2009
On Aug 15, 2009, at 22:58, Miroslav Lachman wrote:
> Doug Barton wrote:
>
>> Thomas Backman wrote:
>>> 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)
>> Can you check the files in your ports tree to see if they have the
>> older versions or the newer? You can either read the Makefiles or
>> do this:
>> cd /usr/ports/ftp/curl
>> make -V PKGNAME
>> I suspect that somehow the INDEX file and your ports tree are out of
>> date, although my understanding was that this should not happen with
>> portsnap.
>
> Files in ports tree and INDEX are out of sync, because of the -I in
> portsnap command. The -I updates INDEX only!
>
> man portsnap:
> -I For the update command, update INDEX files, but not the rest
> of the ports tree.
>
> That's why portupgrade -a cannot upgrade anything, because ports
> tree doesn't have updated files.
>
> Solution:
>
> portsnap fetch update
>
> (This will update both INDEX + files)
>
> Miroslav Lachman
>
>
> PS: do not redirect output of the portsnap command to /dev/null and
> you will see, what portsnap is doing :)
D'oh! Thank you, this solved the problem. It appears I glanced over
one sentence in the handbook re: portsnap -I and having to run
'update' manually at times. For the time being I use "portsnap cron
update && pkg_version -vL=" in crontab, despite the warning about not
using -I while a build might be in progress. I set it run at a time
where it's extremely unlikely that it's building anything (early in
the morning, and I don't have enough ports for the box to keep
compiling all night if I start a rebuild late).
(The -vIL= still doesn't *quite* work, one package, ezm3, is shown as
needing updating but all other commands say it isn't so.)
I only redirected to /dev/null because it felt unnecessary to show the
output here, and I had ran the command recently enough to not really
care about the output - I just wanted to show what I've done to make
the issue appear.
Thanks to everyone for the overwhelming response, I've learned a few
new things here! :)
Regards,
Thomas
More information about the freebsd-ports
mailing list