Skip to content

Find AppStream metadata in every possible location

Matthias Klumpp requested to merge wip/mak/swcatalog into main

Hi! AppStream Metadata can currently be found in:

Modern:
 MetaInfo data:
  /usr/share/metainfo
 Catalog Data:
  /usr/share/swcatalog/(xml|yaml)
  /var/(lib|cache)/swcatalog/(xml|yaml)

Legacy:
 MetaInfo Data:
  /usr/share/appdata
 Catalog Data:
  /usr/share/app-info/(xml|xmls|yaml)
  /var/(lib|cache)/app-info/(xml|xmls|yaml)

With this patch, we search them all, and don't monitor any locations that have a compatibility symlink created, so we don't load data twice for no reason.

I did switch the "external data install" stuff to the newer locations, this should not cause any issues as far as I can see (we still load data from every location after all), unless you downgrade GNOME Software, which I think is unlikely (I also don't know if that feature is even in use today). This patch also doesn't touch anything related to Flatpak, as that is its own thing.

Tested this locally in quite a few scenarios (with symlinks, without, with only new directories, etc.) and GNOME Software behaves as usual.

Edited by Matthias Klumpp

Merge request reports