← Back to issue list

snap packaging: fix broken path check when copying local icon

View original Github issue

Metadata

Project
snapcraft
Number
#3380
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #3380 fixed copying local icons referenced by desktop files and added spread-test coverage for the previously missed AppStream path.

Resolution: closed resolved

Reason: PR #3380 was approved and merged into Snapcraft. It corrected the local icon source-path check and added a regression scenario that forces discovery through the desktop file.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If an icon is picked up from the desktop file, it would fail to copy due to incorrect source parameter for file copy The appstream-desktop spread test never picked up this case: (1) icon is specified in appstream-desktop metainfo (2) Snapcraft will parse metainfo from a file found relative to src and build. In these cases, extract() is never called to search the `install` directory, which is where the desktop file is found. This introduces another test case to pick this up. It reuses the appstream-desktop snap, but strips icon from metainfo, forcing the parsing of the desktop file. This also requires that the snap now install metainfo so Snapcraft will properly find the desktop file. It is interesting that Snapcraft is rewriting the desktop file Icon to point to the meta/gui/icon.svg now that the metainfo is installed in the snap. It's functionally the same because the icon matches, but it is a strange change in behavior... Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #3380 fixed copying local icons referenced by desktop files and added spread-test coverage for the previously missed AppStream path.
stealth/space-bunny-alpha — closed resolved Merged PR #3380 (commit f53003d31) fixed local desktop-file icon copying by correcting the source path check and adding regression coverage.
stealth/space-bunny-alpha — closed resolved Merged PR #3380 fixed local icon copying by correcting the source path check, adding regression coverage, and installing metainfo so Snapcraft could find the desktop file.
qwen/qwen3.6-35b-a3b — — Merged fix for broken path check when copying local icons from desktop files. Corrects the source parameter for file copying, adds a regression test, and ensures metainfo installation for proper desktop file discovery.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for broken path check when copying local icons in snap packaging. Corrects the source parameter for file copying and adds a test case covering desktop file icon parsing. Authored by maintainer cjp256.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2512 many: better handling of appstream icons snapcraft merged Merged in PR #2512 (commit 9e8601b80): AppStream stock icons are resolved at packaging time, with desktop-file icons used as fallback.
75%
#3241 snap packaging: fetch remote icons configured via appstream snapcraft merged Merged PR #3241 (commit 5158fe2fd, 'meta: fetch remote icons configured via appstream') by cjp256: consolidated icon handling into _finalize_icon() and allowed http(s) URLs in the icon schema.
73%
#2952 spread: introduce appstream parse-info test snapcraft merged Merged in #2952 via 969af6c98, adding a spread test for AppStream adopt-info/parse-info data and ${SNAP} rewriting of desktop icon paths.
71%