Bug 7000 - --validate action
Summary: --validate action
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: All All
: high enhancement
Assignee: Dan Nicholson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-23 02:29 UTC by Daniel Macks
Modified: 2014-09-27 23:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Add --validate option to check .pc syntax without dependencies (3.57 KB, patch)
2013-05-17 13:00 UTC, Dan Nicholson
Details | Splinter Review

Description Daniel Macks 2006-05-23 02:29:13 UTC
Would be great to have a way to validate a give .pc file to make make sure
everything is up to snuff. pkg-config already catches some errorsin the course
of its other modes, but it would be useful for authors to be able to check "is
this file syntactically correct?" before distributing it. Also, lots of packages
distribute a .pc.in and construct the .pc on-the-fly, so validating the result
would protect against bugs in the template replacement definitions.

Already there are some warnings if there are missing essential fields and if a
${foo} but no definition of foo. But it doesn't catch illegal variable names
(foo-libs, for example). And using parens instead of curly-braces is apparently
an easy mistake to make, so should warn about that.
foo-libs
Comment 1 chemtech 2013-03-15 14:07:47 UTC
Daniel Macks 
Do you still experience this issue with newer drivers ?
Please check the status of your issue.
Comment 2 Daniel Macks 2013-03-15 15:25:29 UTC
I am using the latest drivers and other system software. But since the issue is not even remotely related to any hardware or involving interfacing to other systems, I'm not sure why that would affect this RFE?
Comment 3 Dan Nicholson 2013-04-20 01:27:39 UTC
I think --validate would be easy enough to do. Basically, --exists with Requires processing turned off. pkg-config does a full parse when it collects the package into its database. However, there's also the part where the parser would need to be beefed up to detect illegal things. I'll take a look at it.
Comment 4 Dan Nicholson 2013-05-17 13:00:21 UTC
Created attachment 79462 [details] [review]
Add --validate option to check .pc syntax without dependencies

Provide developers a way to check their .pc files prior to release. This
works the same as --exists except that package dependencies are not
processed. That allows the .pc file to be checked in complete isolation
of others.

Freedesktop #7000 (https://bugs.freedesktop.org/show_bug.cgi?id=7000)

Can you try this patch and see if it's what you're looking for?
Comment 5 Daniel Macks 2014-06-07 18:00:12 UTC
Sorry I've been away from this for so long! The proposed patch from Comment #4 works well for me against 0.28 (adjusting as necessary so it applies cleanly). And with it, authors could avoid installing files that trigger Bug #76791
Comment 6 Dan Nicholson 2014-09-27 23:47:54 UTC
And now it's my time to apologize for being slow! Applied in 0e847a2.


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.