Re: env ABI=FreeBSD:15:amd64 pkg update -f --repository FreeBSD-base

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 12 Sep 2025 05:47:32 UTC
[Corrections to incorrect notation on my part.]

On Sep 11, 2025, at 19:09, Mark Millard <marklmi@yahoo.com> wrote:

> On Sep 11, 2025, at 18:57, Graham Perrin <grahamperrin@gmail.com> wrote:
> 
>> With pkg 2.3.1, the second of these commands fails.
>> 
>> env ABI=FreeBSD:15:amd64 pkg update -f --repository FreeBSD
>> env ABI=FreeBSD:15:amd64 pkg update -f --repository FreeBSD-base
>> 
>> Am I missing something? (As far as I can tell, it would have succeeded five days ago with 2.2.2.)
>> 
>> ----
>> 
>> Script started on Fri Sep 12 02:41:09 2025
>> root@pkg:~ # freebsd-version -kru ; uname -aKU
>> 
>> 14.3-RELEASE-p2
>> 14.3-RELEASE-p2
>> 14.3-RELEASE-p2
>> FreeBSD pkg 14.3-RELEASE-p2 FreeBSD 14.3-RELEASE-p2 releng/14.3-n271439-5982521fe3dd GENERIC amd64 1403000 1403000
>> root@pkg:~ # pkg repos FreeBSD-base
>> 
>> FreeBSD-base: {
>>    url             : "pkg+http://pkg.freebsd.org/FreeBSD:14:amd64/base_latest",
> 
> You are not using the FreeBSD:${ABI}:amd64 notation above.

Well that was a thoughtless mistake on my part:
${ABI} is not the middle term but the whole thing:

You are not using the ${ABI} notation above.

url             : "pkg+http://pkg.freebsd.org/${ABI}/base_latest",

> That means that "env ABI=FreeBSD:15:amd64 " is not
> changing the url to refer to:
> 
> http://pkg.freebsd.org/FreeBSD:15:amd64/base_latest
> 
> for the upgrade to 15.
> 
> Part of the point of the :${ABI}: notation is to

Sorry, no ":"s around ${ABI}

> allow command line replacements of the text when
> changing it to a non-default value for the context.
> 
> Another option would be to edit the file to reference
> :15: explicitly before rtrying:
> 
> env ABI=FreeBSD:15:amd64 pkg update -f --repository FreeBSD-base
> 
> (There would be other uses of ABI substitution for
> all I know.)
> 
>>    enabled         : yes,
>>    priority        : 0,
>>    mirror_type     : "SRV",
>>    signature_type  : "FINGERPRINTS",
>>    fingerprints    : "/usr/share/keys/pkg"
>>  }
>> root@pkg:~ # pkg -v
>> 
>> 2.3.1
>> root@pkg:~ # env ABI=FreeBSD:15:amd64 pkg update -f --repository FreeBSD-base
>> 
>> pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
>> pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>> Updating FreeBSD-base repository catalogue...
>> pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
>> Fetching meta.conf:   0%
>> Fetching meta.conf: 100%    179 B   0.2kB/s    00:01
>> Fetching data.pkg:   0%
>> Fetching data.pkg: 100%   49 KiB  50.4kB/s    00:01
>> Processing entries:   0%
>> pkg: wrong architecture: FreeBSD:14:amd64 instead of FreeBSD:15:amd64
>> pkg: repository FreeBSD-base contains packages with wrong ABI: FreeBSD:14:amd64
>> 
>> Processing entries:   0%
>> Unable to update repository FreeBSD-base
>> Error updating repositories!
>> root@pkg:~ # env ABI=FreeBSD:15:amd64 pkg upgrade -Fqy
>> 
>> pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
>> pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f" recommended
>> pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
>> pkg: Repository FreeBSD-kmods has a wrong packagesite, need to re-create database
>> pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
>> pkg: wrong architecture: FreeBSD:14:amd64 instead of FreeBSD:15:amd64
>> pkg: repository FreeBSD-base contains packages with wrong ABI: FreeBSD:14:amd64
>> root@pkg:~ # exit
>> 
>> exit
>> 
>> Script done on Fri Sep 12 02:44:24 2025
> 


===
Mark Millard
marklmi at yahoo.com