From 63362dc4a6c92b872684f14fbe05efa71efe29c8 Mon Sep 17 00:00:00 2001 From: gsell Date: Mon, 4 Aug 2025 17:18:56 +0200 Subject: [PATCH] Code cleanup --- Pmodules/libmodules.tcl | 4 ---- Pmodules/libpbuild.bash | 3 ++- Pmodules/modbuild.in | 1 - build | 4 ++++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Pmodules/libmodules.tcl b/Pmodules/libmodules.tcl index d772444..f19c671 100644 --- a/Pmodules/libmodules.tcl +++ b/Pmodules/libmodules.tcl @@ -1,7 +1,4 @@ # -# :TODO: -# switch/swap -# unload modules if parent removed # if {[info exists env(PMODULES_DEBUG)] && $env(PMODULES_DEBUG)} { @@ -67,7 +64,6 @@ proc _pmodules_parse_pmodules_env { } { debug "return" } -debug "module-addgroup" proc module-addgroup { group } { global env global name diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 24790ba..f2d675d 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -931,7 +931,8 @@ _build_module() { fi std::info "Loading module: ${m}" - eval "$( "${modulecmd}" bash load "${m}" )" + local output="$("${modulecmd}" bash load "${m}")"; + eval "${output}" if ! bm::is_loaded "$m"; then "${modulecmd}" bash list std::die 5 \ diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index daddff5..434caa6 100644 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -1217,7 +1217,6 @@ build_modules_yaml_v1(){ pbuild.add_patch_files "${args[@]}" } - is_variant_to_build(){ local -- name="$1" local -- version="$2" diff --git a/build b/build index 1cf51e3..1e9c131 100755 --- a/build +++ b/build @@ -103,6 +103,10 @@ read_config_file() { eval $(std::parse_yaml "${fname}" '') || \ std::die 1 "Cannot read configuration file '${fname}'" + # In the YAML configuration file the root of the base overlay must be + # defined with Overlays.base.install_root. The function + # std::parse_yaml() stores the value in the environment variable + # 'Overlays_base_install_root'. declare -xg INSTALL_ROOT="${Overlays_base_install_root}" if [[ -z "${INSTALL_ROOT}" ]]; then std::die 1 "Error in configuration file '${fname}': install root not defined!"