I've discovered this in version 0.20 (Cygwin) and I was not able to check your latest release. So if this issue is already fixed, please close this report. I was wondering, why I did not get a meaningful error (nor any error) when using $ pkg-config --print-errors --atleast-version=$VERSION $LIBRARY and the installed version is < then the requested $VERSION. But when using $ pkg-config --print-errors --exists "$LIBRARY >= $VERSION" I get an error, when the installed versions is < $VERSION. This should be changed, so also the first command produces a meaningsful error message. Regards, Daniel
Created attachment 60427 [details] [review] [PATCH] Unify handling of operator and command line option version checking The code for --exact/atleast/max-version was taking a different path than the handling of operators like =/>=/<=. Make the long option versions override the operators and take place during the standard package checking stage. This also means the --print-errors is respected. Fixes Freedesktop #8653 --- check/Makefile.am | 2 +- check/check-version | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ main.c | 48 +++++++++------------- 3 files changed, 128 insertions(+), 29 deletions(-)
I went ahead and pushed this in a83a14c. Please reopen if this isn't fixed for you.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.