modbuild/libpbuild: print warnings if deprecated functions are used

This commit is contained in:
2022-07-29 14:47:33 +02:00
parent c6be30005a
commit 06c41be687
2 changed files with 22 additions and 6 deletions
+20 -3
View File
@@ -720,9 +720,26 @@ pbuild::install_shared_libs() {
###############################################################################
#
# This is the main entry function called by modbuild!
# The following two functions are the entry points called by modbuild!
#
pbuild.build_module() {
declare yaml_config='yes'
pbuild.build_module_legacy(){
yaml_config='no'
_build_module "$@"
}
readonly -f pbuild.build_module_legacy
pbuild.build_module_yaml(){
_build_module "$@"
}
readonly -f pbuild.build_module_yaml
#..............................................................................
#
# The real worker function.
#
_build_module() {
declare -gx module_name="$1"
declare -gx module_version="$2"
declare -gx module_release="$3"
@@ -1583,7 +1600,7 @@ pbuild.build_module() {
cleanup_modulefiles
std::info "* * * * *\n"
}
readonly -f pbuild.build_module
readonly -f _build_module
# Local Variables:
# mode: sh
+2 -3
View File
@@ -436,7 +436,7 @@ build_modules_legacy() {
version="${tokens[0]#*/}"
release="${tokens[1]}"
with_modules=( "${tokens[@]:2}" )
pbuild.build_module \
pbuild.build_module_legacy \
"${name}" "${version}" \
"${release}" "${with_modules[@]}"
done
@@ -647,7 +647,7 @@ build_modules_yaml(){
"${relstage}" "${with_modules[@]}"
done < <(bash_expand "" ${deps[@]}|${awk} "${pattern}")
else
pbuild.build_module \
pbuild.build_module_yaml \
"${name}" "${v##*/}" \
"${relstage}"
fi
@@ -655,7 +655,6 @@ build_modules_yaml(){
done
}
build_modules() {
if [[ -n $(ls "${BUILDBLOCK_DIR}/files/${BNAME_VARIANTS}"*.yaml 2>/dev/null) ]]; then
build_modules_yaml "$@"