modubuild: error exit if overlay does not exist

If an overlay is requested in an variants file which does not exist,
print a message and exit with exit code > 0
This commit is contained in:
2022-06-07 17:30:43 +02:00
parent 436cbcf1ee
commit 3e1d802012
+4 -1
View File
@@ -528,8 +528,11 @@ build_modules_yaml(){
local relstage
local ol_name
for (( i=0; i<n_variants; i++)); do
yaml_get_relstage relstage "${fname}" "${v}" $i
yaml_get_overlay ol_name "${fname}" "${v}" $i
if [[ ! -v OverlayInfo[${ol_name}:inst_root] ]]; then
std::die 3 "Overlay is not defined -- ${ol_name}"
fi
yaml_get_relstage relstage "${fname}" "${v}" $i
yaml_get_dependencies deps "${fname}" "${v}" $i
ol_install_dir="${OverlayInfo[${ol_name}:inst_root]}"
ol_dir="${OverlayInfo[${ol_name}:mod_root]}"