diff options
author | Dan Nicholson <nicholson@endlessm.com> | 2019-10-15 16:31:23 -0600 |
---|---|---|
committer | Dan Nicholson <dbn@endlessos.org> | 2023-02-07 14:50:47 -0700 |
commit | b2f02337f86efe55f56ea2ad641a55059c2a2623 (patch) | |
tree | d5fc71539454935edd1eb356925fb1806428f442 /src | |
parent | 582d7071d2d56c6250e5b338df8c403a9917856e (diff) | |
download | ostree-b2f02337f86efe55f56ea2ad641a55059c2a2623.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libostree/ostree-repo-commit.c | 3 | ||||
-rw-r--r-- | src/libostree/ostree-repo-private.h | 1 |
2 files changed, 3 insertions, 1 deletions
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 { |