diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-05-25 10:53:14 +0200 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2018-05-29 16:37:21 +0200 |
commit | 9b8024326b79bb710838e10026ec8466de1bacdf (patch) | |
tree | df7dede5c31f1fcf7c42bf06dc51705373fddaeb /app/flatpak-builtins-update.c | |
parent | 95b9ce0ee52240dd6c20ad2f07f363ca0f3ccddc (diff) | |
download | flatpak-9b8024326b79bb710838e10026ec8466de1bacdf.tar.gz |
transaction: Move operation errors, aborting and skipping to CLI
We add an error signal to Transaction that the calle (cli) handles. It
decides what to do with the error and whether to continue or abort.
A new error ABORTED is returned from flatpak_run() to indicate
that it errored out because you chose to abort. We also add a new
error SKIPPED that we use to report that some operation is skipped
(due to earlier errors).
This also means we remote the stop_on_first_error argument
from flatpak_transaction_run() as this is now controlled by
the caller.
Diffstat (limited to 'app/flatpak-builtins-update.c')
-rw-r--r-- | app/flatpak-builtins-update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index de35b661..92a865a9 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -110,7 +110,7 @@ flatpak_builtin_update (int argc, for (k = 0; k < dirs->len; k++) { - FlatpakTransaction *transaction = flatpak_cli_transaction_new (g_ptr_array_index (dirs, k), opt_yes); + FlatpakTransaction *transaction = flatpak_cli_transaction_new (g_ptr_array_index (dirs, k), opt_yes, FALSE); flatpak_transaction_set_no_pull (transaction, opt_no_pull); flatpak_transaction_set_no_deploy (transaction, opt_no_deploy); flatpak_transaction_set_disable_static_deltas (transaction, opt_no_static_deltas); @@ -229,7 +229,7 @@ flatpak_builtin_update (int argc, if (!flatpak_transaction_update_metadata (transaction, n_prefs == 0, cancellable, error)) return FALSE; - if (!flatpak_transaction_run (transaction, FALSE, cancellable, error)) + if (!flatpak_cli_transaction_run (transaction, cancellable, error)) return FALSE; } } |