commit: 185e62134732aee519a377c51965ba62ae1fd965
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Nov 14 20:35:52 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 23 18:40:19 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=185e6213
kernel-build.eclass: restore nullglob state in kernel-build_merge_configs()
Presently, the kernel-build_merge_configs() function captures a command
that would restore the prior state of the nullglob shell option. Yet, it
never subsequently bothers to evaluate that command. Instead, it ends up
disabling the option, irrespective of its prior state.
Address this issue by evaluating the content of the 'shopt_save'
variable after the 'user_configs' array variable has been assigned. Note
that to use eval is wholly proper; those eclasses that do not, should.
Fixes: d5b0c16d1d3fdf63d743b22e7192e88e04556b05
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/kernel-build.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index aa0f7b5894ea..a92151a0b8a6 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -713,7 +713,7 @@ kernel-build_merge_configs() {
local shopt_save=$(shopt -p nullglob)
shopt -s nullglob
local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config )
- shopt -u nullglob
+ eval "${shopt_save}"
local merge_configs=( "${@}" )