maintainer-feedback requested: [Bug 285194] [patch] ports-mgmt/pkg: IGNORE_OSVERSION inappropriate for minor version mismatch

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 06 Mar 2025 12:56:51 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody)
<pkg@FreeBSD.org> for maintainer-feedback:
Bug 285194: [patch] ports-mgmt/pkg: IGNORE_OSVERSION inappropriate for minor
version mismatch
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285194



--- Description ---
If we compile ports on stable branch, packages created by pkg(1) show
Annotations    :
	FreeBSD_version: __FreeBSD_version
which increases for each base API change, while ABI compatibility is strictly
maintained throughout the branch (fixed major OS version).

pkg(1) checks for th OS version mismatch before installing a package, but
currently doesn't allow to catch MAJOR version mismatches only, which is the
only necessary check.

In my opinion, the default to not install a package with a minor version
mismatch is wrong and the IGNORE_OSVERSION=yes option is not an appropriate
setting to allow minor version mismatches.

To keep the old behaviour, my proposed patch, introducing the
MINOR_OSVER_CONFIRM config option, keeps the confirmation dialog for minor
version mismatches, but defaults to install the package.
Defining MINOR_OSVER_CONFIRM=no doesn't completely skip the OSVERSION check as
IGNORE_OSVERSION=yes does, hence major (thus problematic) mismatch will be
catched.

I'd prefer to have MINOR_OSVER_CONFIRM=no as the default, contrary to what the
patch currently defines!