"pkg upgrade" doesn't see that a package is eligible for "pkg upgrade -v"

What causes this?

Code:
# pkg audit -q
popt-1.19_2,1
python312-3.12.14_1
electron : 07:45:07 /root# pkg update
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
electron : 07:45:12 /root# pkg search popt
Ipopt-3.14.20                  Software package for large-scale nonlinear optimization
coin-or-osiipopt-0.1.8_8       Conic solver interface for Ipopt
popt-1.19_2,1                  Getopt(3) like library with a number of enhancements, from Redhat
poptop-1.4.0_2                 Windows 9x compatible PPTP (VPN) server
py312-cyipopt-1.7.0            Cython interface for the interior point optimizer IPOPT
py312-spopt-0.7.0_2            Spatial Optimization in PySAL
scipoptsuite-10.0.0_1          SCIP Optimization Suite
popt-1.19.20260818,1           Getopt(3) like library with a number of enhancements, from Redhat
electron : 07:45:19 /root# pkg upgrade -v
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
vulnxml file up-to-date
Checking integrity... done (0 conflicting)
Your packages are up to date.

Why wasn't popt(3) upgraded?
 
Probably due to the version shenanigans, 1.19.20260818 to 1.19_2,1 and back to 1.19.20260818,1. I'm fairly certain pkg(8) considers it to be a downgrade, not an upgrade.

What does pkg version -vRx popt show?
 
Full disclosure, the newer version is in a custom repo. But I'm still wondering why that repo is seen by pkg search but ignored by pkg upgrade -v.

Code:
# pkg repos
FreeBSD-ports: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-ports-kmods: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-base: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_latest",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
MYREPO: { 
    url             : "https://pkg.example.edu/FreeBSD:15:amd64/",
    enabled         : yes,
    priority        : 0,
    signature_type  : "NONE"
  }

# pkg version -vRx popt
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
popt-1.19_2,1                      =   up-to-date with remote

# pkg version -vRx popt -r MYREPO
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
MYREPO is up to date.
popt-1.19_2,1                      <   needs updating (remote has 1.19.20260818,1)[/code}
 
Might want to try using pkg-version(8) to verify how PKG is seeing all this => pkg version -l\<; this will tell you what packages it denotes as upgradable. Or more direct: pkg version -vn popt. Maybe also utilize -r to pinpoint your queries to a specific repository, just to avoid possible overlap.
 
Priority increased to 1.

Code:
# pkg repos
FreeBSD-ports: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-ports-kmods: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/kmods_latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
FreeBSD-base: { 
    url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_latest",
    enabled         : no,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
MYREPO: { 
    url             : "https://pkg.example.edu/FreeBSD:15:amd64/",
    enabled         : yes,
    priority        : 1,
    signature_type  : "NONE"
  }

# pkg version -l\<
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
popt-1.19_2,1                      <

# pkg upgrade -v
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
vulnxml file up-to-date
Checking integrity... done (0 conflicting)
Your packages are up to date.

# pkg upgrade 
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.
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
All repositories are up to date.
Checking for upgrades (3 candidates): 100%
Processing candidates (3 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

# pkg upgrade -vnr MYREPO
Updating MYREPO repository catalogue...
MYREPO repository is up to date.
MYREPO is up to date.
vulnxml file up-to-date
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        popt: 1.19_2,1 -> 1.19.20260818,1 [MYREPO]

Number of packages to be upgraded: 1

43 KiB to be downloaded.
 
Try setting a higher priority on MYREPO.
That is like setting local user directories earlier in PATH (effectively at least).
It looks like something that should be standard:
If you are keeping a private repo it should have higher priority than official repos so your local modifications take precedence.
 
If you are keeping a private repo it should have higher priority than official repos so your local modifications take precedence.
Best way is to not mix with official repos at all. Things can go sideways when you have a custom repo (with custom options and defaults) that conflict with the 'standard' options and defaults from the FreeBSD repositories.
 
Best way is to not mix with official repos at all. Things can go sideways when you have a custom repo (with custom options and defaults) that conflict with the 'standard' options and defaults from the FreeBSD repositories.
Thank you. I stopped building from source/repos a long time ago because for me, the hassle outweighed the benefits (I acknowledge this may not be true for everyone) so haven't give thought to repos in a long time.
 
Back
Top