mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-10 15:44:24 -04:00
Copying refs from the system repo into a repo on a USB drive requires the summary in the system repo to be up to date (and similarly for other flatpak installations like a per-user one). At the moment we expect the user to run `sudo ostree summary -u` before `flatpak create-usb` which is a bad user experience. Another option is to set `core.auto-update-summary` to true on the ostree repo config, but there are significant performance concerns with that: it involves updating the summary after every transaction rather than only when we need it. So this commit changes the create-usb command to use the "UpdateSummary" system-helper method to update the summary in the source repo before copying to the destination. This strategy allows us to continue to let non-root users use `flatpak create-usb`. This commit also tries to update the remote repo metadata and appstream data for each remote before copying to the USB, because we can now do that without invalidating the summary. Closes: #1945 Approved by: alexlarsson