Re: pkg-static: Warning: Major OS version upgrade detected.

From: Dan Mahoney (Ports) <freebsd_at_gushi.org>
Date: Thu, 11 Sep 2025 03:40:43 UTC

> On Sep 10, 2025, at 11:49 AM, Lexi Winter <ivy@freebsd.org> wrote:
> 
> Dan Mahoney (Ports):
>> Okay, so, I've gone through and completely rebuilt all my packages
>> (except the few that had errors), I've disabled my stock repos,
>> pointed pkg at my temp ones with a file:///url, and even pkg delete -f
>> pkg and pkg bootstrap -f, unfortunately, pkg still seems to want to
>> complain that there's a major mismatch.  Is there a way to quell this
>> error?
> 
> two things to check:
> 
> - did you actually rebuild pkg itself, i.e. is ports-mgmt/pkg listed in
>  your poudriere ports list?

Yes.

https://poudriere-src.isc.org/packages/freebsd:16:x86:64-pkgbase-default_git/

> - do you have any FreeBSD.org repository enabled for a previous release?

I did, and then I disabled them.  Right now the only thing enabled is the one I built myself, which is pointing at my 16 directory via a symlink.

> it would be easier to diagnose the issue if you could show the entire
> output from 'pkg update'.

root@poudriere-src:/home/dmahoney # pkg update -f
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating MyRepo repository catalogue...
Fetching meta.conf: 100%    179 B   0.2kB/s    00:01
Fetching data.pkg: 100%  137 KiB 140.6kB/s    00:01
Processing entries: 100%
MyRepo repository update completed. 387 packages processed.
All repositories are up to date.
root@poudriere-src:/home/dmahoney # pkg bootstrap -f
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 file:///usr/local/poudriere/data/packages/FreeBSD:16:amd64/, please wait...
pkg-static: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Installing pkg-2.2.2...
package pkg is already installed, forced install
Extracting pkg-2.2.2: 100%
root@poudriere-src:/home/dmahoney # pkg update -f
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
Updating MyRepo repository catalogue...
Fetching meta.conf: 100%    179 B   0.2kB/s    00:01
Fetching data.pkg: 100%  137 KiB 140.6kB/s    00:01
Processing entries: 100%
MyRepo repository update completed. 387 packages processed.
All repositories are up to date.
root@poudriere-src:/home/dmahoney #

cat /usr/local/etc/pkg/repos/MyRepo.conf

MyRepo: {
  url: "file:///usr/local/poudriere/data/packages/${ABI}/",
  enabled: yes
}