pull: Ignore the cancellable when aborting a transaction
In ostree_repo_abort_transaction, if we pass a cancellable and it gets canceled, then the function may fail to fully clean up the transaction state. This was happening e.g. when the ostree_repo_pull_with_options call got cancelled. To fix this, as suggested by Colin Walters, we set the passed cancellable as NULL, in order for it to be ignored. https://github.com/ostreedev/ostree/issues/1491 Closes: #1492 Approved by: jlebon
This commit is contained in:
parent
6e9d00dbeb
commit
591f8a68b1
|
|
@ -2153,6 +2153,12 @@ ostree_repo_abort_transaction (OstreeRepo *self,
|
|||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
/* Always ignore the cancellable to avoid the chance that, if it gets
|
||||
* canceled, the transaction may not be fully cleaned up.
|
||||
* See https://github.com/ostreedev/ostree/issues/1491 .
|
||||
*/
|
||||
cancellable = NULL;
|
||||
|
||||
/* Note early return */
|
||||
if (!self->in_transaction)
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue