core: fix symlink resolution in get_core_dynamic_linker
Metadata
Current evaluation
Merged fix for symlink resolution in get_core_dynamic_linker. Relative symlinks were incorrectly expanded relative to /snap/core/current, breaking classic snap builds on architectures like i386. Approved by reviewers, passed CI, and merged. Verified via integration tests.
Suggested action: —
No scores available.
Issue body
The existing code did not handle relative symlinks correctly, they were
expanded relative to /snap/core/current, not the directory they resided in.
This is why classic snap builds only worked on amd64 and ppc64el on Launchpad.
LP: [#1665165](https://bugs.launchpad.net/snapcraft/+bug/1665165)
No test because I don't see how to add one (afaict, get_core_dynamic_linker is currently untested).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for symlink resolution in get_core_dynamic_linker. Relative symlinks were incorrectly expanded relative to /snap/core/current, breaking classic snap builds on architectures like i386. Approved by reviewers, passed CI, and merged. Verified via integration tests. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for symlink resolution in get_core_dynamic_linker. Relative symlinks incorrectly expanded relative to /snap/core/current, breaking Launchpad classic builds. Verified on i386 and merged after CI fixes and maintainer review. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix correcting relative symlink resolution in get_core_dynamic_linker. Paths were incorrectly expanded relative to /snap/core/current, breaking classic snap builds on i386 and armhf. The change resolves symlinks relative to their directory, resolving Launchpad bug #1665165. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1189 core: resolve ld link first. | snapcraft | merged | Merged a fix for classic confinement builds that checks for symbolic links on the ld executable before verifying its existence. Integrated despite unrelated CI failures and pending reviews. | |
| #1600 options: fix core-dynamic-linker on ppc64el/s390x | snapcraft | merged | Merged fix for ppc64el and s390x where leading slashes in core-dynamic-linker settings caused snapcraft to incorrectly detect the core snap as uninstalled. Approved by two reviewers and merged with changes to three files. | |
| #949 project: support building classic snaps | snapcraft | merged | Added support for building classic snaps by configuring core snap paths. Reviewer feedback on architecture-specific linker paths was addressed, and the changes were approved and merged into master. | |
| #1650946 unhelpful error when building a classic snap: classic confinement requires the core_dynamic_linker to be set | snapcraft (launchpad) | closed | Abandoned due to age and zero comments. The request to improve error messaging for missing core_dynamic_linker in classic snaps received no resolution. |