txn: Let first error win vs cancellation

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.

Closes: #1137
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-12-12 13:01:48 -05:00 committed by Atomic Bot
parent 88cb736404
commit a16422484e

View File

@ -590,6 +590,10 @@ transaction_handle_start (RPMOSTreeTransaction *transaction,
priv->cancellable, priv->cancellable,
transaction_execute_done_cb, transaction_execute_done_cb,
NULL); 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_task_run_in_thread (task, transaction_execute_thread);
g_object_unref (task); g_object_unref (task);
} }