Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Appstream IDs differ between appdata.xml file and Flatpak metadata #2103

Closed
Pointedstick opened this issue Dec 22, 2017 · 6 comments
Closed
Assignees

Comments

@Pointedstick
Copy link

Pointedstick commented Dec 22, 2017

HexChat's Appstream ID on Flathub is io.github.Hexchat (https://github.com/flathub/io.github.Hexchat/blob/master/io.github.Hexchat.json#L2)

But HexChat's Appstream file uses a different Appstream ID: hexchat.desktop (https://github.com/hexchat/hexchat/blob/master/data/misc/hexchat.appdata.xml.in#L3)

This causes problems. The point of Appstream IDs is for each app has a unique one, but for it to be the same for that app across all distribution channels. If the same app has different Appstream IDs in different distribution channels, then it'll show up as different apps in clients that can display content from multiple sources, such as GNOME Software Center and KDE Discover. Here's what it looks like in KDE discover:

two hexchats

The top one is the Flathub version, the bottom one is provided by my distro's packages.

If you unify the AppStream IDs (ideally standardizing on a reverse-DNS style such as io.github.Hexchat), then Discover and GNOME Software (and similar apps) can perform de-duplication correctly, marking both as the same app and offering the user the choice of which version they want to install.

Note: once you change the AppStream ID, you will need to do one of the following to retain the connection between the AppStream data and the desktop file:

  • Rename the desktop file to match the AppStream ID (i.e."io.github.Hexchat.desktop")
  • Add the following line to hexchat.appdata.xml.in: <launchable type="desktop-id">hexchat.desktop</launchable>

Relevant section of the AppStream spec: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html

[note: not an AppStream expert, take this with a grain of salt, etc]

@TingPing
Copy link
Member

I believe the Flatpak can also include:

<provides>
  <id>hexchat</id>
</provides>

The only problem about this renaming is that it would break the dbus bus name but we can just not do that part here for now I suppose.

@TingPing
Copy link
Member

So I tried to fix this on the other end: flathub/io.github.Hexchat@f114c5a

Does Discover properly combine the two now?

@Pointedstick
Copy link
Author

I'm afraid not. Are your changes supposed to be instantly available, or does anything need to be regenerated/updated on the Flathub or client side?

I'll be happy to help debug this, of course.

@TingPing
Copy link
Member

They should already be there, just flatpak update --appstream (--user if needed ofc)

@Pointedstick
Copy link
Author

Thanks. They're still listed separately, though. 🙁

@TingPing
Copy link
Member

Hmm, after the holiday I'll ask the appstream dev.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants