← Back to issue list

Icons resolved from icon theme still prints error messages

View original Github issue

Metadata

Project
snapcraft
Number
#6364
Type
issue
State
open
Author
lunacd
Labels
—
Created
Updated
Closed
—

Current evaluation

Valid hicolor theme icons now rewrite and return before the stale prime-directory check, preventing the false “not found” warning reported during packing.

Suggested action: close resolved

Reason: Current code writes the resolved theme path and immediately returns before checking the original icon name, directly addressing the reported false warning. This behavior is present in f702705c6 (canonical/snapcraft#6385); a focused regression test would still be useful.

Evaluated by: mr-cal-bot

Impact: 25 Quick Win: 21 Complexity: 10 Confidence: 91 Actionability: 95

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
stealth/space-bunny-alpha
Impact: 25
Quick Win: 21
Complexity: 10
Confidence: 91
Actionability: 95
close resolved Valid hicolor theme icons now rewrite and return before the stale prime-directory check, preventing the false “not found” warning reported during packing.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 23
Complexity: 18
Confidence: 97
Actionability: 92
keep open Icons resolved from the hicolor theme are written correctly but still produce a false "not found" message. A maintainer identified a fix; regression tests remain to be added.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 30
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

  • Likely Fixed By: canonical/snapcraft#6385 (confidence 88%)

    Commit f702705c6 touched desktop-file mediation, and the current implementation now exits after successful hicolor icon resolution.

Related issues

No related issues found above the similarity threshold.