Add proper AppStream metadata
Task Info (Flyspray) | |
---|---|
Opened By | Miika (miika) |
Task ID | 79811 |
Type | Feature Request |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2023-09-28 21:12:28 UTC |
Status | Assigned |
Assignee | Jan Alexander Steffens (heftig) |
Details
Currently, if you search for Firefox in an AppStream-based store like KDE Discover or GNOME Software, you get two separate results (flatpak and native package). This is because the flatpak includes proper appstream metadata, but the native package has only minimal metadata generated automatically from the .desktop file. The respective appstream identifiers are "org.mozilla.firefox" and "firefox.desktop".
This can be fixed by installing the proper metadata to "/usr/share/metainfo/org.mozilla.firefox.metainfo.xml". The file can be copied almost directly from "taskcluster/docker/firefox-flatpak/org.mozilla.firefox.appdata.xml.in", modifying only the field and app version.
Another fix would be to rename the .desktop file to org.mozilla.firefox.desktop, which would cause the generated appstream id to be correct. Having the .desktop file in reverse DNS format is also recommended by the xdg desktop-entry-spec (https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)
I'm not entirely sure if this is an Arch or upstream issue, since Arch is responsible for installing the .desktop file, and other distros like Fedora also install the appstream metadata. There's also a pull request for Debian to do the same (https://salsa.debian.org/mozilla-team/firefox/-/merge_requests/5), and an upstream bugzilla report (https://bugzilla.mozilla.org/show_bug.cgi?id=1851524).