deltas: Add and document no-deltas-in-summary config option
By default this is FALSE to keep existing clients working.
This commit is contained in:
parent
effde3d513
commit
024ef1d756
|
|
@ -249,6 +249,20 @@ Boston, MA 02111-1307, USA.
|
||||||
costly).
|
costly).
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>no-deltas-in-summary</varname></term>
|
||||||
|
<listitem><para>Boolean value controlling whether OSTree should skip
|
||||||
|
putting an index of available deltas in the summary file. Defaults to false.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since 2020.7 OSTree can use delta indexes outside the summary file,
|
||||||
|
making the summary file smaller (especially for larger repositories). However
|
||||||
|
by default we still create the index in the summary file to make older clients
|
||||||
|
work. If you know all clients will be 2020.7 later you can enable this to
|
||||||
|
save network bandwidth.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5749,6 +5749,8 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||||
* commits from working.
|
* commits from working.
|
||||||
*/
|
*/
|
||||||
g_autoptr(OstreeRepoAutoLock) lock = NULL;
|
g_autoptr(OstreeRepoAutoLock) lock = NULL;
|
||||||
|
gboolean no_deltas_in_summary = FALSE;
|
||||||
|
|
||||||
lock = _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE,
|
lock = _ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
if (!lock)
|
if (!lock)
|
||||||
|
|
@ -5781,6 +5783,12 @@ ostree_repo_regenerate_summary (OstreeRepo *self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ot_keyfile_get_boolean_with_default (self->config, "core",
|
||||||
|
"no-deltas-in-summary", FALSE,
|
||||||
|
&no_deltas_in_summary, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!no_deltas_in_summary)
|
||||||
{
|
{
|
||||||
g_autoptr(GPtrArray) delta_names = NULL;
|
g_autoptr(GPtrArray) delta_names = NULL;
|
||||||
g_auto(GVariantDict) deltas_builder = OT_VARIANT_BUILDER_INITIALIZER;
|
g_auto(GVariantDict) deltas_builder = OT_VARIANT_BUILDER_INITIALIZER;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue