mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-20 14:45:30 -04:00
dir: Add flatpak_dir_resolve_p2p_refs()
This takes a list of refs + remotes and optional commit, all which need to be p2p (i.e. have collection-id != NULL) refs, and uses the p2p API to resolve the refs to the latest available commit it and the matching metadata for that version. It does this by doing a find_remotes() and then a pull_from_remotes with PULL_FLAG_COMMIT_ONLY and then extracting the metadata from the commit object. We also do some checking before pulling so that if we have the latest reported commit already available locally then we don't pull anything for that ref (instead resolving to the locally available metadata). We always pull to a child repo so that we have write-rights even as a user (in the system case) and so we can properly clean up the temporary results. Note, this unconditionally uses the p2p APIs, and it relies on the latest ostree master which has a fix that allows us to read the latest refs from the transaction. Closes: #1796 Approved by: alexlarsson
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f