Bug 8653 - Missing errors when using --print-errors --atleast-version
Summary: Missing errors when using --print-errors --atleast-version
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-15 17:10 UTC by Daniel Leidert
Modified: 2012-05-10 05:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] Unify handling of operator and command line option version checking (5.45 KB, patch)
2012-04-21 11:14 UTC, Dan Nicholson
Details | Splinter Review

Description Daniel Leidert 2006-10-15 17:10:09 UTC
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
Comment 1 Dan Nicholson 2012-04-21 11:14:04 UTC
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(-)
Comment 2 Dan Nicholson 2012-05-10 05:52:59 UTC
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.