Honor the ${pcfiledir} entries in pkgconfig
Metadata
Current evaluation
Merged following two approvals and passing CI. The change updates the craft-parts dependency and implements logic to honor ${pcfiledir} entries in pkgconfig, ensuring .pc files remain relocatable. Resolves #5158.
Suggested action: —
No scores available.
Issue body
The ${pcfiledir} tag allows to make .pc files relocatables, by being replaced with the path where the .pc file is stored. In these cases, the "prefix=" entry must be left as-is, to ensure that it continues to work as expected.
It is complemented by https://github.com/canonical/craft-parts/pull/977
Fix #5158
- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox run -m lint`?
- [ ] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`)
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged following two approvals and passing CI. The change updates the craft-parts dependency and implements logic to honor ${pcfiledir} entries in pkgconfig, ensuring .pc files remain relocatable. Resolves #5158. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to honor ${pcfiledir} entries in pkgconfig files, ensuring relocatability. Updated the craft-parts dependency to version 2.4.1, passed coverage checks, and resolved issue #5158. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to honor ${pcfiledir} entries in pkgconfig files, enabling relocatable .pc files. Updated craft-parts to v2.4.1, passed coverage checks, and was approved and merged to resolve issue #5158. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #977 fix: Honor the ${pcfiledir} entries in pkgconfig | craft-parts | merged | Merged after approval and CI. Fixes pkgconfig handling to honor ${pcfiledir} entries for relocatable .pc files. Spelling errors were resolved via wordlist update, and the branch was rebased to resolve conflicts before merging. | |
| #676 Special handling for pc files for conflicts | snapcraft | merged | Merged fix for LP #1604472 adding special handling for .pc files in the conflict checker. Skips os.linking for .pc files to handle differing prefixes in parts installdir. Approved and merged after passing CI checks. | |
| #5158 Snapcraft doesn't honor ${pcfiledir} in pkgconfig files | snapcraft | closed | Resolved by merging snapcraft#5157 for Core20/Core22 and craft-parts#977 for Core24+. The patches stop Snapcraft from incorrectly prepending build paths to the ${pcfiledir} variable in pkgconfig files, preserving relocatable paths. | |
| #3848 repo: fix_pkg_config removes prefixes from staged snap's .pc files. | snapcraft | merged | Merged a fix normalizing pkg-config prefixes in staged snaps by stripping prepended build directories. Squash-merged after review approval and full test coverage, resolving Launchpad #1916281 and CRAFT-1214. | |
| #251 repo: fix_pkg_config removes prefixes from staged snap's .pc files. | craft-parts | merged | Merged fix normalizing pkg-config files from staged snaps by stripping prepended build directories from the prefix parameter. Resolves Launchpad bug #1916281 and CRAFT-1215. Approved and merged. |