From: Dan Nicholson Date: Tue, 15 Oct 2019 22:31:23 +0000 (-0600) Subject: commit: Allow skipping automatic summary generation X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~3^2~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b2f02337f86efe55f56ea2ad641a55059c2a2623;p=ostree.git commit: Allow skipping automatic summary generation If a commit is being made during summary generation, then it would trigger the summary to be generated again. That's either unwanted busy work or could result in an infinite loop. Add a boolean in `OstreeRepoTxn` to disable automatic summary generation as seen fit. --- diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 63286351..51bfd46e 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2350,7 +2350,8 @@ ostree_repo_commit_transaction (OstreeRepo *self, /* Update the summary if auto-update-summary is set, because doing so was * delayed for each ref change during the transaction. */ - if ((self->txn.refs || self->txn.collection_refs) && + if (!self->txn.disable_auto_summary && + (self->txn.refs || self->txn.collection_refs) && !_ostree_repo_maybe_regenerate_summary (self, cancellable, error)) return FALSE; diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 18e0199e..9a0ea2be 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -101,6 +101,7 @@ typedef struct { /* Implementation of min-free-space-percent */ gulong blocksize; fsblkcnt_t max_blocks; + gboolean disable_auto_summary; } OstreeRepoTxn; typedef struct {