← Back to issue list

elf: remove all un-primed libs from soname cache

View original Github issue

Metadata

Project
snapcraft
Number
#1980
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged fix isolating Snapcraft build parts by clearing un-primed libraries from the soname cache. Resolves LP: #1752481 by preventing cross-part library conflicts. Approved by reviewer, passed CI, and changed 3 files.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? ----- Snapcraft currently resets the cache for each part, but the cache's concept of "resetting" is only to remove libs that weren't found. Caching library lookups between parts causes issues in snaps where multiple parts rely on the same lib, but they come from different places (e.g. git-ubuntu). This PR makes more progress on LP: [#1752481](https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1752481) by emptying the cache of all libs not already primed. This may slow things down a little, but will further isolate each part, preventing these kinds of issues.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix isolating Snapcraft build parts by clearing un-primed libraries from the soname cache. Resolves LP: #1752481 by preventing cross-part library conflicts. Approved by reviewer, passed CI, and changed 3 files.
qwen3.6-35b-a3b-mtp-q6 Merged. Modifies the ELF soname cache to purge unprimed libraries between build parts, resolving cross-part lookup conflicts (LP: #1752481). This enforces strict part isolation with a minor performance trade-off.
qwen3.6-35b-a3b-mtp-q6 Merged ELF soname cache updates now clear all un-primed libraries between build parts. This prevents cross-part dependency conflicts when multiple parts reference the same library from different sources, ensuring strict part isolation.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1100 repo: remove symlinks to libc. snapcraft merged Merged. Removes dangling libc symlinks in snapcraft to fix content sharing and staging build issues. Libraries are already in the core snap and standard paths, making the links redundant. Approved and merged. Resolves LP #1658774.
75%
#580 Don't copy libraries that are already in prime. snapcraft merged Merged to resolve Launchpad bug #1570895 by preventing snapcraft from copying libraries already in the prime directory. The fix adds path verification before copying, approved and merged with 93 additions across 7 files.
72%
#2256 local source: don't include .snapcraft directory snapcraft merged Resolved LP: #1791773 by merging a change that excludes the .snapcraft directory from copying and part staleness checks. Approved, passed CI, and merged with a six-line update across two files.
71%