← Back to issue list

Provide option to filter stage packages

View original Github issue

Metadata

Project
snapcraft
Number
#5485
Type
issue
State
open
Author
kubiko
Labels
Status: Triaged Type: Enhancement
Created
2025-05-12 08:15:50+00:00
Updated
2025-05-20 13:39:54+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done When migrating from base `core22` to `core24` my snap unexpectedly grew in size by 70%. While inspecting the resulting manifests, it appears that way more stage packages were pulled in unnecessarily. Be this the result of the deb package dependency change or something else, the runtime requirements of the snap did not change. Rather than filter excess files individually, an ideal option would be to allow filtering on the stage package level. For example: ``` stage-packages: - abootimg - bash - bash-completion - bc - -adduser - -llvm ``` Example snap to reproduce the issue: https://github.com/kubiko/toolbox/tree/22 https://github.com/kubiko/toolbox/tree/24 Resulting manifests: [base `core22` manifest](https://paste.ubuntu.com/p/vcMKhdwyfP/) [base `core24` manifest](https://paste.ubuntu.com/p/NS4jYZwwjq/) ### Why it needs to get done Allow additional syntax in the `stage-packages` definition, allowing filtering on the stage package level.

Evaluation history

No evaluation history available.