14 Commits

Author SHA1 Message Date
Matthew Leeds
3af605dd39 app: Don't show arch column if it's not interesting
Flatpak already doesn't show the architecture column in the output of
"flatpak list" if every flatpak has the same architecture. This commit
does the same for the table printed for install/update/uninstall
operations, except if the user specifies an arch on the command line.

Fixes https://github.com/flatpak/flatpak/issues/2794

Closes: #2930
Approved by: matthiasclasen
2019-05-30 12:12:12 +00:00
Matthew Leeds
8d962a686f Run uncrustify
I had to make a few manual edits but other than those the changes look
reasonable.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthias Clasen
0f2c45be4d 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
2019-01-11 11:42:13 +00:00
Matthias Clasen
e1d634c0dd cli transaction: Drop flatpak_cli_transaction_run
We can just implement the run vfunc now, and chain up.

Update all callers to use flatpak_transaction_run.

Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Matthias Clasen
fd44da76e3 Drop flatpak_cli_transaction_install
Move this minor convenience api into its only user.
Using only generic FlatpakTransaction apis lets us
switch out transaction instances easily.

Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Alexander Larsson
3f4518b15c Run uncrustify
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
3367938432 update: Don't update appdata if transaction was aborted by user
Closes: #1797
Approved by: alexlarsson
2018-06-19 08:30:21 +00:00
Alexander Larsson
75ba77712a transaction: Derive FlatpakCliTransaction from FlatpakTransaction 2018-05-29 16:37:21 +02:00
Alexander Larsson
d2e419418b transaction: Change from installation_create_transaction() to transaction_new_for_installation()
This way is nicer because then the user can derive from FlatpakTransaction
2018-05-29 16:37:21 +02:00
Alexander Larsson
9b8024326b 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.
2018-05-29 16:37:21 +02:00
Alexander Larsson
fd846875a2 transaction: Move already-installed skip:ing to from FlatpakTransaction to CLI 2018-05-29 16:37:21 +02:00
Alexander Larsson
cca9005a3a app: Add flatpak cli constructor
This lets us centralize in one place all setup needed for cli use
of FlatpakTransactions (like interaction and progress).
2018-05-29 16:37:21 +02:00
Alexander Larsson
9a0a2e0d50 Remove files that accidentally got commited
Closes: #1707
Approved by: alexlarsson
2018-05-24 12:18:42 +00:00
Alexander Larsson
960d20448c common: Rename all private headers to *-private.h
This is the start of the merging of lib/* into common/*

Closes: #1706
Approved by: alexlarsson
2018-05-24 11:59:52 +00:00