# HG changeset patch # User Olaf Wintermann # Date 1695228118 -7200 # Node ID c997c097866554db5083a0345854595b7f7053f7 # Parent e43d30273f741fe6891d6adec37ba7c440a7e2ce fix automatic feature disabling failed when more than one dependency is missing diff -r e43d30273f74 -r c997c0978665 src/test/resources/golden-sample/configure --- a/src/test/resources/golden-sample/configure Tue Sep 19 19:29:19 2023 +0200 +++ b/src/test/resources/golden-sample/configure Wed Sep 20 18:41:58 2023 +0200 @@ -322,9 +322,6 @@ # dependency libxml2 while true do - if [ -z "$lang_c" ] ; then - break - fi if [ -z "$PKG_CONFIG" ]; then break fi @@ -403,10 +400,6 @@ DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " ERROR=1 fi -if dependency_error_libpq; then - DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " - ERROR=1 -fi # Features if [ -n "$FEATURE_PG" ]; then @@ -414,8 +407,8 @@ if dependency_error_libpq ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_PG" = "auto" ]; then - unset FEATURE_PG - else + DISABLE_FEATURE_PG=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " ERROR=1 fi @@ -424,12 +417,15 @@ if dependency_error_cpp ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_PG" = "auto" ]; then - unset FEATURE_PG - else + DISABLE_FEATURE_PG=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED cpp " ERROR=1 fi fi + if [ -n "$DISABLE_FEATURE_PG" ]; then + unset FEATURE_PG + fi fi diff -r e43d30273f74 -r c997c0978665 src/test/resources/golden-sample/configure2 --- a/src/test/resources/golden-sample/configure2 Tue Sep 19 19:29:19 2023 +0200 +++ b/src/test/resources/golden-sample/configure2 Wed Sep 20 18:41:58 2023 +0200 @@ -560,24 +560,30 @@ if dependency_error_sqlite ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_DB" = "auto" ]; then - unset FEATURE_DB - else + DISABLE_FEATURE_DB=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sqlite " ERROR=1 fi fi + if [ -n "$DISABLE_FEATURE_DB" ]; then + unset FEATURE_DB + fi fi if [ -n "$FEATURE_GUI" ]; then # check dependency if dependency_error_gtk3 ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_GUI" = "auto" ]; then - unset FEATURE_GUI - else + DISABLE_FEATURE_GUI=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " ERROR=1 fi fi + if [ -n "$DISABLE_FEATURE_GUI" ]; then + unset FEATURE_GUI + fi fi # Option: --toolkit diff -r e43d30273f74 -r c997c0978665 test/configure --- a/test/configure Tue Sep 19 19:29:19 2023 +0200 +++ b/test/configure Wed Sep 20 18:41:58 2023 +0200 @@ -322,9 +322,6 @@ # dependency libxml2 while true do - if [ -z "$lang_c" ] ; then - break - fi if [ -z "$PKG_CONFIG" ]; then break fi @@ -403,10 +400,6 @@ DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED openssl " ERROR=1 fi -if dependency_error_libpq; then - DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " - ERROR=1 -fi # Features if [ -n "$FEATURE_PG" ]; then @@ -414,8 +407,8 @@ if dependency_error_libpq ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_PG" = "auto" ]; then - unset FEATURE_PG - else + DISABLE_FEATURE_PG=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq " ERROR=1 fi @@ -424,12 +417,15 @@ if dependency_error_cpp ; then # "auto" features can fail and are just disabled in this case if [ "$FEATURE_PG" = "auto" ]; then - unset FEATURE_PG - else + DISABLE_FEATURE_PG=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED cpp " ERROR=1 fi fi + if [ -n "$DISABLE_FEATURE_PG" ]; then + unset FEATURE_PG + fi fi diff -r e43d30273f74 -r c997c0978665 test/make/configure.vm --- a/test/make/configure.vm Tue Sep 19 19:29:19 2023 +0200 +++ b/test/make/configure.vm Wed Sep 20 18:41:58 2023 +0200 @@ -476,13 +476,16 @@ if dependency_error_$dependency ; then # "auto" features can fail and are just disabled in this case if [ "$${feature.getVarName()}" = "auto" ]; then - unset ${feature.getVarName()} - else + DISABLE_${feature.getVarName()}=1 + else DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} " ERROR=1 fi fi #end + if [ -n "$DISABLE_${feature.getVarName()}" ]; then + unset ${feature.getVarName()} + fi fi #end diff -r e43d30273f74 -r c997c0978665 test/make/project.xml --- a/test/make/project.xml Tue Sep 19 19:29:19 2023 +0200 +++ b/test/make/project.xml Wed Sep 20 18:41:58 2023 +0200 @@ -23,7 +23,6 @@ libxml-2.0 - c @@ -44,7 +43,7 @@ libpq,cpp - libxml2,openssl,libpq + libxml2,openssl