4768 Commits

Author SHA1 Message Date
Alexander Larsson
cafe28f92d Update pofiles 1.1.3 2019-01-15 16:09:13 +01:00
Alexander Larsson
5880a6923f Update valgrind suppressions
This adds some new ones from new deps we picked up.
2019-01-15 16:02:34 +01: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
Alexander Larsson
ab124a3cdc Dist profile/flatpak.sh 2019-01-14 18:14:48 +01:00
Alexander Larsson
3493ed1230 Dist env.d/60-flatpak 2019-01-14 18:11:39 +01:00
Alexander Larsson
38d6e1673a Bump version to 1.1.3 2019-01-14 18:07:17 +01:00
Alexander Larsson
8ebf486152 Update NEWS for release 2019-01-14 18:07:17 +01:00
Alexander Larsson
a143161131 tests: Fix tests on intel gpus
We can't assume have-intel-gpu is not true!

Closes: #2589
Approved by: alexlarsson
2019-01-14 16:48:32 +00:00
Matthias Clasen
f2303ee4c5 Export dconf data
We want to move away from using dconf inside the sandbox,
and instead use the keyfile backend for GSettings, which
has gained the capability to read defaults and locks.

This change makes the dconf database contents and locks
available in a suitable format. The files appear inside
the sandbox in the /etc/glib-2.0/settings directory.

We only export the default values for keys in the dconf
subtree whose path matches the app id, as well as prefixes
listed in paths key from the X-DConf group in metadata.

This commit adds a new dependency, since we're now linking
against libdconf.

Closes: #2295
Approved by: alexlarsson
2019-01-14 15:34:11 +00:00
Matthias Clasen
7a6e52eca8 Add tests for appdata parsing
Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
f9c6a769ef Stop linking libflatpak against listappstream-glib
We no longer use it here. flatpak itself still links
against it. This avoids problems with consumers who
might also link against libappstream.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
5db64fe342 Add a minimal GMarkup-based appdata parser
This parser nderstands just enough appdata to pull
out the strings we want.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
728f917418 Move appdata parsing to its own file
This is just moving some code around for now.
It is still using libappstream-glib.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +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
4b3087c356 Update tests
We have tests that catch changes in the default
installation display names. Amazing

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
faab490f1e Improve FlatpakInstallation docs
Document the values returned by flatpak_installation_get_id()
and by flatpak_installation_get_display_name() for standard
installations.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
f7a566e2ab Make sure we have IDs and display names
Return non-NULL strings from flatpak_dir_get_id()
and flatpak_dir_get_display_name() for user installations,
to save library users the hassle of dealing with NULL
return values.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
eaebab1285 Translate the display name of the default installation
Change the terminology from 'directory' to 'installation',
and mark the string for translation.

Closes: #2583
Approved by: alexlarsson
2019-01-14 13:59:14 +00:00
Matthias Clasen
bd6f71a3c8 Update colum tests
We have tests for internal apis now, and they
catch when we change those apis. Yay.

Closes: #2460
Approved by: alexlarsson
2019-01-14 13:35:56 +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
71411ee88c repair: Document --reinstall-all
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
b293562ae9 repair: Document --dry-run
Also mention the need to run flatpak repair as root
when operating on system repositories.

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
Alexander Larsson
cb30e7ef4e Add deploy refs for currently deployed commit.
When we deploy e.g. app/org.foo.bar/x86_64/stable, then we
also create a deploy/app/org.foo.bar/x86_64/stable ref pointing to
the latest deployed commit. We also remove it when an app is uninstalled.

This means that a prune operation will not delete objects that are deployed
(which would not save any space anyway). This is nice because this can
happen for instance when you flatpak update --no-deploy.

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

Closes: #2563
Approved by: alexlarsson
2019-01-14 11:55:12 +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
3598cce951 Add utilities for showing/hiding the cursor
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
Matthias Clasen
9a1d7b8b92 update: Don't fail completion on empty repos
This lets completion keep working for the run command
despite an empty custom installation.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
64133a0c9b run: Don't fail completion on empty repos
This lets completion keep working for the run command
despite an empty custom installation.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
7c97271958 repair: Improve completion
Use OPTIONAL_REPO since an empty repo seems repairable,
and also dont stop completing options after the second.
This is a copy-paste error from other completion functions.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
eb48268d1b remote-add: Don't fail completion on empty repos
This lets completion keep working after you type
flatpak remote-add --installation=empty
We already use OPTIONAL_REPO in the command, so there
is really no reason to not do the same for completion.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
bb92a7abff override: Don't fail completion on empty repos
This lets completion keep working after you type
flatpak override --installation=empty

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
31c7325382 make-current: Don't fail completion on empty repos
This lets completion keep working after you type
flatpak make-current --installation=empty
It is somewhat cosmetic since there's nothing to
install on an empty repo, but no need to silently
disappear the remaining options.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
fe52e323a6 install: Don't fail completion on empty repos
This lets completion keep working after you type
flatpak install --installation=empty
It is somewhat cosmetic since there's nothing to
install on an empty repo, but no need to silently
disappear the remaining options.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
dd63d39da2 ps: Simplify completion
There are no non-option arguments here, so need
to parse. We can just complete from the available
options.

Closes: #2585
Approved by: alexlarsson
2019-01-14 11:10:17 +00:00
Matthias Clasen
15f9bbf8c6 config: Make --list and --get work on empty repos
The --list and --get implementations work just fine
on empty repos (reporting the default values). So
don't err out prematurely during option parsing.

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