pkg upgrade # What is "(1 candidates)"? [reproducible]

Code:
root@freebsd-dns:~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.

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

root@freebsd-dns:~ # pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01  
Fetching packagesite.txz: 100%    6 MiB 235.1kB/s    00:26  
Processing entries: 100%
FreeBSD repository update completed. 28965 packages processed.
All repositories are up to date.

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

root@freebsd-dns:~ # pkg audit
0 problem(s) in 0 installed package(s) found.

root@freebsd-dns:~ # pkg autoremove
Checking integrity... done (0 conflicting)
Nothing to do.

root@freebsd-dns:~ # freebsd-version
13.0-RELEASE

What on earth is "1 candidates" referring to?
 
What does pkg version -vRL= tell you? Also check if that candidate isn't a Python 3.7 module or application, that could be potentially upgraded but also left as Python 3.7, since both "flavors" are supported. The default Python version changed recently from 3.7 to 3.8.
 
Code:
root@freebsd-dns:~ # pkg version -vRL=
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.

root@freebsd-dns:~ # pkg info -a | grep py | wc -l
       0

I didn't install python and don't think it's in the OS (I imagine it's additional).
 
I didn't install python and don't think it's in the OS (I imagine it's additional).
It's not part of the base OS, that's correct. It could have been pulled in as a dependency though. At least the pkg version -vRL= didn't show anything. That means everything is up to date and you also don't have any 'orphans'.

You might want to run pkg autoremove, perhaps it's an old dependency that's still lingering.
 
Python has nothing to do with it, not (& never) installed. autoremove was in the original post.

Code:
root@freebsd-dns:~ # pkg lock -l
Currently locked packages:
root@freebsd-dns:~ #

A bug affects pkg, I'm happy to assist in its diagnosis (as I have it exhibiting the odd behavior).
 
Code:
root@freebsd-dns:~ # freebsd-version
13.0-RELEASE
root@freebsd-dns:~ # uname -av
FreeBSD freebsd-dns 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 06:06:55 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  arm64
root@freebsd-dns:~ # pkg -v
1.16.3
 
Code:
root@freebsd-dns:~ # pkg update
Updating FreeBSD repository catalogue...
Fetching packagesite.txz: 100%    6 MiB 321.6kB/s    00:19    
Processing entries: 100%
FreeBSD repository update completed. 28975 packages processed.
All repositories are up to date.
root@freebsd-dns:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@freebsd-dns:~ # date
Wed May  5 21:24:15 NZST 2021
 
What does pkg version -vRx py37 show? Actually, just post the whole thing; pkg version -vR
 
What does pkg version -vRx py37 show?
Again, python isn't installed. The fixation with python is puzzling.

Actually, just post the whole thing; pkg version -vR
Here's both:
Code:
root@freebsd-dns:~ # pkg version -vRx py37
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@freebsd-dns:~ # pkg version -vR
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
ca_root_nss-3.63                   =   up-to-date with remote
expat-2.2.10                       =   up-to-date with remote
libevent-2.1.12                    =   up-to-date with remote
libnghttp2-1.43.0                  =   up-to-date with remote
pkg-1.16.3                         =   up-to-date with remote
unbound-1.13.1                     =   up-to-date with remote
root@freebsd-dns:~ #
 
The fixation with python is puzzling.
It's been updated recently and typically a lot of users fall into that trap of not updating properly, which can lead to all sorts of problems.
 
Code:
pkg/tests/frontend/issue1440.sh:Checking for upgrades (1 candidates):  done
pkg/tests/frontend/issue1440.sh:Processing candidates (1 candidates):  done
Smells like satisfying a build test that maybe somehow slipped into the code (edit: or package database )
 
/var/db/pkg/local.sqlite
Code:
sqlite> select name,version from packages;
pkg|1.16.3
expat|2.2.10
libevent|2.1.12
libnghttp2|1.43.0
unbound|1.13.1
ca_root_nss|3.63
Matches above (pkg version -vR).

Happy to keep looking, just need pointers.
 
It's a little drastic perhaps but try removing everything pkg delete -a (only pkg(8) itself should remain), then see if you still have that 1 candidate. If that clears it add each package again, checking in the meantime for that candidate. You don't have a lot of packages installed so this should be fairly easy to do.

Perhaps there's still something hiding in your local package database. Hopefully removing everything would clear that. You can also do pkg delete -af, that will also delete everything but removes pkg(8) itself too. Then remove or move local.sqlite out of the way and let pkg bootstrap create a fresh new one.
 
fjdlr are you able to try the things SirDice just mentioned? I'll need to wait until the weekend to attempt it, more than 24 hours away.
Hi to day and after two pkg update & pkg upgrade the problem is solved
I think that pkg py37 is maybe in question
Thanks
 
Code:
root@freebsd-dns:~ # pkg delete -a
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 6 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        ca_root_nss: 3.63
        expat: 2.2.10
        libevent: 2.1.12
        libnghttp2: 1.43.0
        pkg: 1.16.3
        unbound: 1.13.1

Number of packages to be removed: 6

The operation will free 46 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/6] Deinstalling unbound-1.13.1...
[1/6] Deleting files for unbound-1.13.1: 100%
[2/6] Deinstalling ca_root_nss-3.63...
[2/6] Deleting files for ca_root_nss-3.63: 100%
[3/6] Deinstalling expat-2.2.10...
[3/6] Deleting files for expat-2.2.10: 100%
[4/6] Deinstalling libevent-2.1.12...
[4/6] Deleting files for libevent-2.1.12: 100%
[5/6] Deinstalling libnghttp2-1.43.0...
[5/6] Deleting files for libnghttp2-1.43.0: 100%
You may need to manually remove /usr/local/etc/unbound/unbound.conf if it is no longer needed.     
root@freebsd-dns:~ # mv /var/db/pkg/local.sqlite /root/
root@freebsd-dns:~ # pkg bootstrap
pkg already bootstrapped at /usr/local/sbin/pkg
root@freebsd-dns:~ # pkg delete --all --force
pkg: No packages installed.  Nothing to do!
root@freebsd-dns:~ # pkg bootstrap
pkg already bootstrapped at /usr/local/sbin/pkg
root@freebsd-dns:~ # rm /usr/local/sbin/pkg
root@freebsd-dns:~ # pkg bootstrap
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:aarch64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.16.3...
Extracting pkg-1.16.3: 100%
root@freebsd-dns:~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@freebsd-dns:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@freebsd-dns:~ # pkg info -a
pkg-1.16.3                     Package manager

No luck and only pkg... a bug like this, while seemingly benign, shouldn't exist.
 
I've verified it's easily reproducible.

Installed a VM, amd64 bootonly -> next next next finish. Same behaviour, (1 candidates).

Screenshot_f13_2021-05-07_19:46:44.png


edit: pkg info -a that I forgot before:

Screenshot_f13_2021-05-07_20:04:14.png
 
pkg (same version) does the same on FreeBSD 12.2, just tried that in a fresh VM.

Maybe we've just not noticed it before... I'd still like to know what (1 canditates) means? SirDice was recommending pkg delete -a which makes me think it's not common knowledge.
 
It's certainly not common knowledge, maybe it has something to do with the pkg-repo(8) data on the official servers. If I look at my own servers, using my own repositories I get 0 candidates.
Code:
root@molly:~ # pkg upgrade
Updating dicelan-server repository catalogue...
dicelan-server repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
On a quick test setup I also get that 1 candidate, only pkg(8) itself is installed here:
Code:
root@fbsd-test:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

I think I need to have a look at the code to understand where that candidate number is coming from.
 
Back
Top