mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-28 02:19:39 +02:00
Code cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -1217,7 +1217,6 @@ build_modules_yaml_v1(){
|
||||
pbuild.add_patch_files "${args[@]}"
|
||||
}
|
||||
|
||||
|
||||
is_variant_to_build(){
|
||||
local -- name="$1"
|
||||
local -- version="$2"
|
||||
|
||||
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user