← Back to issue list

core24: desktop: meta/gui/<app>.desktop no longer resolves snap/gui/ files after GUI asset mediation

View original Github issue

Metadata

Project
snapcraft
Number
#6519
Type
issue
State
open
Author
apotenza92
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

Regression in snapcraft 9.1.0: desktop files at meta/gui/<app>.desktop fail to resolve during mediated GUI asset packing for core24 snaps.

Suggested action: keep open

Reason: This is a confirmed regression from PR #6385 (commit f702705c6) that breaks core24 snaps using the documented `desktop: meta/gui/<app>.desktop` pattern. Maintainer @mr-cal confirmed the bug and root cause analysis. The fix is straightforward: update the fallback in `get_mediated_gui_assets()` to map `meta/gui/` prefix to `assets_dir / 'gui'` instead of `assets_dir / 'meta/gui'`. The issue is triaged, has a clear reproducer, and maintainer acknowledgment.

Evaluated by: mr-cal-bot

Impact: 75 Quick Win: 48 Complexity: 25 Confidence: 90 Actionability: 85

Issue body

### Bug Description Since the mediated GUI assets change (#6385, first released in 9.1.0), a core24 app whose `desktop:` key points at the documented `meta/gui/<app>.desktop` location fails to pack when the file is provided in `snap/gui/`: ``` Priming messenger-app Failed to generate desktop file '<project>/snap/meta/gui/facebook-messenger-desktop.desktop': file does not exist (defined in app 'facebook-messenger-desktop') ``` `get_mediated_gui_assets()` in `snapcraft/parts/setup_assets.py` looks for the desktop file at `prime_dir / app.desktop` and otherwise falls back to `assets_dir / app.desktop`: https://github.com/canonical/snapcraft/blob/main/snapcraft/parts/setup_assets.py#L178-L180 With `desktop: meta/gui/x.desktop`, that fallback is `<project>/snap/meta/gui/x.desktop`. Under mediation, `snap/gui/` is no longer copied into `prime/meta/gui/` before this lookup, so the file that older releases found at `prime/meta/gui/x.desktop` (copied from `snap/gui/x.desktop`) is not found anywhere. The fallback probably needs to map a `meta/gui/` prefix to `assets_dir / "gui"`. The same tags built fine before; the failure appeared once 9.2.1 reached `latest/stable` (2026-10-20) and the build picked it up. ### To Reproduce 1. core24 project with `snap/gui/<app>.desktop` and `snap/gui/icon.png`. 2. In `snapcraft.yaml`: `apps: <app>: desktop: meta/gui/<app>.desktop` 3. `snapcraft pack --destructive-mode` with 9.2.1 → fails at prime with the error above. Public failing run (all four amd64/arm64 builds): https://github.com/apotenza92/facebook-messenger-desktop/actions/runs/40200368535 Project file: https://github.com/apotenza92/facebook-messenger-desktop/blob/v1.4.2/snapcraft.yaml ### Environment - snapcraft 9.2.1 (snap, `latest/stable`), `--destructive-mode` - GitHub Actions `ubuntu-24.04` and `ubuntu-24.04-arm` - `base: core24` ### Workaround Copying `snap/gui/*.desktop` to `snap/meta/gui/` before packing makes the fallback path resolve, and the packed `meta/gui/<app>.desktop` is identical to the source.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b
Impact: 75
Quick Win: 48
Complexity: 25
Confidence: 90
Actionability: 85
keep open Regression in snapcraft 9.1.0: desktop files at meta/gui/<app>.desktop fail to resolve during mediated GUI asset packing for core24 snaps.

Update history

Date Change
updated
created

Related work

  • Caused By: snapcraft#6385 (confidence 95%)

    PR #6385 (commit f702705c6) introduced the mediated GUI assets flow that broke the meta/gui/ desktop file fallback path.

Related issues

No related issues found above the similarity threshold.