modbuild: bugfix in decision with to use legacy or YAML variants file

This commit is contained in:
2022-06-22 22:19:51 +02:00
parent ac318f2e83
commit 6401d2e1f7
+2 -3
View File
@@ -433,7 +433,7 @@ build_modules_legacy() {
std::die 10 "Aborting..."
fi
declare ol_name='base'
declare ol_type=''
declare ol_type='n'
declare ol_mod_root="${pm_root}"
declare ol_inst_root="${pm_root}"
local -i i=0
@@ -581,8 +581,7 @@ build_modules_yaml(){
build_modules() {
local variants_file="${BUILDBLOCK_DIR}/files/${BNAME_VARIANTS}"
if [[ -n "${variants_file}*.yaml" ]]; then
if [[ -n $(ls "${BUILDBLOCK_DIR}/files/${BNAME_VARIANTS}"*.yaml 2>/dev/null) ]]; then
build_modules_yaml "$@"
else
build_modules_legacy "$@"