Bug 54389

Summary: --help: descriptions of --*-version=... don't follow the source code
Product: pkg-config Reporter: Michał Górny <mgorny>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Michał Górny 2012-09-02 12:46:51 UTC
$ pkg-config --help
[...]
  --atleast-version=VERSION               return 0 if the module is at least version VERSION
  --exact-version=VERSION                 return 0 if the module is at exactly version VERSION
  --max-version=VERSION                   return 0 if the module is at no newer than version VERSION

While the source code states that it causes the version requirement in read packages to be replaced with the given one instead:

        if (required_exact_version)
          {
            g_free (ver->version);
            ver->comparison = EQUAL;
            ver->version = g_strdup (required_exact_version);
          }

Although the return value usually will be a side-effect of this change, the description suggests that it implies behavior like '--exists'.
Comment 1 Dan Nicholson 2012-12-11 22:09:15 UTC
Fixed in commit 548ba5b. Thanks for the report.

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.