Bug 63747 - Spec current metadata syntax
Summary: Spec current metadata syntax
Status: RESOLVED MOVED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Dan Nicholson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 18815 47996
  Show dependency treegraph
 
Reported: 2013-04-20 01:51 UTC by Dan Nicholson
Modified: 2018-08-25 12:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Dan Nicholson 2013-04-20 01:51:12 UTC
pkg-config has a de-facto metadata syntax that it's held to for years now. This is well understood by people, but what exactly pkg-config will accept is not well documented. Furthermore, there are ways the metadata could be improved to add functionality, but changing the behavior would be really harmful since older versions wouldn't know how to cope with it. Here's a plan to deal with that:

1. A new optional field is added that declares what version of the pkg-config metadata syntax it uses. In the absence of this field, version 1 is assumed. My suggestion for the name is SpecVersion.

2. The currently accepted metadata is specified as version 1 so that .pc file writers know exactly pkg-config or any other program handling .pc files know what to write.

3. Release pkg-config-1.0 that covers version 1 of the metadata specification. After that, the metadata can be changed by bumping the spec version. .pc file writers can then opt-in to the newer syntax in a controlled way.

Michał Górny submitted a spec a while ago on the mailing list.

http://lists.freedesktop.org/archives/pkg-config/2012-September/000884.html

This document goes far beyond specifying the .pc metadata syntax. In particular, it specs the implementation details of the pkg-config program, which I don't think we want to get into. Still, it provides a solid starting point for a spec.
Comment 1 William Pitcock 2013-08-19 03:27:46 UTC
If I may interject, I believe a better approach would be to add a new virtual package.

Then you can do:

   Requires: pkgconfig-spec > 1

The current freedesktop implementation and pkgconf allow for multiple Requires: fields, so you can even do:

   Requires: pkgconfig-spec > 1
   [...]
Comment 2 William Pitcock 2013-08-19 03:31:00 UTC
In fact, I believe that this is the only possible way to do it, as a conformant implementation at present is required to ignore unsupported fields.

So, requiring a specific spec version in the dependency tree will cause the dependency tree to be incomplete, raising an error.
Comment 3 Dan Nicholson 2013-09-15 17:33:06 UTC
(In reply to comment #1)
> If I may interject, I believe a better approach would be to add a new
> virtual package.
> 
> Then you can do:
> 
>    Requires: pkgconfig-spec > 1
> 
> The current freedesktop implementation and pkgconf allow for multiple
> Requires: fields, so you can even do:
> 
>    Requires: pkgconfig-spec > 1
>    [...]

I like that idea, thanks.
Comment 4 GitLab Migration User 2018-08-25 12:55:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/37.


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.