Commit Graph

4651 Commits

Author SHA1 Message Date
Robert McQueen
148db9eb5a app/flatpak-builtins-update: skip refs from unreachable remotes
Allow refs to be added to the update operation in "flatpak update" even if some
of the matching group have a missing remote. In the case this leaves the
transaction empty, the "nothing to do" error will be printed after the
transaction is run.
2019-01-11 14:46:04 +00:00
Matthias Clasen
6f77da3499 Add some tests for flatpak config
Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
d3b1b86f04 Add tests for ONE_DIR commands
Check that we consistenly reject specifying multiple
installations for commands that only accept one.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
4fc5f54075 Add some completion tests
Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
eb950c6502 update: Use ALL_DIRS for completion
It does not change the outcome, but it is nicer
to use the same value in coomplete as for the
main function.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
c58e21f30d repair: use ONE_DIR for completion
Since we only accept one dir here.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
75e809bb1a install: Use ONE_DIR flag
Since you can't really install in more than
one location at a time.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:36 +00:00
Matthias Clasen
207419b168 override: Fix completion for --system/--user
These options were not showing up in completion,
despite being accepted by the override command.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
ddd73c98e5 run: Fix completion for --system/--user
These options were not showing up in completion,
and, if present in the commandline, would prevent
further completion, despite being accepted by
the run command.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
d07e85d8ad info: Fix the --installation arg name
The info command has its own --system/--user/--installation
options, but it was not setting a name for the argument
of --installation. This was showing up in the completion
missing a '=' after --installation.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
d7d317dfe1 history: Complete --user/--system
This was missing from the completion function.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
456e1d569a tests: Ignore custom repos
I was seeing some issues because make check was
picking up a custom installation that was defined
in /etc/flatpak/installations.d/ on my system.
Avoid that by pointing FLATPAK_CONFIG_DIR at
a non-existing place.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
7ba9af1e24 Handle FLATPAK_CONFIG_DIR/remotes.d not existing
OSTree does not like being given a nonexisting directory
here, so check and pass NULL if thats the case.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
3f717cfb83 Move the typedef for FlatpakCompletion
Move this typedef to flatpak-complete.h, where it
belongs. Also add a autoptr definition for it and use
it to avoid leaking the completion in flatpak-main.c.

Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +00:00
Matthias Clasen
76ca86b251 Cosmetics
Closes: #2534
Approved by: alexlarsson
2019-01-11 12:40:35 +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
51a7643d41 Document the new options
Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Matthias Clasen
e1a68f9e8b repair: Use a quiet transaction
When reinstalling refs during repair, the formatted
output of FlatpakCliTransaction is not appropriate.
Use a FlatpakQuietTransaction instead.

Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Matthias Clasen
7fc4c5f93f install, uninstall, update: Add a --noninteractive option
When --noninteractive is given, use the new FlatpakQuietTransaction.

Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Matthias Clasen
a4ea1dc653 Fix a typo
I wonder how the compiler made sense of this.

Closes: #2556
Approved by: alexlarsson
2019-01-11 11:42:13 +00:00
Matthias Clasen
b070b3ccd7 Add FlatpakQuietTransaction
This is FlatpakTransaction subclass that doesn't ask questions
only talks the bare minimum.

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
45860c56f2 transaction: Add a run vfunc
This lets us avoid extra api FlatpakCliTransaction.

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
Matthias Clasen
497b784d21 doc: Add a missing comma
Fix a pervasively copied typo.

Closes: #2553
Approved by: matthiasclasen
2019-01-09 18:45:38 +00:00
Matthew Leeds
92d07b2f8d README: Tweak wording 2019-01-09 07:57:55 -08:00
AsciiWolf
8685c59249 Update Czech translation
Closes: #2550
Approved by: matthiasclasen
2019-01-09 13:32:39 +00:00
Matthias Clasen
d2301bed53 installed ref: Plug a few memory leaks
All the appdata strings were not freed. Oops.

Closes: #2521
Approved by: mwleeds
2019-01-09 05:20:13 +00:00
Matthias Clasen
1dff114e1d info: Add a missing check
Don't consider 'Version:' for indentation when we
don't have version information to show.

Closes: #2521
Approved by: mwleeds
2019-01-09 05:20:13 +00:00
Matthias Clasen
894d61a363 info: Show license information
This seems the right thing to do.

Closes: #2521
Approved by: mwleeds
2019-01-09 05:20:13 +00:00
Matthias Clasen
d57ead8acd remote-info: Show license information
Keep in sync with the info command.

Closes: #2521
Approved by: mwleeds
2019-01-09 05:20:13 +00:00
Matthias Clasen
6161a43f97 Add license to the appdata fields we extract
This was requested before, so might as well add
it at the same time.

Closes: #2521
Approved by: mwleeds
2019-01-09 05:20:13 +00:00
Matthias Clasen
7914fac2fd Merge pull request #2546 from mwleeds/readme-tweaks
README: Tweak a few things
2019-01-08 23:06:19 -05:00
Matthew Leeds
3cf05140d6 fixup! README: Tweak a few things 2019-01-08 14:50:46 -08:00
Matthew Leeds
bc7063a1b8 README: Tweak a few things 2019-01-08 14:20:58 -08:00
Matthias Clasen
60b63bdb89 README: Add a link to distibution hints
I've started a wiki page for this.

Closes: #2545
Approved by: mwleeds
2019-01-08 22:04:39 +00:00
Matthias Clasen
43440454af README: some Formatting tweaks
Fix capitalization of Flatpak in a few places,
and make directory names appear as such.

Closes: #2545
Approved by: mwleeds
2019-01-08 22:04:39 +00:00
Matthew Leeds
d157d9ea18 list: Reserve -a to mean --all
When the --app-runtime option was added to the list command, -a was made
its shortcut, but this already belongs to --all, so return it to the
latter.

Closes: #2543
Approved by: matthiasclasen
2019-01-08 12:29:14 +00:00
Matthias Clasen
f2c5747849 Simplify flatpak_option_context_parse
Express more directly what we want to ensure here:
Exactly one of these flags must be set.

Closes: #2510
Approved by: mwleeds
2019-01-08 07:04:54 +00:00
Matthias Clasen
6e11cf85b1 Make progress bar faint
The solid blocks are very prominent when used
at full intensity. Lets tone them down.

Closes: #2469
Approved by: mwleeds
2019-01-08 06:08:56 +00:00
Matthias Clasen
5c89d2582a Merge pull request #2506 from matthiasclasen/installation-completion
Add completion for --installation=
2019-01-07 21:51:45 -05:00
Matthias Clasen
084b518c4e Add completion for --installation=
Complete all the things.
2019-01-07 21:49:13 -05:00
Matthias Clasen
9f06ec5775 Fix coverage for system helper and portal
These services were not generating coverage data
because they always get ended by GDBus raising
SIGTERM when the bus goes away. Prevent this by
telling GDBus not to do that, and let the services
exit regularly, on their own terms.

This makes the system helper code show up in the
coverage statistics.

Closes: #2530
Approved by: matthiasclasen
2019-01-08 02:10:35 +00:00
Matthias Clasen
9884b056fd Fully translate a prompt
We were not translating the strings 'user' and 'system'
here, although we should.

Closes: #1984

Closes: #2520
Approved by: matthiasclasen
2019-01-08 01:56:25 +00:00
Matthias Clasen
bb17ea5786 remote-ls: Ellipsize the same columns as list
The columns show the same content, so we should
treat them the same for sizing.

Closes: #2497
Approved by: matthiasclasen
2019-01-08 01:40:54 +00:00
Matthias Clasen
1214390c8a list: Ellipsize options too
The options column shows eol messages, which are long.

Closes: #2497
Approved by: matthiasclasen
2019-01-08 01:40:54 +00:00
Matthias Clasen
3548184020 Merge pull request #2522 from matthiasclasen/doc-cosmetics
Improve appdata getter docs
2019-01-07 20:33:46 -05:00
Matthias Clasen
cefbbd6e59 table printer: Report actual width
When we can't shrink all the way to the desired
number of columns, report the actual width we've
achieved.

Closes: #2496
Approved by: matthiasclasen
2019-01-08 01:11:49 +00:00
Matthias Clasen
f4e42ec071 table printer: Be more careful with shrink
Ensure that 0 <= shrink[i] <= widths[i],
to avoid bad situations.

Closes: #2496
Approved by: matthiasclasen
2019-01-08 01:11:49 +00:00
Matthias Clasen
a133041bdd table printer: Don't loop forever
After ellipsizing nicely, we try to spread the extra
shortfall around, but we need to stop when we've
exhausted the available shrinkage and give up.

Some tables are just too wide.

This was showing up as an infinite loop with

flatpak remote-ls --columns=app,opt flathub

Closes: #2496
Approved by: matthiasclasen
2019-01-08 01:11:49 +00:00