diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-01-10 19:58:33 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2019-01-11 11:42:13 +0000 |
commit | 0f2c45be4d36a76dd92b89e834ee03bf0d8c77b9 (patch) | |
tree | c8f67f6161bca0982bd70b6767ef8f48055f392f /app/flatpak-builtins-update.c | |
parent | 51a7643d41070076879bfd789271f19e911c9acc (diff) | |
download | flatpak-0f2c45be4d36a76dd92b89e834ee03bf0d8c77b9.tar.gz |
Drop flatpak_cli_transaction_was_aborted
We can look at the error that is returned
by flatpak_transaction_run, no need for this
cli-transaction specific api.
Note that we need to be a little careful to
return the expected error: when there is
an operation error, we need to return that,
instead of an ABORTED error.
Update all users.
Closes: #2556
Approved by: alexlarsson
Diffstat (limited to 'app/flatpak-builtins-update.c')
-rw-r--r-- | app/flatpak-builtins-update.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index 39b2ca60..5eed12be 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -252,14 +252,18 @@ flatpak_builtin_update (int argc, continue; if (!flatpak_transaction_run (transaction, cancellable, error)) - return FALSE; + { + if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED)) + { + g_clear_error (error); + return TRUE; + } + + return FALSE; + } if (!flatpak_transaction_is_empty (transaction)) has_updates = TRUE; - - if (FLATPAK_IS_CLI_TRANSACTION (transaction) && - flatpak_cli_transaction_was_aborted (transaction)) - return TRUE; } if (!has_updates) |