mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
build-system: info messages reviewed
This commit is contained in:
+26
-18
@@ -516,25 +516,25 @@ declare -A Yaml_default_config=(
|
|||||||
['build_functions']='' # !!seq of strings
|
['build_functions']='' # !!seq of strings
|
||||||
['build_variants']='' # !!seq of strings
|
['build_variants']='' # !!seq of strings
|
||||||
['compile_in_sourcetree']='no' # !!str
|
['compile_in_sourcetree']='no' # !!str
|
||||||
['configure_with']='auto' # !!str
|
|
||||||
['configure_args']='' # !!seq of strings
|
['configure_args']='' # !!seq of strings
|
||||||
['configure_args+']='' # !!seq of strings
|
['configure_args+']='' # !!seq of strings
|
||||||
|
['configure_with']='auto' # !!str
|
||||||
['default_variant']='' # !!str
|
['default_variant']='' # !!str
|
||||||
['docfiles']='' # !!seq of strings
|
['docfiles']='' # !!seq of strings
|
||||||
['docfiles+']='' # !!seq of strings
|
['docfiles+']='' # !!seq of strings
|
||||||
['download_dir']='' # !!str
|
['download_dir']='' # !!str
|
||||||
['group']='Tools' # !!str
|
['group']='Tools' # !!str
|
||||||
['kernels']='' # !!seq of strings
|
|
||||||
['group_deps']='' # !!map
|
['group_deps']='' # !!map
|
||||||
|
['kernels']='' # !!seq of strings
|
||||||
['overlay']='base' # !!str
|
['overlay']='base' # !!str
|
||||||
['patch_files']='' # !!seq
|
['patch_files']='' # !!seq
|
||||||
['patch_files+']='' # !!seq
|
['patch_files+']='' # !!seq
|
||||||
['relstage']='unstable' # !!str
|
['relstage']='unstable' # !!str
|
||||||
['runtime_deps']='' # !!seq of strings
|
['runtime_deps']='' # !!seq of strings
|
||||||
['script']='build' # !!str
|
['script']='build' # !!str
|
||||||
|
['sub_packages']='' # !!map
|
||||||
['suffix']='' # !!str
|
['suffix']='' # !!str
|
||||||
['systems']='' # !!seq of strings
|
['systems']='' # !!seq of strings
|
||||||
['sub_packages']='' # !!map
|
|
||||||
['target_cpus']='' # !!seq of strings
|
['target_cpus']='' # !!seq of strings
|
||||||
['urls']='' # !!map
|
['urls']='' # !!map
|
||||||
['use_flags']='' # !!seq
|
['use_flags']='' # !!seq
|
||||||
@@ -636,6 +636,14 @@ build_modules_yaml_v1(){
|
|||||||
std::die 3 "Invalid kernel name in configuration!"
|
std::die 3 "Invalid kernel name in configuration!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
die_wrong_module_type(){
|
||||||
|
std::die 3 "Module type is '$1' but was called as '$2'!"
|
||||||
|
}
|
||||||
|
|
||||||
|
die_invalid_module_type(){
|
||||||
|
std::die 3 "Invalid module type -- '$1'!"
|
||||||
|
}
|
||||||
|
|
||||||
yml::check_keys(){
|
yml::check_keys(){
|
||||||
local -n yaml_input="$1"
|
local -n yaml_input="$1"
|
||||||
local -n valid_yaml_keys="$2"
|
local -n valid_yaml_keys="$2"
|
||||||
@@ -1292,16 +1300,19 @@ build_modules_yaml_v1(){
|
|||||||
local -- pkg_version=''
|
local -- pkg_version=''
|
||||||
local -a pkg_build_args=()
|
local -a pkg_build_args=()
|
||||||
local -a keys=()
|
local -a keys=()
|
||||||
readarray -t keys < <( ${yq} -e ".|keys().[]" <<<"${pkgs_yaml}" 2>/dev/null ) || \
|
readarray -t keys < <( ${yq} -e ".|keys().[]" \
|
||||||
|
<<<"${pkgs_yaml}" 2>/dev/null ) || \
|
||||||
die_parsing "${pkgs_yaml}"
|
die_parsing "${pkgs_yaml}"
|
||||||
local -- key=''
|
local -- key=''
|
||||||
for key in "${keys[@]}"; do
|
for key in "${keys[@]}"; do
|
||||||
case ${key,,} in
|
case ${key,,} in
|
||||||
'name' )
|
'name' )
|
||||||
pm::get_value "${pkgs_yaml}" pkg_name "${key}" '!!str'
|
pm::get_value "${pkgs_yaml}" \
|
||||||
|
pkg_name "${key}" '!!str'
|
||||||
;;
|
;;
|
||||||
'version' )
|
'version' )
|
||||||
pm::get_value "${pkgs_yaml}" pkg_version "${key}" '!!str'
|
pm::get_value "${pkgs_yaml}" \
|
||||||
|
pkg_version "${key}" '!!str'
|
||||||
;;
|
;;
|
||||||
'build_args' )
|
'build_args' )
|
||||||
local -- value=''
|
local -- value=''
|
||||||
@@ -1353,9 +1364,8 @@ build_modules_yaml_v1(){
|
|||||||
[[ "${opt_system}" =~ ${system} ]] && return 0
|
[[ "${opt_system}" =~ ${system} ]] && return 0
|
||||||
[[ "${HOSTNAME}" =~ ${system} ]] && return 0
|
[[ "${HOSTNAME}" =~ ${system} ]] && return 0
|
||||||
done
|
done
|
||||||
std::info "Skipping variant '${version}', neither OS nor hostname match:"
|
std::info "%s " "Skipping variant '${version}'" \
|
||||||
std::info " This system: ${opt_system}; hostname: ${HOSTNAME}"
|
"for the system(s): ${systems[@]}"
|
||||||
std::info " Systems to build on: ${systems[@]}"
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1369,9 +1379,8 @@ build_modules_yaml_v1(){
|
|||||||
[[ ${kernel} == 'any' ]] && return 0
|
[[ ${kernel} == 'any' ]] && return 0
|
||||||
[[ ${kernel} == ${KernelName,,} ]] & return 0
|
[[ ${kernel} == ${KernelName,,} ]] & return 0
|
||||||
done
|
done
|
||||||
std::info "Skipping variant '${version}':"
|
std::info "%s " "Skipping variant '${version}'" \
|
||||||
std::info " The kernel of this systems is: ${KernelName}"
|
"for the kernel(s): ${config['kernels']}"
|
||||||
std::info " But the variant is for the following kernels: ${config['kernels']}"
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1386,9 +1395,8 @@ build_modules_yaml_v1(){
|
|||||||
[[ ${cpu} == 'any' ]] && return 0
|
[[ ${cpu} == 'any' ]] && return 0
|
||||||
[[ ${cpu} == ${system_cpu} ]] && return 0
|
[[ ${cpu} == ${system_cpu} ]] && return 0
|
||||||
done
|
done
|
||||||
std::info "Skipping variant '${version}':"
|
std::info "%s" "Skipping variant '${version}' " \
|
||||||
std::info " The CPU of this systems is: ${system_cpu}"
|
"for the CPU(s) ${config['target_cpus']}"
|
||||||
std::info " But this variant is for the following CPUs: ${config['target_cpus']}"
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1523,14 +1531,14 @@ build_modules_yaml_v1(){
|
|||||||
case "${value,,}" in
|
case "${value,,}" in
|
||||||
'module' )
|
'module' )
|
||||||
[[ "${module_type}" == 'sub_package' ]] && \
|
[[ "${module_type}" == 'sub_package' ]] && \
|
||||||
std::die 3 "Module type is 'module' but was called as 'sub_package'!"
|
die_wrong_module_type 'module' 'sub_package'
|
||||||
;;
|
;;
|
||||||
'sub_package' )
|
'sub_package' )
|
||||||
[[ "${module_type}" == 'module' ]] && \
|
[[ "${module_type}" == 'module' ]] && \
|
||||||
std::die 3 "Module type is 'sub_package' but was called as 'module'!"
|
die_wrong_module_type 'sub_package' 'module'
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
std::die 3 "Invalid module type -- '${value}'!"
|
die_invalid_module_type "${value}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user