diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2021-10-01 16:04:02 +0000 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-10-05 12:23:22 +0000 |
commit | c9875345959fb4a028a7596b643d922a952277d0 (patch) | |
tree | 9fde928d4c10a451b6d91fe5b1a91368fa50f00c /src/libostree/ostree-sysroot-cleanup.c | |
parent | 5bf4b1dabc12d6caee4f4899c9388a48bb4a72a3 (diff) | |
download | ostree-c9875345959fb4a028a7596b643d922a952277d0.tar.gz |
repo/private: allow committing/aborting through a transaction guard
This enhances the auto-transaction logic, augmenting the scope of a
transaction guard.
It allows committing or aborting a transaction through its guard.
It also supports tracking the completion status of a transaction
guard, avoiding double commits/aborts, while retaining the auto-cleanup
logic.
Diffstat (limited to 'src/libostree/ostree-sysroot-cleanup.c')
-rw-r--r-- | src/libostree/ostree-sysroot-cleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c index 91381cb0..c22a6851 100644 --- a/src/libostree/ostree-sysroot-cleanup.c +++ b/src/libostree/ostree-sysroot-cleanup.c @@ -445,7 +445,7 @@ generate_deployment_refs (OstreeSysroot *self, cancellable, error)) return FALSE; - g_autoptr(_OstreeRepoAutoTransaction) txn = + g_autoptr(OstreeRepoAutoTransaction) txn = _ostree_repo_auto_transaction_start (repo, cancellable, error); if (!txn) return FALSE; @@ -458,7 +458,7 @@ generate_deployment_refs (OstreeSysroot *self, ostree_repo_transaction_set_refspec (repo, refname, ostree_deployment_get_csum (deployment)); } - if (!ostree_repo_commit_transaction (repo, NULL, cancellable, error)) + if (!_ostree_repo_auto_transaction_commit (txn, NULL, cancellable, error)) return FALSE; return TRUE; |