The transform function was incorrectly passing intentionally empty
disabled variable content to the underlying real depends functions. This
commit corrects the behavior so that empty values are passed correctly.
diff --git a/ChangeLog b/ChangeLog
index 81d3712..0edd0f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2025-01-21 Justin Boffemmyer <flux AT sourcemage.org>
+ * build_system_handler.function: fix _buildsys_transform_depends
+
2025-01-20 Justin Boffemmyer <flux AT sourcemage.org>
* build_system_handler.function: fix and document subdep handling
diff --git a/build_system_handler.function b/build_system_handler.function
index 25bbdc0..8165b47 100644
--- a/build_system_handler.function
+++ b/build_system_handler.function
@@ -146,7 +146,7 @@ buildsys_meson_default() {
## disabled)
##
## The syntax for the parameters is as follows:
-##
+##
## buildsys_depends[_optional] \
## [-a active_build_system] \
## [-g grimoire] \
@@ -263,18 +263,25 @@ _buildsys_transform_depends() {
done &&
"$match"
_buildsys_chkerr "no matching build system found" || return 2
- case "$depends_func" in
- depends) unset disabled ;;
- esac &&
if [ -n "$global_optname" ] ;then
# provide a last-resort fallback value for enabled settings
: "${enabled:=$(buildsys_defaults "$targetsys" enabled
"$global_optname")}"
fi
- "$depends_func" ${subdeps:+-sub "$subdeps"} "$spell" \
- "$enabled" \
- ${disabled:+"$disabled"} \
- "$msg" \
- "$grimoire"
+ case "$depends_func" in
+ depends)
+ "$depends_func" ${subdeps:+-sub "$subdeps"} "$spell" \
+ "$enabled" \
+ "$msg" \
+ "$grimoire"
+ ;;
+ optional_depends)
+ "$depends_func" ${subdeps:+-sub "$subdeps"} "$spell" \
+ "$enabled" \
+ "$disabled" \
+ "$msg" \
+ "$grimoire"
+ ;;
+ esac
}