Use flatpak_installation_list_installed_refs for listing installed flatpaks

Authored by apol on Wed, Sep 13, 10:26 AM.



Instead of going through a directory. This allows us to have the
FlatpakInstalledRef* tuple for each of the resources being able to fully
populate the resources with architecture, branch and origin.

This is also useful because since we have all of the information we get
to use these tuples to generate a uniqueId so they can be lookedup by
comparing it. Therefore, we remove the fallbacks on getInstalledRefForApp
and getAppForInstalledRef.

Diff Detail

R134 Discover Software Store
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Wed, Sep 13, 10:26 AM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Sep 13, 10:26 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
jgrulich requested changes to this revision.Wed, Sep 13, 1:43 PM
jgrulich added inline comments.

This will break for apps which .desktop file name doesn't match flatpak ref name. Also you can filter out runtimes and .Locale resources before you get here to avoid errors.

This revision now requires changes to proceed.Wed, Sep 13, 1:43 PM
apol added a comment.Wed, Sep 13, 2:36 PM

Here's an issue related to the next version of the patch:

apol updated this revision to Diff 19486.Wed, Sep 13, 2:38 PM

Use flatpak_installed_ref_load_metadata to read the metadata

jgrulich accepted this revision.Thu, Sep 14, 6:44 AM

Looks good now. I haven't tried it yet, but I understand what you did and it should work.

This revision is now accepted and ready to land.Thu, Sep 14, 6:44 AM
This revision was automatically updated to reflect the committed changes.