git: e22698bc7cf6 - main - sysutils/firstboot_pkg_upgrade: Ignore OSVERSION

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Fri, 11 Sep 2026 06:14:18 UTC
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e22698bc7cf6b0175d0c1612e71be0d49c94dfa5

commit e22698bc7cf6b0175d0c1612e71be0d49c94dfa5
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2026-09-11 05:49:26 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-09-11 06:14:11 +0000

    sysutils/firstboot_pkg_upgrade: Ignore OSVERSION
    
    Don't just ignore OSVERSION for the 'pkg upgrade' command; we also
    need to ignore OSVERSION for the 'pkg update' and also for the 'pkg
    bootstrap' (if we somehow don't have pkg installed yet).
    
    Rather than setting it individually for each command, export
    IGNORE_OSVERSION=YES into the environment where it will apply to
    all of the pkg commands.
    
    Reviewed by:    ziaee
    Fixes:  b67d354b6656 ("sysutils/firstboot-pkg-upgrade: Ignore OSVERSION")
    Sponsored by:   Amazon
    Reported by:    akiyano
    Differential Revision:  https://reviews.freebsd.org/D59584
---
 sysutils/firstboot-pkg-upgrade/Makefile                       | 2 +-
 sysutils/firstboot-pkg-upgrade/files/firstboot_pkg_upgrade.in | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sysutils/firstboot-pkg-upgrade/Makefile b/sysutils/firstboot-pkg-upgrade/Makefile
index 243868828e0f..fc04e37e35ef 100644
--- a/sysutils/firstboot-pkg-upgrade/Makefile
+++ b/sysutils/firstboot-pkg-upgrade/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	firstboot-pkg-upgrade
-PORTVERSION=	1.3
+PORTVERSION=	1.4
 CATEGORIES=	sysutils
 MASTER_SITES=	# none
 DISTFILES=	# none
diff --git a/sysutils/firstboot-pkg-upgrade/files/firstboot_pkg_upgrade.in b/sysutils/firstboot-pkg-upgrade/files/firstboot_pkg_upgrade.in
index db1381763e0b..2e3520ce0d3c 100644
--- a/sysutils/firstboot-pkg-upgrade/files/firstboot_pkg_upgrade.in
+++ b/sysutils/firstboot-pkg-upgrade/files/firstboot_pkg_upgrade.in
@@ -29,6 +29,7 @@ stop_cmd=":"
 
 firstboot_pkg_upgrade_run()
 {
+	export IGNORE_OSVERSION=YES
 	repo_args=""
 
 	for repo in ${firstboot_pkg_upgrade_repos}; do
@@ -40,7 +41,7 @@ firstboot_pkg_upgrade_run()
 
 	state_orig=`pkg info | sha256`
 
-	env AUTOCLEAN=ON IGNORE_OSVERSION=yes pkg upgrade ${repo_args} -y
+	env AUTOCLEAN=ON pkg upgrade ${repo_args} -y
 
 	state_new=`pkg info | sha256`