<listitem><para>Currently, this must be set to <literal>1</literal>.</para></listitem>
</varlistentry>
- <varlistentry>
- <term><varname>commit-update-summary</varname></term>
- <listitem><para>Boolean value controlling whether or not to
- automatically update the summary file after a commit. Defaults
- to <literal>false</literal>.</para></listitem>
- </varlistentry>
-
<varlistentry>
<term><varname>auto-update-summary</varname></term>
<listitem><para>Boolean value controlling whether or not to
automatically update the summary file after any ref is added,
- removed, or updated. This covers a superset of the cases covered by
- commit-update-summary, with the exception of orphan commits which
- shouldn't affect the summary anyway. Defaults to <literal>false</literal>.
+ removed, or updated. Other modifications which may render a
+ summary file stale (like static deltas, or collection IDs) do
+ not currently trigger an auto-update.
</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>commit-update-summary</varname></term>
+ <listitem><para>This option is deprecated. Use
+ <literal>auto-update-summary</literal> instead, for which this
+ option is now an alias.</para></listitem>
+ </varlistentry>
+
<varlistentry>
<term><varname>fsync</varname></term>
<listitem><para>Boolean value controlling whether or not to
* regular, setting the `ostree.summary.expires` key in @additional_metadata
* will aid clients in working out when to check for updates.
*
- * It is regenerated automatically after a commit if
- * `core/commit-update-summary` is set, and automatically after any ref is
+ * It is regenerated automatically after any ref is
* added, removed, or updated if `core/auto-update-summary` is set.
*
* If the `core/collection-id` key is set in the configuration, it will be
return TRUE;
}
-/* Regenerate the summary if `core/auto-update-summary` is set */
+/* Regenerate the summary if `core/auto-update-summary` is set. We default to FALSE for
+ * this setting because OSTree supports multiple processes committing to the same repo (but
+ * different refs) concurrently, and in fact gnome-continuous actually does this. In that
+ * context it's best to update the summary explicitly once at the end of multiple
+ * transactions instead of automatically here. `auto-update-summary` only updates
+ * atomically within a transaction. */
gboolean
_ostree_repo_maybe_regenerate_summary (OstreeRepo *self,
GCancellable *cancellable,
GError **error)
{
gboolean auto_update_summary;
-
if (!ot_keyfile_get_boolean_with_default (self->config, "core",
"auto-update-summary", FALSE,
&auto_update_summary, error))
return FALSE;
- if (auto_update_summary &&
+ /* Deprecated alias for `auto-update-summary`. */
+ gboolean commit_update_summary;
+ if (!ot_keyfile_get_boolean_with_default (self->config, "core",
+ "commit-update-summary", FALSE,
+ &commit_update_summary, error))
+ return FALSE;
+
+ if ((auto_update_summary || commit_update_summary) &&
!ostree_repo_regenerate_summary (self, NULL, cancellable, error))
return FALSE;
if (!skip_commit)
{
guint64 timestamp;
- gboolean auto_update_summary;
if (!opt_no_bindings)
{
if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error))
goto out;
-
- if (!ot_keyfile_get_boolean_with_default (ostree_repo_get_config (repo), "core",
- "auto-update-summary", FALSE,
- &auto_update_summary, error))
- goto out;
-
- /* No need to update it again if we did for each ref change */
- if (opt_orphan || !auto_update_summary)
- {
- gboolean commit_update_summary;
-
- /* The default for this option is FALSE, even for archive repos,
- * because ostree supports multiple processes committing to the same
- * repo (but different refs) concurrently, and in fact gnome-continuous
- * actually does this. In that context it's best to update the summary
- * explicitly instead of automatically here. */
- if (!ot_keyfile_get_boolean_with_default (ostree_repo_get_config (repo), "core",
- "commit-update-summary", FALSE,
- &commit_update_summary, error))
- goto out;
-
- if (commit_update_summary && !ostree_repo_regenerate_summary (repo,
- NULL,
- cancellable,
- error))
- goto out;
- }
}
else
{