[Bug 285490] ports-mgmt/pkg: pkg upgrade unexpectedly installs uninstalled, non-dependency package

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 18 Mar 2025 12:44:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285490

Eric <erichanskrs@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |erichanskrs@gmail.com

--- Comment #1 from Eric <erichanskrs@gmail.com> ---
( in reply to comment #0 from Alan )

I can confirm this unexpected pkg-upgrade(8) for 14.2R, pkg v. 2.0.6:

[0-0] # date -u; uname -a; pkg -v
Tue Mar 18 12:39:31 UTC 2025
FreeBSD q210 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
2.0.6
[1-0] # pkg -vv | sed -n '/^Repositories:/,$ p'
Repositories:
  FreeBSD: {
    url             : "pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-kmods: {
    url             :
"pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_latest_2",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
[2-0] # pkg inf lsof
pkg: No package(s) matching lsof
[3->1<] # pkg upgrade lsof
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        lsof: 4.99.4_2,8 [FreeBSD]

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing lsof-4.99.4_2,8...
[1/1] Extracting lsof-4.99.4_2,8: 100%
=====
Message from lsof-4.99.4_2,8:

--
NOTE: Due to the way the FreeBSD build clusters make packages,
you may see a warning similar to the following:

lsof: WARNING: compiled for FreeBSD release 11.1-RELEASE-p6; this is
11.1-RELEASE-p4.

This is because the poudriere jails that build the packages don't have the
corresponding kernel installed, so they don't know that the kernel version is
different.

This warning can be ignored if you are using a system that is updated via
freebsd-update
and are using pre-built packages.
[4-0] #

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.