Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add an option to ignore the osversion check on FreeBSD
Baptiste Daroussin committed 8 years ago
commit 4d9a295276420ae1428d65b1b5b04ab25903af2c
parent 0be3f5e7f1651bf4c8cb7b1f624a249bb2182383
2 files changed +8 -0
modified libpkg/pkg_config.c
@@ -425,6 +425,12 @@ static struct config_entry c[] = {
		myosversion,
		"FreeBSD OS version",
	},
+
	{
+
		PKG_BOOL,
+
		"IGNORE_OSVERSION",
+
		"NO",
+
		"Ignore FreeBSD OS version check",
+
	},
#endif
};

modified libpkg/utils.c
@@ -354,6 +354,8 @@ is_valid_os_version(struct pkg *pkg)
	const char *errstr = NULL;
	int fbsdver;

+
	if (pkg_object_bool(pkg_config_get("IGNORE_OSVERSION")))
+
		return (true);
	if ((fbsd_version = pkg_kv_get(&pkg->annotations, "FreeBSD_version")) != NULL) {
		fbsdver = strtonum(fbsd_version, 1, INT_MAX, &errstr);
		if (errstr != NULL) {