From cb2cb53a68c31c8db01b49e42723a5c9d3e0737f Mon Sep 17 00:00:00 2001 From: gsell Date: Thu, 28 Nov 2024 14:40:42 +0100 Subject: [PATCH] build-system: bugfix in initialisation of the variables Systems and UsedOverlays (cherry picked from commit b06a81e15582c32a210ee043ba3a06cc84525d01) Co-authored-by: Achim Gsell --- Pmodules/libpbuild.bash | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 09cc38f..0f82706 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -821,15 +821,19 @@ pbuild::install_shared_libs() { # declare -n ModuleConfig -declare -a Systems -declare -a UseOverlays +declare -a Systems=() +declare -a UseOverlays=() pbuild.build_module_yaml(){ local -- module_name="$1" local -- module_version="$2" ModuleConfig="$3" local -- module_relstage="${ModuleConfig['relstage']}" - readarray -t Systems <<< "${ModuleConfig['systems']}" - readarray -t UseOverlays <<< "${ModuleConfig['use_overlays']}" + if [[ -n "${ModuleConfig['systems']}" ]]; then + readarray -t Systems <<< "${ModuleConfig['systems']}" + fi + if [[ -n "${ModuleConfig['use_overlays']}" ]]; then + readarray -t UseOverlays <<< "${ModuleConfig['use_overlays']}" + fi shift 3 _build_module "${module_name}" "${module_version}" "${module_relstage}" "$@" }