Summary: | Returning highest version when multiple .pc files found in PKG_CONFIG_PATH | ||
---|---|---|---|
Product: | pkg-config | Reporter: | Rhys Ulerich <rhys.ulerich> |
Component: | src | Assignee: | pkg-config |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Rhys Ulerich
2013-03-21 20:02:56 UTC
Hmm, not sure what to do about this. On the one hand, I like the idea and don't think it would be too much trouble to get it to do this. However, I'm pretty sure it could get messed up pretty easily. The reason pkg-config uses the first version found in the path isn't just for convenience, it's also because it produces the most predictable results when mixing packages found at different locations in the path. Say you have glib and cairo in both /usr/local/lib/pkgconfig and /usr/lib/pkgconfig. If you don't use both .pc files in /usr/local, what happens when pkg-config starts outputting -L/usr/local/lib? You're going to end up using the version in /usr/local, anyway. pkg-config actually jumps through some hoops to keep track of where in the path the package was found from and reorders the packages so you're most likely to get your /usr/local packages first and /usr packages second and not get weird mixtures. It would be difficult to get the same guarantees when mixing in highest version, too. I'd not appreciated the reordering pkg-config did in that regard. It would definitely be difficult to honor highest version, not break the existing behavior, and behave in a reasonable manner for everyone. Thanks for taking a look and explaining your rationale. Feel free to close this one. - Rhys Thanks for understanding. |
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.