Re: Minimal changes version of new summary format for flatpak



On Thu, 2020-10-08 at 17:09 +0200, Alexander Larsson wrote:
So, my proposal is that:

 * We merge support for deltas outside the summary. Unless you 
   specially configure it ostree still adds deltas to the summary for
   backwards compat.
 * Set a key in the config file when updating the summary saying that
   deltas are available outside the summary.
 * Add a client-cached version of the remote config file, using etags
   to only update it if it changed. Ensure we have the latest version
   each time we start a pull operation.
 * If in a pull operation, if we have commit ids for all refs, we're 
   not mirroring and the (cached) config file says deltas are
available
   on the side, then don't download the summary (as we don't need
it).
   (Code-wise this is the current codepath as if the summary is 
   missing on the server).

I updated the indexed deltas PR:
https://github.com/ostreedev/ostree/pull/2188

It now avoids downloading the summary file when it is not needed, which
it is not if the repo is managed a new ostree and the pull operation
specifies the commit id for all pulled refs.

This is pretty sweet, as it will allow flatpak to do whatever it wants
for resolving refs, and its also an improvement for others that already
use ostree like this. (Forgot who said in the meeting that they do.)

For a complete flatpak solution there are some additional API calls
needed. To generate the backwards compat summary and the new
flatpak-internal summary we need to be more in control of the summary
generation, which means we need public API to:

 * sign a "summary:ish file" blob
 * lock/unlock the repo

With these flatpak can reimplement ostree_repo_regenerate_summary() to
generate a subset backwards compat summary file, and some additional
new format summary file.

I really like this approach, as it automatically makes pull more
efficient for current users (that don't need the summary) and because
it doesn't force a new complicated summary format on ostree repos that
doesn't need it.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]