mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-02 12:01:32 -05:00
Currently flatpak_insallation_list_installed_refs_for_update() only checks the configured remotes for updates. This means that updates from peer sources such as USB drives or computers on the LAN are never seen, which is especially problematic when the computer is offline. The end result is that GNOME Software doesn't show an "Update" button to let you update an app from a USB drive when you're offline. This commit uses ostree API, primarily ostree_repo_find_remotes_async(), to check peer sources for updates from any remotes that have a collection ID configured. We're using an ostree 2018.5 feature from https://github.com/ostreedev/ostree/pull/1518, but I used a version check for that (it hasn't been released yet). Without it you can't tell if an offered commit is an update or a downgrade, but that behavior is still better than the status quo (no updates from P2P sources at all). Closes: #1542 Approved by: alexlarsson