← Back to issue list

fix: Honor the ${pcfiledir} entries in pkgconfig

View original Github issue

Metadata

Project
craft-parts
Number
#977
Type
pull request
State
merged
Author
sergio-costas
Labels
—
Created
Updated
Closed

Current evaluation

Merged as b4a09d95, preserving ${pcfiledir}-based prefixes so relocatable pkg-config files remain valid; released in Craft Parts 2.4.1.

Resolution: closed resolved

Reason: PR canonical/craft-parts#977 was approved and merged as commit b4a09d95. The fix leaves prefixes beginning with ${pcfiledir} unchanged and is documented in the 2.4.1 changelog.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged as b4a09d95, preserving ${pcfiledir}-based prefixes so relocatable pkg-config files remain valid; released in Craft Parts 2.4.1.
stealth/space-bunny-alpha — closed resolved Merged as b4a09d95 to preserve prefix values using ${pcfiledir}, keeping pkg-config files relocatable. Fixes canonical/snapcraft#5158 and complements #5157.
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 work

  • Related To: canonical/snapcraft#5157 (confidence 100%)

    Companion Snapcraft PR implementing the same preservation of ${pcfiledir} in pkg-config files.

  • Related To: canonical/snapcraft#5158 (confidence 100%)

    Original bug report identified as fixed by this PR.

Related issues

Issue Project State Summary Similarity
#5157 Honor the ${pcfiledir} entries in pkgconfig snapcraft merged Merged in commit 0a7f753ac, preserving prefix= in relocatable pkg-config files that use ${pcfiledir}; fixes #5158.
83%
#251 repo: fix_pkg_config removes prefixes from staged snap's .pc files. craft-parts merged Merged in craft-parts#251 via 7c8140f4 (commit 359d377a), stripping staged build paths from .pc prefixes before applying the new prefix, addressing LP #1916281.
76%
#5158 Snapcraft doesn't honor ${pcfiledir} in pkgconfig files snapcraft closed Fixed ${pcfiledir} handling via snapcraft#5157 (0a7f753ac) for Core20/Core22 and craft-parts#977 (b4a09d95) for Core24+.
74%
#252 repo: fix_pkg_config trims prefixes more generically craft-parts merged Merged: generic pkg-config prefix trimming (f6681f0f, merge 789d2510), follow-up to #251 for CRAFT-1215/LP#1916281. Later reverted by #255 (e7f3fe49) after false matches when 'stage' appeared in the working-directory path.
72%