maintainer-feedback requested: [Bug 297219] ports-mgmt/pkg: 'pkg upgrade' lists all locked packages every time despite no updates being available for them

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 01 Aug 2026 09:21:07 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody)
<pkg@FreeBSD.org> for maintainer-feedback:
Bug 297219: ports-mgmt/pkg: 'pkg upgrade' lists all locked packages every time
despite no updates being available for them
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297219



--- Description ---
Hello,

Since a recent update, maybe the quarterly update to 2026Q3, 'pkg upgrade'
displays a new behaviour: while checking for available updates, it now lists
all locked packages on the system. For example, on the machine I'm writing
from, the output says:

--
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (5 candidates):  40%

jackit-1.9.22_3 is locked and may not be modified
Checking for upgrades (5 candidates):  60%

mpv-0.41.0_1,1 is locked and may not be modified
Checking for upgrades (5 candidates): 100%

zynaddsubfx-3.0.6_3,2 is locked and may not be modified
Processing candidates (5 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
--

These three packages are locked because I use non-default build options for
them and therefore take care of them manually.

At first, I thought pkg was now able to tell me which of my locked packages had
an update available and required a rebuild, which would be a convenient
feature. So I checked if newer versions were available in ports, but it turned
out all three of them were already current. To be sure, I tried rebuilding one
of them from an up-to-date ports tree, but this made no difference and 'pkg
upgrade' kept listing it.

So while pkg listing locked packages of which a newer version is available (as
opposed to just a build with different options) would be useful, the current
behaviour is more of an annoyance than anything. It clutters the otherwise
clean output of 'pkg upgrade' and lets people think updates are available
although there aren't, while providing no useful additional information. If I
don't remember which packages are locked on my system, I can run 'pkg lock -l',
I don't need nor want to get a list of them each time I routinely upgrade
system packages.