← Back to issue list

Filter libraries included in content snaps

View original Github issue

Metadata

Project
snapcraft
Number
#6066
Type
issue
State
open
Author
mr-cal
Labels
Status: Triaged Type: Research
Created
Updated
Closed

Current evaluation

Research issue proposing snaps filter out libraries already provided by content snaps (gnome/kde/mesa) to reduce size and avoid runtime conflicts. Triaged, with recent discussion on defaults and implementation approach; no implementation yet.

Suggested action: keep open

Reason: The issue is explicitly triaged (labels 'Status: Triaged', 'Type: Research') and had substantive community discussion 87 days ago, including aleasto's concrete mesa/libdrm runtime-failure scenario and sergio-costas's remove_common proposal. No implementation exists in the codebase, and chisel (snapcraft 8.14) chisels stage-packages rather than filtering content-snap-duplicated libraries, so the open design questions (syntax, core26 defaults, curated content snap list, extension part vs post-prime step) remain unresolved.

Impact: 60 Quick Win: 12.0 Staleness: 45 Complexity: 80 Confidence: 80 Support Request: 5

Issue body

### Check existing issues - [x] I've verified that this request isn't described by any existing issues. ### Request Snaps should filter out libraries that are included in content snaps, similar to how libraries included in base snaps are filtered. This should be an opt-in mechanism for existing bases and opt-out for new bases. ### The problem it solves Content snaps, such as [gnome](https://github.com/ubuntu/gnome-sdk/tree/gnome-46-2404), [kde](https://invent.kde.org/neon/snap-packaging/kf6-core-sdk/-/tree/work.core24), and [mesa](https://github.com/canonical/mesa-2404), ship with a large set of libraries. Snaps using these content snaps often package duplicates of libraries included in the content snap. This results in larger snap sizes and a higher risk of using outdated libraries. [Many users](https://github.com/search?q=path%3Asnapcraft.yaml%20%22cleanup%3A%22&type=code) include a cleanup part to remove duplicated libraries. The [snapcrafters](https://forum.snapcraft.io/t/reducing-the-size-of-desktop-snaps/17280) and [content snap maintainers](https://canonical-ubuntu-frame-documentation.readthedocs-hosted.com/how-to/use-snap-graphics-on-base-core24/#using-the-helpers-provided) document this pattern. This cleanup part is common enough that Snapcraft should provide in-house support. ### Research needed This will require some research to decide: - Syntax in snapcraft.yaml. - Default behavior for core26. - Whether to support all content snaps or a curated list of "stable" content snaps. - We have to assume that the content snap at build-time will have the same set of libraries as the content snap installed on a user's system. - How to implement: Should it be a part added by the extensions? Or a post-prime step?

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 60
Quick Win: 12.0
Staleness: 45
Complexity: 80
Confidence: 80
Support Request: 5
keep open Research issue proposing snaps filter out libraries already provided by content snaps (gnome/kde/mesa) to reduce size and avoid runtime conflicts. Triaged, with recent discussion on defaults and implementation approach; no implementation yet.
qwen/qwen3.6-35b-a3b
Staleness: 50
Complexity: 75
Confidence: 85
Support Request: 10
keep open Research issue proposing automatic filtering of duplicate libraries from content snaps to reduce size and prevent runtime conflicts. Currently triaged and under discussion regarding implementation and opt-in/opt-out defaults.
qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 70
Confidence: 85
Support Request: 0
keep open Proposes automatic filtering of duplicate libraries from content snaps to reduce size and prevent runtime conflicts. Currently triaged and under architectural research regarding implementation details, defaults, and scope.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 60
Confidence: 90
Support Request: 0
keep open Proposes automatic filtering of duplicate libraries from content snaps during build to reduce size and avoid outdated dependencies. Currently triaged and in research phase, awaiting decisions on syntax, defaults, and implementation. Last updated 111 days ago.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#4441 (confidence 55%)

    Chisel support for core26 (snapcraft 8.14) was suggested in comments as a possible fix, but it chisels stage-packages rather than filtering libraries duplicated from content snaps.

Related issues

No related issues found above the similarity threshold.