repo: fix_pkg_config removes prefixes from staged snap's .pc files.
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
When normalizing pkg-config (.pc) files from staged snaps, directories previously prepended to the prefix parameter will be removed:
- `/build/<snap-name>/stage` from snaps built via launchpad
- `/root/stage` from snaps built via a provider
An almost duplicate of https://github.com/snapcore/snapcraft/pull/3848.
LP: #[1916281](https://bugs.launchpad.net/snapcraft/+bug/1916281)
(CRAFT-1215)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix normalizing pkg-config prefixes for staged snaps by stripping prepended build directories like /build/<snap-name>/stage and /root/stage from .pc files. Resolves Launchpad bug #1916281 and CRAFT-1215. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. |