build-system: load required overlays for building a module

This commit is contained in:
2024-08-29 14:00:37 +02:00
parent af82391ef0
commit c2f7733c8b
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -946,12 +946,14 @@ readonly -f pbuild.build_module_legacy
declare -n Config
declare -a Systems
declare -a UseOverlays
pbuild.build_module_yaml(){
local -- module_name="$1"
local -- module_version="$2"
Config="$3"
local -- module_relstage="${Config['relstage']}"
readarray -t Systems <<< "${Config['systems']}"
readarray -t UseOverlays <<< "${Config['use_overlays']}"
shift 3
_build_module "${module_name}" "${module_version}" "${module_relstage}" "$@"
}
@@ -983,6 +985,10 @@ _build_module() {
[[ :${LOADEDMODULES}: =~ :$1: ]]
}
load_overlays(){
eval "$( "${modulecmd}" bash use "${Config['use_overlays']}" )"
}
#......................................................................
#
# Load build- and run-time dependencies.
+2 -1
View File
@@ -535,6 +535,7 @@ declare -A Yaml_default_config=(
['sub_packages']='' # !!map
['target_cpus']='' # !!seq of strings
['urls']='' # !!map
['use_overlays']='' # !!seq
['variant']='' # !!str
)
@@ -679,7 +680,7 @@ build_modules_yaml_v1(){
pm::get_value "${yaml_input}" value "${key}" '!!seq'
cfg[${key,,}]="${value}"
;;
build_requires|configure_args|docfiles|patch_files|runtime_deps|systems|variant )
build_requires|configure_args|docfiles|patch_files|runtime_deps|systems|use_overlays|variant )
pm::get_seq "${yaml_input}" value "${key}"
cfg[${key,,}]="${value}"
;;