Skip to content

Commit

Permalink
flatpaks: When updating the cache, fetch an updated appstream file
Browse files Browse the repository at this point in the history
before creating a remote Pool.

This prevents the first cache generation from missing information
provided by xmlb lookups.

Fixes linuxmint/mint22-beta#6.
  • Loading branch information
mtwebster committed Jul 5, 2024
1 parent 0bee529 commit 62dba95
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions usr/lib/python3/dist-packages/mintcommon/installer/_flatpak.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,6 @@ def _process_remote(cache, rpool, fp_sys, remote, arch):
debug("Installer: flatpak - remote '%s' is disabled, skipping" % remote_name)
return

debug("Installer: flatpak - updating appstream data for remote '%s'..." % remote_name)

try:
success = fp_sys.update_appstream_sync(remote_name, arch, None)
except GLib.Error as e:
warn("Could not update appstream for %s: %s" % (remote_name, e.message))

# get_noenumerate indicates whether a remote should be used to list applications.
# Instead, they're intended for single downloads (via .flatpakref files)
if remote.get_noenumerate():
Expand Down Expand Up @@ -326,9 +319,16 @@ def process_full_flatpak_installation(cache):

try:
for remote in fp_sys.list_remotes():
remote_name = remote.get_name()

debug("Installer: flatpak - updating appstream data for remote '%s'..." % remote_name)
try:
success = fp_sys.update_appstream_sync(remote_name, arch, None)
except GLib.Error as e:
warn("Could not update appstream for %s: %s" % (remote_name, e.message))

rpool = Pool(remote)
rpool.update_xmlb_info()
remote_name = remote.get_name()

_process_remote(cache, rpool, fp_sys, remote, arch)

Expand Down

0 comments on commit 62dba95

Please sign in to comment.