Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
New option to disable running scripts
Baptiste Daroussin committed 12 years ago
commit 50e59d19645f8f1fa0ea0c03b86c46887c52af56
parent 0542a9c
2 files changed +9 -0
modified libpkg/pkg_config.c
@@ -282,6 +282,12 @@ static struct config_entry c[] = {
		NULL,
		"Experimental: tells pkg to use an external SAT solver",
	},
+
	{
+
		PKG_BOOL,
+
		"RUN_SCRIPTS",
+
		"YES",
+
		"Run post/pre actions scripts",
+
	},
};

static bool parsed = false;
modified libpkg/scripts.c
@@ -75,6 +75,9 @@ pkg_script_run(struct pkg * const pkg, pkg_script type)
		{"POST-DEINSTALL", PKG_SCRIPT_DEINSTALL, PKG_SCRIPT_POST_DEINSTALL},
	};

+
	if (!pkg_object_bool(pkg_config_get("RUN_SCRIPTS")))
+
		return (EPKG_OK);
+

	pkg_get(pkg, PKG_PREFIX, &prefix);

	for (i = 0; i < sizeof(map) / sizeof(map[0]); i++) {