Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
version: add IGNORE_MAJOR to pkg.conf and document it
Baptiste Daroussin committed 22 days ago
commit a15fddb7850fbc3c676e181afe21a5000ff0a5cf
parent 5a92867
2 files changed +18 -0
modified docs/pkg.conf.5
@@ -218,6 +218,15 @@ Default: NO.
Define User-agent to be sent to HTTP server when getting repository
data.
Default: pkg/<version>.
+
.It Cm IGNORE_OSMAJOR: boolean [FreeBSD specific ]
+
Ignore
+
.Fx
+
major OS version check.
+
This suppresses the
+
.Dq Major OS version upgrade detected
+
warning, useful when building packages or images for a different OS version
+
than the host.
+
Default: NO.
.It Cm IGNORE_OSVERSION: boolean [FreeBSD specific ]
Ignore
.Fx
modified libpkg/pkg_config.c
@@ -384,6 +384,11 @@ static struct config_entry c[] = {
	},
	{
		PKG_BOOL,
+
		"IGNORE_OSMAJOR",
+
		"NO",
+
	},
+
	{
+
		PKG_BOOL,
		"BACKUP_LIBRARIES",
		"NO",
	},
@@ -1009,6 +1014,10 @@ pkg_compiled_for_same_os_major(void)
	if (getenv("IGNORE_OSMAJOR") != NULL)
		return (true);

+
	if (pkg_initialized() &&
+
	    pkg_object_bool(pkg_config_get("IGNORE_OSMAJOR")))
+
		return (true);
+

	return (ctx.abi.major == OSMAJOR);
#else
	return (true);		/* Can't tell, so assume yes  */