summaryrefslogtreecommitdiff
path: root/app/flatpak-builtins-update.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-01-10 19:58:33 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2019-01-11 11:42:13 +0000
commit0f2c45be4d36a76dd92b89e834ee03bf0d8c77b9 (patch)
treec8f67f6161bca0982bd70b6767ef8f48055f392f /app/flatpak-builtins-update.c
parent51a7643d41070076879bfd789271f19e911c9acc (diff)
downloadflatpak-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.c14
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)