Skip to content
Verified Commit dd378eb8 authored by ivan tkachenko's avatar ivan tkachenko 🗯
Browse files

FlatpakReference: Port metadata and overrides to a list of files

This is only porting API change. Functionally, permissions model works
the same as before, meaning that it still only loads defaults from the
base metadata file.

Let's go over the changes in this patch:

- FlatpakHelper got new getters for various Flatpak directories. They
  are modular and efficient now (using static local caching).
- Moved user-level overrides directory creation to PermissionModel's
  writeToFile() method, because it might have been removed between
  calls to the old permissionsDataDirectory() function and the actual
  config writing. And to make the new userOverridesDirectory() function
  pure. Pure functions are cool.
- Metadata is no longer loaded in memory, it's just the first file path
  in the list of loaded configs now.
- Refactor of FlatpakReferencesModel constructor: factored out some GLib
  code, split system and user installation processing to be able to
  locate their metadata correctly. It now also passes all the overrides
  levels to FlatpakReference constructor.
- The rest is just porting to the new API.

(cherry picked from commit d296ba21)
parent 7a1dcfd7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment