Don't copy libraries that are already in prime.
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
Currently snapcraft is fooled by relative rpaths and copies linked libraries, even if they've already been primed. This PR fixes LP: [#1570895](https://bugs.launchpad.net/snapcraft/+bug/1570895) and stops that by checking each library path to ensure it hasn't already been primed before doing so.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for Launchpad bug #1570895 that prevents snapcraft from copying libraries already in the prime directory. Resolves relative rpath issues by verifying library paths before priming. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix preventing snapcraft from copying libraries already present in the prime directory. The change validates library paths before copying to eliminate duplicates caused by relative rpaths, resolving Launchpad bug #1570895. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #977 Prefer in-snap libraries to system libraries. | snapcraft | merged | Merged. Resolves Launchpad bug #1587358 by prioritizing in-snap libraries over system libraries during migration. Checks installdir, stagedir, and primedir to avoid unnecessary system library inclusion. Modified 9 files. | |
| #1980 elf: remove all un-primed libs from soname cache | snapcraft | merged | 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. |