Skip to content

Do not show non-applications in the installed panel

Richard Hughes requested to merge wip/hughsie/desktop into master

Using appstream-glib to parse the desktop files into fake AppStream components had a drawback: it worked too well. What we wanted to do was only show applications with AppData files in the installed list, only using the desktop metadata if the icon could not be found in the AppStream metadata.

Instead we showed all apps, even ones that would be disasterous if removed...

Lets make this simpler; we can parse the desktop file directly. We only need the icon and the component ID, so create a fake component without using as_app_parse_data() at all. This should speed up initial startup, as we're doing a lot less IO than before if there are a lot of desktop files installed.

We'll also be storing less data (e.g. translations we're never going to use) in the xmlb mmap store -- although it makes no difference to query speed it'll make a difference for storage space.

To ensure we only query AppData files for the installed list, we can now just query for the existance of the tag -- which the fake components now will not have.

So that the xmlb store is regenerated with the fix, also add the package version to the libxmlb cache guid.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1759193

Merge request reports