← Back to issue list

appstream support lacking provided ids (impairing backwards compat)

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1778719
Type
issue
State
open
Author
~apachelogger
Labels
19.04 19.04-blue 19.04-external
Created
Updated
Closed
—

Current evaluation

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.

Suggested action: keep open

Reason: Code confirms the gap is still live: snapcraft/meta/appstream.py:100 reads only the root `id`, no `<provides>` parsing exists anywhere in the repo, and schema/snapcraft.json plus snapcraft/models/project.py:478 still type `common-id` as a single string. Two maintainers already triaged it — ~sergiusens noted "snapd would need to support an array for common-id and so would the store", and ~pedronis said the single-common-id decision "was agreed" and changing it "probably needs to be rediscussed somewhere a bit more visible than a bug". It cannot be completed in snapcraft alone, so it stays open as an acknowledged, upstream-blocked feature request rather than being closed.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 4 Complexity: 70 Confidence: 80 Actionability: 40

Issue body

The appstream extractor thinks one appstream file may have only one id, equally the snap apps' common-id mapping makes the same assumption. Single id isn't a thing in appstream, and hasn't been for a while: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-provides e.g. ``` <id>org.kde.newname.desktop</id> <provides> <id>oldname.desktop</id> </provides> ``` indicates that the appstream component is also "oldname.desktop" in addition to "org.kde.newname" and provides a means for backwards compatibility. The use case behind this is that if the desktop file needs to be renamed software stores will still be able to resolve the old id (e.g. uris [1]). Additionally this helps with de-duplication of overlapping entires: if the distribution repositories contains an old package which still was oldname.desktop, the software stores will be able to know that a snap providing org.kde.newname is the new variant of it and show the application as one entity as opposed to two with roughly equal data and ultimately referring to the same application (albeit in different package formats). This is a major flaw in the current implementation as this prevents id backwards compatibility. In the yaml schema there ought to be a supplemental-common-id key to list these "old" ids, or common-key needs to be changed to allow an array (with order having meaning so as to differentiate main-id from legacy ids). The appstream extractor then needs to parse <provides> ids and extend the snap.yaml of associated apps accordingly. [1] https://www.freedesktop.org/software/appstream/docs/sect-AppStream-Services-UrlHandler.html

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 4
Complexity: 70
Confidence: 80
Actionability: 40
keep 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.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 3
Complexity: 75
Confidence: 76
Actionability: 30
keep open AppStream extractor and snap.yaml `common-id` accept only a single id, ignoring `<provides><id>` legacy ids used for renamed desktop-file backwards compatibility.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 21
Complexity: 48
Confidence: 92
Actionability: 70
keep open Unresolved: AppStream provides IDs are ignored; only a scalar common-id is modeled, leaving renamed-application aliases and backward-compatible lookup unsupported.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 14
Staleness: 90
Complexity: 65
Confidence: 55
Support Request: 5
needs triage Snapcraft's appstream extractor and common-id mapping assume a single id per appstream file, ignoring <provides> ids needed for backwards compatibility and de-duplication. No maintainer response, no labels, 0 comments, last activity 2463 days ago.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 65
Confidence: 80
Support Request: 10
close stale Snapcraft's AppStream extractor ignores <provides> IDs, breaking backwards compatibility for renamed desktop files. Unaddressed for ~8 years with no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 15
close stale AppStream extractor assumes single ID per component, ignoring provides legacy IDs. Lacks maintainer feedback, references EOL Ubuntu 19.04, and has been inactive for over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 15
close stale Reports missing AppStream provides ID parsing in the snap extractor, breaking backwards compatibility for renamed desktop files. Unaddressed for over 8 years with no maintainer interaction.

Update history

Date Change
created

Related work

  • Related To: snapcraft#2758 (confidence 60%)

    Merged PR 'appstream: support legacy ids without desktop suffix' added the .desktop-suffix fallback in snapcraft/meta/appstream.py:126-130; that addresses a different legacy-id problem and does not parse <provides> ids.

Related issues

Issue Project State Summary Similarity
#2758 appstream: support legacy ids without desktop suffix snapcraft merged Merged in canonical/snapcraft#2758 via 6fc81672c, adding a .desktop fallback for legacy AppStream IDs so launchers are found without launchable entries.
74%