From 11c93a1e79e5a3401b8643b9234ccf21d9b74758 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 5 Jul 2022 17:13:37 +0200 Subject: [PATCH] common: correctly unset build_option_* variables We can use the bash feature ${!prefix@}/${!prefix*} which expands to all variables with the prefix. This avoids leaking build_options between sourced templates. --- common/environment/setup/sourcepkg.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index 1191993c9ab..5b31f6c1f81 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -21,6 +21,9 @@ unset -v CFLAGS CXXFLAGS FFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF PKG_CONFIG unset -v CMAKE_GENERATOR +# unset all $build_option_ variables +unset -v "${!build_option_@}" + # hooks/do-extract/00-distfiles unset -v skip_extraction