← Back to issue list

snapcraft 7 ignores icon path in snapcraft.yaml

View original Github issue

Metadata

Project
snapcraft
Number
#4936
Type
issue
State
closed
Author
mapero
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: Maintainer mr-cal merged PR #4950 (commit c9d9cc227) moving icon finalization ahead of the early return in snapcraft/parts/setup_assets.py, matching Snapcraft 6 behaviour; it was cherry-picked into hotfix/7.5 and released in 7.5.6 to 7.x/stable (excluding riscv64, see #4980), tracked internally as CRAFT-3189.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description I have minimal example of a snapcraft.yaml ``` name: icon-snap base: core22 version: '0.1' summary: icon snap icon: icon/icon.png description: minimal grade: stable confinement: strict parts: my-part: plugin: nil ``` It seems like the icon is not copied when there is no "apps" section defined in the snapcraft.yaml in snapcraft 7. With snapcraft 6 or legacy the icon is copied into the snap: With snapcraft 6 / legacy ``` prime/ └── meta ├── gui │ └── icon.png └── snap.yaml 2 directories, 2 files ``` With snapcraft 7 ``` prime/ └── meta ├── gui └── snap.yaml 2 directories, 1 file ``` ### To Reproduce Build the following snap with snapcraft 7: ``` name: icon-snap base: core22 version: '0.1' summary: icon snap icon: icon/icon.png description: minimal grade: stable confinement: strict parts: my-part: plugin: nil ``` ### Environment Ubuntu 22.04 LTS ### snapcraft.yaml ```shell name: icon-snap base: core22 version: '0.1' summary: icon snap icon: icon/icon.png description: minimal grade: stable confinement: strict parts: my-part: plugin: nil ``` ### Relevant log output ```shell NA ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Snapcraft 7 skipped icons for snaps without apps. PR #4950 (commit c9d9cc227) restored asset setup, and the fix shipped in Snapcraft 7.5.6.
qwen/qwen3.6-35b-a3b — — Fixed a regression where snapcraft 7 ignored the icon path when the apps section was missing. Resolved via PR #4950 by correcting asset setup order. Released in snapcraft 7.5.6 and version 8.
qwen/qwen3.6-35b-a3b — — Fixed via PR #4950. A regression causing snapcraft 7 to ignore the icon path without an apps section was resolved by correcting asset setup logic. The patch was merged and released to the 7.x/stable branch, excluding riscv64.
qwen/qwen3.6-35b-a3b — — Fixed via PR #4950 by correcting icon asset finalization logic. The snapcraft 7 regression ignoring icon paths without an apps section was resolved and backported to the 7.x/stable release channel, excluding riscv64.
qwen/qwen3.6-35b-a3b — — Fixed a regression where snapcraft 7 ignored the icon path without an apps section. Corrected asset setup execution order. Merged via PR #4950 and released to 7.x/stable, excluding riscv64.
qwen3.6-35b-a3b-mtp-q6 — — Fixed a Snapcraft 7 regression where the icon field was ignored without an apps section. Root cause identified in setup_assets.py. Patch merged via #4950 and released to 7.x/stable and 8.x, excluding riscv64.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4950 (confidence 99%)

    Merged PR 'fix: configure icon for snaps without apps' by mr-cal, commit c9d9cc227, closing this issue.

  • Related To: canonical/snapcraft#4980 (confidence 70%)

    Referenced by mr-cal when announcing the 7.5.6 release to 7.x/stable for all arches except riscv64.

Related issues

Issue Project State Summary Similarity
#4950 fix: configure icon for snaps without apps snapcraft merged Maintainer mr-cal's PR merged (commit c9d9cc227), fixing a core22 regression where Snapcraft 7 skipped icon configuration for snaps with no apps. Fixes #4936, landed via hotfix/7.5 and released in 7.5.6.
79%
#1759090 snapcraft snap doesn't have an icon snapcraft (launchpad) closed Snapcraft’s logo was added as the snap icon via PR #3702, merged as commit 2ccd3bdf5.
73%
#4402 icon is not handle properly when base is core22 snapcraft open 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.
73%
#1567041 snapcraft init creates icon entry snapcraft (launchpad) closed Fixed by merged ubuntu-core/snapcraft#433 (commit af86cddce): snapcraft init no longer generates an icon entry.
71%
#914 meta: icon is now dedeprecated snapcraft merged PR #914 merged as commit 4a4435cbe, re-deprecating the icon deprecation: the icon entry in snapcraft.yaml is again the preferred method, overriding any icon in the setup directory (LP: #1610268).
71%
#1578231 Your first snap: Use of icon in snapcraft.yaml is deprecated snapcraft (launchpad) closed Docs fixed in canonical/snapcraft#542 (commit a9f2a7d7a): the 'Your first snap' tutorial now tells users to place icon.png/icon.svg under setup/gui instead of the deprecated icon key. Shipped in snapcraft 2.10+16.10 and 2.10.1.
70%