fix: Honor the ${pcfiledir} entries in pkgconfig
Metadata
Current evaluation
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.
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/snapcraft/pull/5157
Fix https://github.com/canonical/snapcraft/issues/5158
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [X] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix to honor ${pcfiledir} in pkgconfig files, preserving the prefix= entry for relocatability. Added pcfiledir to the wordlist to pass spelling checks, rebased against main, and approved by @bepri. Closes #5158. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5157 Honor the ${pcfiledir} entries in pkgconfig | snapcraft | merged | 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. | |
| #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. | |
| #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. | |
| #620 Alter prefix for pkg-config to get correct values | snapcraft | merged | Merged pkg-config prefix adjustments to retrieve correct values. Approved following reviewer feedback on installdir handling and test coverage, the author verified production compatibility. The change touched 7 files with 215 additions and 174 deletions. |