mirror of
https://github.com/flatpak/flatpak.git
synced 2026-09-22 05:05:41 -04:00
dir: Regenerate summary in child repo after pulls
After pulling multiple refs into the child repo using P2P code, the summary file in the child repo will be the one from the last remote used. Since that remote might be a peer on the network or a USB drive, it may not have the same set of refs as were pulled into the child repo. This means that when the system helper tries to pull from the child repo into the main repo it fails because the summary file is inaccurate. This commit addresses the issue by regenerating the summary file in the child repo after the pulls finish. This has to only occur on the P2P code paths because non-P2P code uses the summary file and its signature as the security check. To check that this fixes the bug, I set up another computer on the local network as an update server and made sure it had an updated ostree-metadata ref for the remote I'm going to use. Then from this computer with the patched flatpak I installed an app that's **not** installed on the update server (all using collection IDs). Flatpak fetched the app from the Internet, fetched the ostree-metadata ref from the network peer, and then successfully pulled and deployed the app into the system repo. Fixes https://github.com/flatpak/flatpak/issues/1425 Closes: #1476 Approved by: pwithnall
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f