Skip to content

Commit

Permalink
txn: Let first error win vs cancellation
Browse files Browse the repository at this point in the history
Basically since we're doing internal async ops which set the cancellable on
failure, we still want the first error to win since it'll be more useful. See
the docs for `g_task_set_check_cancellable()` for more.
  • Loading branch information
cgwalters committed Dec 12, 2017
1 parent c1c5a51 commit 02972b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/daemon/rpmostreed-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,10 @@ transaction_handle_start (RPMOSTreeTransaction *transaction,
priv->cancellable,
transaction_execute_done_cb,
NULL);
/* Some of the async ops in rpmostree-core.c will cancel,
* but we want the first error to take precedence.
*/
g_task_set_check_cancellable (task, FALSE);
g_task_run_in_thread (task, transaction_execute_thread);
g_object_unref (task);
}
Expand Down

0 comments on commit 02972b2

Please sign in to comment.