Icons resolved from icon theme still prints error messages
Metadata
Current evaluation
Bug where icons resolved from hicolor theme still print error messages. Maintainer acknowledged and working on fix with tests.
Suggested action: keep open
Reason: The issue is a valid bug in snapcraft/parts/desktop_file.py where the code sets the resolved icon path but then falls through to check the original icon name, printing a false error. Maintainer @soumyaDghosh acknowledged the issue 44 days ago and stated they have a solution but want to add tests first, indicating active work.
Impact:
35
Quick Win:
29.75
Staleness:
45
Complexity:
15
Confidence:
85
Support Request:
0
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
In this PR, [this copilot review](https://github.com/canonical/snapcraft/pull/6329/changes#r3546625444) seems legit. After the icon is successfully resolved from icon theme, `icon` local variable is not updated and [the subsequent check](https://github.com/canonical/snapcraft/blob/e93155b28d036257570542ccfcbcb7ba9414f3e2/snapcraft/parts/desktop_file.py#L109) still fails.
### Steps to reproduce
- Create snapcraft.yaml that produces `$CRAFT_PRIME/usr/share/icons/hicolor/256x256/app/example.png`
- Create a desktop file with `Icon=example`
- Run `snapcraft pack`
- Observe that it incorrectly prints
```
Icon 'example' specified in desktop file 'usr/share/applications/example.desktop' not found in prime directory.
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
35
Quick Win:
29.75
Staleness:
45
Complexity:
15
Confidence:
85
Support Request:
0
|
keep open | Bug where icons resolved from hicolor theme still print error messages. Maintainer acknowledged and working on fix with tests. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
15
Confidence:
90
Support Request:
5
|
keep open | Bug where successfully resolved icons from themes still trigger not found errors due to an unupdated variable. Maintainers acknowledged the issue, identified the fix location, and plan to add tests. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
20
Confidence:
90
Support Request:
5
|
needs triage | Bug where icons successfully resolved from a theme still trigger a "not found in prime directory" error during snapcraft pack. Recently reported with reproduction steps and code reference. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
20
Confidence:
90
Support Request:
5
|
needs triage | Bug where successfully resolved icons from themes still trigger 'not found' errors due to an unupdated variable. Fresh report with clear reproduction steps, awaiting maintainer review. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
5
Complexity:
20
Confidence:
90
Support Request:
5
|
needs triage | Bug where icons successfully resolved from an icon theme still trigger a not found in prime directory error during snapcraft pack. Untriaged, awaiting maintainer review. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| created |
Related work
-
Related To:
snapcraft#6329
(confidence 95%)
PR #6329 introduced the icon theme resolution feature that contains this bug. The PR was merged but the bug was identified in its code review.
Related issues
No related issues found above the similarity threshold.