pkg version/upgrade inconsistency

Hi,

I have few long running FreeBSD installations, upgraded/updated continuously from 6.x version up to fresh12.x - via compilation from sources, both system and ports. Upgrade process is a little involving and time consuming, but I got used to it and no complaints.

I also have two new installations, and I decided to try living with binary upgrades, for both system and ports. System updates - no problems. But I have strange behaviour with pkg upgrade.

First, I'm checking what upgrades are pending, using pkg version:

Code:
~ # pkg version -v -I -q -L =
bind-tools-9.16.0                  <   needs updating (index has 9.16.1)
e2fsprogs-libuuid-1.45.5           <   needs updating (index has 1.45.6)
perl5-5.30.1                       <   needs updating (index has 5.30.2)
python37-3.7.6                     <   needs updating (index has 3.7.7)
... (more follows)

Bur upgrade process yields nothing:

Code:
~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (88 candidates): 100%
Processing candidates (88 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

Both commands are the same tool (pkg), and I suppose they both use the same pkg database (updated also with pkg update) and the same config files, so they should see the same updates available.

So, the question is: what's the cause of this inconsistency and what to do about it?
 
Both commands are the same tool (pkg), and I suppose they both use the same pkg database (updated also with pkg update) and the same config files, so they should see the same updates available.
No, you've given the -I option to pkg-version(8) so it's comparing against your local /usr/ports/INDEX, not against the remote repository. Your ports tree is likely latest and your package repository is quarterly. Use pkg version -R.

Code:
     -I [index, --index [index]]
                 Use index file for determining if a package is out of date.
                 If no index file name is specified, uses the default index
                 file.  This is the default, if the index file exists.
Code:
     -R, --remote
                 Use repository catalogue for determining if a package is out
                 of date.  This is the default if neither the ports index nor
                 the ports tree exists.
 
Oh, my fault. I experimented a bit to get most useful output from pkg version and somehow -I option sneaked in for good.
Thanks!
 
Back
Top