From b827404549c00db9b762edda7525aabe14264ddb Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Thu, 7 Jun 2012 05:51:59 -0700 Subject: [PATCH] Enable Requires and Requires.private for --exists Prior to pkg-config 0.24, --exists honored Requires and Requires.private. This was regressed in commits 02d5ae3f and 669bfe2e, which split the handling of Requires and Requires.private out more correctly for other options. This adds exists to the group of options that enable the Requires functionality. Freedesktop #43149 --- check/check-missing | 6 +++--- main.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/check/check-missing b/check/check-missing index 1809c4d..69bed61 100755 --- a/check/check-missing +++ b/check/check-missing @@ -14,16 +14,16 @@ ARGS="--exists pkg-non-existent" run_test # existing package, but with missing Requires -EXPECT_RETURN=0 +EXPECT_RETURN=1 RESULT="" ARGS="--exists missing-requires" run_test # tests below are on an existing package, but with missing Requires.private; # when pkg-config outputs error, the actual error text isn't checked -# package exists +# package exists, but should fail since deps can't be resolved ARGS="--exists missing-requires-private" -EXPECT_RETURN=0 +EXPECT_RETURN=1 RESULT="" run_test diff --git a/main.c b/main.c index b42df6f..385e43d 100644 --- a/main.c +++ b/main.c @@ -424,14 +424,15 @@ main (int argc, char **argv) * libs are requested */ if (want_I_cflags || want_other_cflags || want_cflags || - want_requires_private || + want_requires_private || want_exists || (want_static_lib_list && (want_libs || want_l_libs || want_L_libs))) enable_requires_private(); /* ignore Requires if no Cflags or Libs are requested */ if (!want_I_cflags && !want_other_cflags && !want_cflags && - !want_libs && !want_l_libs && !want_L_libs && !want_requires) + !want_libs && !want_l_libs && !want_L_libs && !want_requires && + !want_exists) disable_requires(); if (want_my_version) -- 1.7.7.6