flatpak-builder
flatpak-builder copied to clipboard
Stop moving metadata->appdata when all runtimes support metadata
Flatpak-builder version
flatpak-builder 1.0.1
Description of the problem
The correct place for those files is metainfo, see flatpak/flatpak#30, but flatpak-builder moves them to appdata, leaving metainfo empty.
I know that the supposed "new" location is metainfo. However, there is no practical difference from using the two, except that "metainfo" doesn't work on runtimes that have older versions of the appstream-compose tool. So, we support apps that install in whichever directory, and then tweak this in f-b to support old runtimes.
Eventually we could change this i guess. As old runtimes are phased out.
OK, make sense. Maybe keep this open then though?
Sure.
How old is old here?
Looks like the 18.08 org.freedesktop.Platform runtime, which has long been end-of-life, was built with appstream-glib 0.7.10 at the beginning of its life (a version which supported /usr/share/metainfo). So it seems clear enough time has passed that we can start putting the metainfo in the correct directory in flatpak-builder, and we especially should since Appstream 1.0 will drop support for the legacy path per discussion in https://github.com/flatpak/flatpak/pull/4600.
Flatpak will need to still support apps that have metainfo in the legacy path for backwards compat, but we can export it into the new path.
For the record, it was a problem for GIMP (dev version) today. We just implemented a welcome dialog feature showing the release notes when an update (software update, not package update) happened. We are using the <release> tag contents for this, since it exists already, is widely translated already and so on. And I got the surprise when testing the generated flatpak that it failed to grab the info because it got moved to appdata/.
So anyway I am working around the issue for now, but it's not too nice that the package system moves our data like this, especially when installing it to the location recommended by specs. So I will be looking this report until it gets closed (i.e. that the file is not moved by flatpak-builder anymore) now. :-)