From f0a7f85dbb4e8da43325ad4eb45b09e0636ee6de Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 20 May 2024 21:08:53 +1000 Subject: [PATCH] libmakepkg: make configured BUILDENV readonly PKGBUILDs should not be directly adjusting this variable Signed-off-by: Allan McRae --- scripts/libmakepkg/util/config.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/libmakepkg/util/config.sh.in b/scripts/libmakepkg/util/config.sh.in index e9bb7044..63f16d66 100644 --- a/scripts/libmakepkg/util/config.sh.in +++ b/scripts/libmakepkg/util/config.sh.in @@ -77,5 +77,8 @@ load_makepkg_config() { source_makepkg_config "$MAKEPKG_CONF" + # prevent PKGBUILDs altering this directly + readonly -a BUILDENV + eval "$restore_envvars" }