← Back to issue list

appstream: support legacy ids without desktop suffix

View original Github issue

Metadata

Project
snapcraft
Number
#2758
Type
pull request
State
merged
Author
merlijn-sebrechts
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/snapcraft#2758 via 6fc81672c, adding a .desktop fallback for legacy AppStream IDs so launchers are found without launchable entries.

Resolution: closed resolved

Reason: PR #2758 was approved and merged as commit 6fc81672c, which appends .desktop to unsuffixed AppStream component IDs when discovering desktop launchers.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Some desktop launchers are not found by Snapcraft because their AppStream file doesn't include any `launchable` entries and the component id does not end in `.desktop`. This PR uses component id + ".desktop" as possible desktop file id if no launchables are found and the component id does not have `.desktop` suffix. This was originally proposed in https://bugs.launchpad.net/snapcraft/+bug/1778546 but the initial fix did not include appending the suffix. See https://github.com/snapcrafters/foliate/pull/3/files for an example of a snap using this feature.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#2758 via 6fc81672c, adding a .desktop fallback for legacy AppStream IDs so launchers are found without launchable entries.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#2758 via 6fc81672c, adding a fallback that appends .desktop to unsuffixed AppStream component IDs when no launchables exist, restoring desktop launcher discovery.
qwen/qwen3.6-35b-a3b — — Merged. Implements fallback logic to append .desktop suffix to AppStream component IDs when launchable entries are absent, fixing desktop launcher detection. Approved by two reviewers, passed CI checks, and modified three files.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for AppStream desktop launcher detection. The change appends a .desktop suffix to component IDs when launchable entries are missing, resolving issues where Snapcraft failed to locate legacy desktop files.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1778546 common-id extractor to infer launchable for legacy support snapcraft (launchpad) closed Legacy AppStream IDs now resolve desktop launchables without explicit launchable metadata; merged via snapcore/snapcraft#2435 (1cbd60b8a, 6fc81672c).
81%
#1778719 appstream support lacking provided ids (impairing backwards compat) snapcraft (launchpad) open AppStream extractor and snap.yaml `common-id` accept only one id, ignoring `<provides><id>` legacy ids used when desktop files are renamed; maintainers say it needs snapd/store support and rediscussion. Still unimplemented.
74%