Refine installed system apps using their appdata too
Problem statement
Installed apps' metadata is pushed into xmlb silo from two active sources:
- App's
.desktop
file (typically atusr/share/application
) - App's app's appdata (typically at
/usr/share/metainfo
)
And a third passive source that becomes an appstream file among these search paths.
However, looking at the refining functions in appstream plugin, it seems it only takes into the .desktop
's file metadata into account and skips the metadata mentioned in it's appdata. !306 (closed) was a step into that direction to include the real appdata during refine. This is beneficially especially when there is no distro-specific appstream file shipping on OSTrees (like EndlessOS)
The problem is difficult to see as any non-OSTree distro ships many appstream files for their repos. Also I recently found out that Silverblue(an OSTree based distro) also ships a entire appstream file on it's system present at /usr/share/app-info/xmls/fedora.xml.gz
. This makes the refining of GsApp(system installed app) populate their metadata based off their appstream file instead of their appdata(see the xmlb queries in gs_plugin_refine_from_id
). EndlessOS doesn't ship any distro-specific appstream and this problem was very much evident there.
Note: We need both(.desktop
and appdata
) metadata for system installed apps because metadata like <Icon>
comes from the desktop file and <categories>
from the appdata.