1141 Commits

Author SHA1 Message Date
Alexander Larsson
43fc48ea8a Fix flatpak-list --arch
It was looking at the wrong part of the ref...

Closes: #2765
Approved by: mwleeds

(cherry picked from commit c9a7dd9425)
2019-03-26 11:01:56 +01:00
AsciiWolf
98c6d0616e Fix missing translatable string
Closes: #2725
Approved by: mwleeds
2019-02-25 22:12:19 +00:00
Alexander Larsson
8b3966ecd0 Revert "cli transaction: Make the checks green"
This reverts commit e209ac9e10.

We're counting thee escape sequences as width, until we fix
this we disable this.

Closes: #2686
Approved by: alexlarsson

(cherry picked from commit 2ea428a541)
2019-02-06 11:25:35 +01:00
Alexander Larsson
06a2f4d82d Actually always return non-null from flatpak_dir_get_display_name()
This also changes this to a non-const as we need to generate it.

Closes: #2683
Approved by: alexlarsson
2019-02-05 11:45:54 +00:00
Matthias Clasen
f8dfcf66f8 Only install polkit agent when needed
We don't need a polkit agent for simple things like
flatpak --installations. Only install it for running
actual commands.

Closes: #2679
Approved by: alexlarsson
2019-02-05 10:35:26 +00:00
Mathieu Velten
65634d214c build-init: use the sdk branch from the sdk ref when checking extensions
Closes: #2664
Approved by: alexlarsson
2019-02-04 09:51:54 +00:00
Matthias Clasen
e209ac9e10 cli transaction: Make the checks green
Success ought to be green.

Related: #2671

Closes: #2676
Approved by: mwleeds
2019-02-02 01:38:32 +00:00
Alexander Larsson
f74b54503a build-commit-from: Fix the collection-ref binding
We accidentally got an extra variant making the
type variant(a(ss)) instead of just a(ss).

Closes: #2666
Approved by: alexlarsson
2019-02-01 16:48:09 +00:00
Matthias Clasen
d5e2970725 cli transaction: Adapt to an api change
In f7a566e2ab, the flatpak_installation_get_display_name()
api was changed to (almost) always return a non-NULL string. Adapt
to this change, in order to use the preferred messages here.

Closes: #2655

Closes: #2668
Approved by: alexlarsson
2019-02-01 16:30:17 +00:00
AsciiWolf
6075a5e7d0 Make the Nothing to do. string translatable 2019-01-31 15:19:29 +01:00
Simon McVittie
ea227187d4 build-export: Allow sandboxing on icon validator to be disabled
During build-time tests, we can't rely on bwrap working.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #2661
Approved by: alexlarsson
2019-01-31 14:02:24 +00:00
Matthew Leeds
2b40e68e16 build-commit-from: Fix handling of ostree.collection-refs-binding
In a previous iteration of the work for supporting multiple collection
bindings on a commit[1][2] the key ostree.collections-binding was used,
but it was decided that ostree.collection-refs-binding makes more sense.
So update build-commit-from in one place where the old key was still
being used. This impact of this bug is that we would overwrite the value
of ostree.collection-refs-binding on the new commit with the one on the
source commit (which may not have all the same collection-refs
associated with it).  However since the libostree support for that key
hasn't been merged that wouldn't cause any problems yet.

[1] https://github.com/flatpak/flatpak/pull/2634
[2] https://github.com/ostreedev/ostree/pull/1805

Closes: #2644
Approved by: matthiasclasen
2019-01-29 23:04:54 +00:00
Alexander Larsson
ed71e4680c Handle versions of appstream-glib prior to 0.5.15
These don't have AS_BUNDLE_KIND_FLATPAK, but we can just
assume all bundles are flatpak bundles in the appstream data
we get from flatpak.

Closes: #2650
Approved by: alexlarsson
2019-01-29 10:19:28 +00:00
Alexander Larsson
441c1f52ea build-commit-from: Support --extra-collection-id
If this is passed, we add an extra collection id binding to
the commit, as well as create a separate ref for that particular
collection id.

This weakly depends on:
  https://github.com/ostreedev/ostree/pull/1805
In that without that change ostree pull will not respect
multiple collection-id bindings. It will still work for
the main/first collection id though.

Closes: #2634
Approved by: alexlarsson
2019-01-28 08:37:51 +00:00
Matthias Clasen
c9430b15f8 cli transaction: Use raw mode
We don't want line editing to interfere with our
formatting, so we turn on raw mode while we do
fancy progress reporting. We use raw mode at the
same times as we hide the cursor.

This should prevent partial Escape sequences from
showing up in the output.

Closes: #2638
Approved by: alexlarsson
2019-01-25 12:03:47 +00:00
Matthias Clasen
370c667887 columns: Be more precise and helpful
Complain about ambiguous suffixes, and and spell out
the allowed values when complaining about suffixes.

Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
1770a7b600 Mention ellipsization in --columns=help output
Closes: #2624
Approved by: matthiasclasen
2019-01-23 12:45:00 +00:00
Matthias Clasen
350456abdd Turn off completion debug
This accidentally snuck in.

Closes: #2623
Approved by: matthiasclasen
2019-01-21 22:16:34 +00:00
Ryan Gonzalez
3333069a68 remote-delete: Avoid a "remote not found" error when deleting an -origin remote
Closes: #2626
Approved by: matthiasclasen
2019-01-21 22:02:35 +00:00
Ryan Gonzalez
26d2fb18fe remote-delete: Avoid deleting all refs
Fixes #2625

Closes: #2626
Approved by: matthiasclasen
2019-01-21 22:02:35 +00:00
Matthias Clasen
8f4d929e45 build-export: Use the --sandbox option for icon validation
Instead of setting up the sandbox ourselves, rely
on the --sandbox option to do so.

Closes: #2618
Approved by: alexlarsson
2019-01-21 09:17:29 +00:00
Matthias Clasen
52e511e501 info, remote-info: Use print_wrapped
This makes the NAME - DESCRIPTION line at the top
wrap nicely at word boundaries.

Closes: #2620
Approved by: alexlarsson
2019-01-21 09:01:22 +00:00
Matthias Clasen
6ad0332cca Make --columns more powerful
Allow to override ellipsization with a suffix on the colum.
Use
:s or :start for ellipsization at the start,
:m or :middle for ellipsization in the middle,
:e or :end for ellipsization at the end,
:f or :full for no ellipsization.
This can be helpful when it is important to see certain
columns in full.

Closes: #2621
Approved by: alexlarsson
2019-01-21 08:32:13 +00:00
Alexander Larsson
25c9a57ccb repair: Only warn about non-existing remotes for normal refs.
For example, someone today got warning messages for deploy refs:
 Remote (null) for ref deploy/runtime/org.freedesktop.Platform.html5-codecs/x86_64/18.08 is missing

Closes: #2611
Approved by: matthiasclasen
2019-01-18 15:02:56 +00:00
Matthew Leeds
ec61e6aac6 cli-transaction: Fix a typo
Closes: #2575
Approved by: alexlarsson
2019-01-17 07:40:29 +00:00
Matthias Clasen
f52d00f391 build-export: Use the icon validator
Validate all exported icons to be loadable png, svg or
jpeg files with a resolution of no more than 512x512.

Closes: #2523
Approved by: alexlarsson
2019-01-17 07:27:31 +00:00
Matthias Clasen
2f28a940b3 uninstall: Deal with empty installations
Don't let empty installations disrupt uninstall --all
or uninstall --unused. Just skip empty installations.

Closes: #2590

Closes: #2599
Approved by: mwleeds
2019-01-16 00:30:52 +00:00
Matthew Leeds
6bf47b4c26 app: Support DeployCollectionID in flatpakrepo
Unfortunately when I added the DeployCollectionID key for flatpakrepo
files I only added support for it in flatpak_dir_parse_repofile and
missed adding it to the remote-add command. So fix the oversight so that
flatpakrepo files that use the key are properly interpreted.

Closes: #2598
Approved by: matthiasclasen
2019-01-15 23:43:43 +00:00
Matthew Leeds
1ea2864088 Remove no longer needed #define directives
Now that we depend on libostree 2018.9, these aren't needed.

Closes: #2593
Approved by: matthiasclasen
2019-01-15 20:02:17 +00:00
Matthew Leeds
69a977d43a app: Properly return NULL not FALSE
This probably doesn't make any difference but at least the code is more
readable.

Closes: #2593
Approved by: matthiasclasen
2019-01-15 20:02:17 +00:00
Alexander Larsson
ba4463caea completion: Avoid read-past-start-of-string
This just reorders the check, so in practice it should make no difference
but it fixed a valgrind warning.

Closes: #2591
Approved by: alexlarsson
2019-01-15 12:13:15 +00:00
Alexander Larsson
76a47c28d0 completion: Add some initial sanity bounds checking to flatpak_complete
Closes: #2591
Approved by: alexlarsson
2019-01-15 12:13:15 +00:00
Matthias Clasen
9dff4bbb85 Move flatpak_dir_load_appstream_store
This function has libappstream-glib types in the
api, which we want to drop. And it is only used
in app/, so move it there.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
d1b4719ab8 table printer: Redo column handling
Move expand and ellipsize to the Column struct,
and change flatpak_table_printer_set_column_titles
to flatpak_table_printer_set_columns that sets up
not just the title, but also expand and ellipsize.

Update all callers.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
8dca651085 search: Match other lists for table setup
Use the same setup code for the columns here as
we do in in list and remote-ls. One difference
was that search was not expanding. This is now
fixed, and search behaves the same as the others.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
a8bfcb038a Fix list ellipsizing
We were inadvertedly adding extra columns when
trying to set existing columns as ellipsizable.
Oops.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
f28fa5aefd Fix remote-ls ellipsizing
We were inadvertedly adding extra columns when
trying to set existing columns as ellipsizable.
Oops.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +00:00
Matthias Clasen
e7d6d0147e remote-ls: Fix a regression
We were trying to be smart about showing origin,
but recent rearrangement of columns made us show
refs instead.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:55 +00:00
Matthias Clasen
7ade0d07fe repair: Do some basic check for remotes
We should point out if refs in the repo refer
to missing or disabled remotes, this is useful
information.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
c68bcac795 repair: Reinstall appstream too
--reinstall-all means to the re-create all checkouts,
so lets recreate appstream checkouts as well.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
b92751afa1 repair: Add a reinstall-all option
When --reinstall-all is given, re-deploy all refs,
regardless whether they were removed from the repo
or not. This can be used to ensure that directories
in the checkout have the right mode, which does not
otherwise get corrected.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
8bce4b2a49 repair: Try erasing .removed
If a .removed directory is left behind, that can
cause things to behave in confusing ways. Try to
remove it and report an error if it fails.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
79c8099881 repair: Fall back to dry-run
When operating on a system installation as non-root,
making changes will fail, and the experience is a
bit confusing. Be explicit about it.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
7dfec63d3f repair: Add an informative message
It helps to know which installation we're working on.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
5e112c8398 repair: Add a --dry-run option
This will just report inconsistencies it finds,
but not make changes.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
d0f7ca6a30 repair: Improve reporting
Don't say we have missing objects when they
are in fact invalid.

Closes: #2473
Approved by: alexlarsson
2019-01-14 13:21:12 +00:00
Matthias Clasen
e2f0a91067 remote-delete: Ask to remove refs
When --force is not given, ask the user for confirmation
whether he wants to remove refs that are installed from
the remote, and if he agrees, uninstall them.

Note that this is different from --force, which just
leaves the apps behind.

Closes: #577

Closes: #2518
Approved by: alexlarsson
2019-01-14 13:07:50 +00:00
Matthias Clasen
379e6145e8 main: Always show the cursor
When a running cli transaction is interupted by Ctrl-C,
we exit with a hidden cursor. Add a signal handler which
shows the cursor before exiting.

Closes: #2561

Closes: #2570
Approved by: alexlarsson
2019-01-14 11:41:42 +00:00
Matthias Clasen
a9388c7801 cli transaction: Use the cursor utiltiies
Closes: #2570
Approved by: alexlarsson
2019-01-14 11:41:42 +00:00
Matthias Clasen
6aa3faadfe search: Use ALL_DIRS
There is no good reason to leave out custom installations
here.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00