icon is not handle properly when base is core22
Metadata
Current evaluation
Snapcraft 7.5.3 omitted a configured icon from prime/meta/gui for a no-apps core22 snap; current code installs it and has regression coverage.
Suggested action: close resolved
Reason: Commit c9d9cc227, PR snapcraft#4950, fixed icon configuration for snaps without apps, matching this reproducer. Current setup_assets code finalizes the icon before app handling and includes test_setup_assets_configure_icon_no_apps regression coverage.
Evaluated by: mr-cal-bot
Impact:
34
Quick Win:
26
Complexity:
18
Confidence:
94
Actionability:
92
Issue body
### Bug Description
The icon is not properly placed in `prime/meta/gui` when base is `core22`.
### To Reproduce
1. use the attached snapcraft.yaml and change base to `core20` or `core22`
2. build the snap (destructive-mode should work)
3. check if `icon.png` is in `prime/meta/gui`
### Environment
Ubuntu 22.04
snapcraft 7.5.3
### snapcraft.yaml
```shell
name: test-icon
base: core20
version: '0.1'
summary: test-icon
description: |
test icon handle of snapcraft
grade: devel
confinement: devmode
icon: icon.png
parts:
icon:
plugin: nil
override-build: |
cat << EOF | base64 -d >> $SNAPCRAFT_PROJECT_DIR/icon.png
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAD
HUlEQVR4nO3UMQEAIAzAMMC/5yFjRxMFvXpnZg6Q9LYDgD0GAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEG
AGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEGAGEf
HrAF/LZ/lzEAAAAASUVORK5CYII=
EOF
```
### Relevant log output
```shell
## base: core 22
$ snapcraft --destructive-mode
Executed: pull icon
Executed: build icon
Executed: stage icon
Executed: prime icon
Executed parts lifecycle
Generated snap metadata
Created snap package test-icon_0.1_amd64.snap
$ tree prime/
prime/
└── meta
├── gui
└── snap.yaml
2 directories, 1 file
## base: core20
$ snapcraft --destructive-mode
Pulling icon
+ snapcraftctl pull
Building icon
+ cat
+ base64 -d
Staging icon
+ snapcraftctl stage
Priming icon
+ snapcraftctl prime
Snapping |
Snapped test-icon_0.1_amd64.snap
$ tree prime
prime
└── meta
├── gui
│ └── icon.png
└── snap.yaml
2 directories, 2 files
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
34
Quick Win:
26
Complexity:
18
Confidence:
94
Actionability:
92
|
close resolved | Snapcraft 7.5.3 omitted a configured icon from prime/meta/gui for a no-apps core22 snap; current code installs it and has regression coverage. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
21
Complexity:
40
Confidence:
70
Actionability:
70
|
keep open | Icon specified via top-level 'icon:' key is not placed in prime/meta/gui when using base core22, but works with core20. Valid bug with clear reproducer. | |
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30
Staleness:
75
Complexity:
40
Confidence:
55
Support Request:
5
|
needs triage | Icon not placed in prime/meta/gui when base is core22 (snapcraft 7.5.3); works on core20. No maintainer response, no labels, 0 comments, last activity 536 days ago. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
40
Confidence:
85
Support Request:
10
|
close stale | Bug report regarding icon placement failure in prime/meta/gui when using base core22 instead of core20. Unaddressed for nearly three years with no maintainer interaction or labels. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
50
Confidence:
75
Support Request:
5
|
close stale | Snapcraft fails to place icon.png in prime/meta/gui when base is core22, while core20 works. Unlabelled, no maintainer comments, inactive for over a year. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#4950
(confidence 94%)
Commit c9d9cc227 is titled "fix: configure icon for snaps without apps" and directly matches the reported no-apps configuration.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4936 snapcraft 7 ignores icon path in snapcraft.yaml | snapcraft | closed | Regression in core22 Snapcraft 7 (icon not copied when no apps section) was fixed by merged PR #4950 (commit c9d9cc227, 'fix: configure icon for snaps without apps'), backported and released in 7.5.6 to 7.x/stable. |