Commit Graph

542 Commits

Author SHA1 Message Date
Alexander Larsson
e69237f792 Handle app ids with dashes when ignoring locale/debug.
org.foo.foo-bar extensions become org.foo.foo_bar.Locale, etc, so
we need to handle this properly.
2017-05-30 18:07:46 +02:00
Alexander Larsson
005fb63cc0 list/remote-ls: Also ignore .Sources by default 2017-05-30 17:45:12 +02:00
Alexander Larsson
d1fae1f476 remote-ls: Don't show Locale/Debug and secondary arches by default.
Locale and Debug extensions, and refs for a secondary arch, when the
primary arch alternative exists, are not shown unless you specify
--all or -a.

This makes the default output more useful.
2017-05-30 17:41:24 +02:00
Alexander Larsson
f072d585b0 list: Don't list .Locale and .Debug by default (override with -a) 2017-05-30 17:41:01 +02:00
Alexander Larsson
f616ada02b build-update-repo: Remove unwanted deltas before updating summary
The list of deltas is stored in the summary, so we need to delete
them before we generate the summary, not before.

This means there is a short period where people may use the old summary
which references the old, now deleted summaries. However, that is
better than it referencing the deleted deltas forever.
2017-05-30 15:16:12 +02:00
Alexander Larsson
aeb31f7941 export: Always set a xa.ref commit metadata
This makes it easier to reverse-map from commits to refs, for
e.g. statistics, but it also in the future will allow use to
not sign the summary and still use the system-helper.
2017-05-22 17:30:04 +02:00
Alexander Larsson
23399ddc35 Use the CLI progress for update --appstream too 2017-05-22 17:01:14 +02:00
Alexander Larsson
ea2af15dc0 run: Use new flatpak_find_current_ref helper. 2017-05-22 13:12:01 +02:00
Alexander Larsson
07609559b8 progress: Don't report ??? in the bar while estimating 2017-05-18 15:37:35 +02:00
Alexander Larsson
7ac5d41bea Use the nicer progress reporting for the CLI too
We now use the same progress calculations as in libflatpak
so we get a nice progress bar also in the CLI.
2017-05-18 09:51:35 +02:00
Alexander Larsson
703a0d7900 update: flatpak update --subpath= means all subpaths 2017-05-11 12:44:15 +02:00
Alexander Larsson
3fca1584ff remote-ls: Don't rely on active symlink value, use deploy data
We want to tweak the active symlink value so we can't rely
on this being exactly the commit id.
2017-05-11 12:27:36 +02:00
Alexander Larsson
c35bce077f remote-add: Use the new system-helper for initial metadata update
This removes some duplicated code, and also follows the new
redirect-url property on initial add.

This also means we're requiring gpg signatures to be correct
on remote-add, so fix up the tests
2017-05-11 11:20:39 +02:00
Alexander Larsson
c6d4330cea export: Add install/download size and metadata to commit
This way we can faster access this when updating the
summary, and also have a way to access this in case we ever
want to not have it in the summary.
2017-05-11 10:09:39 +02:00
Matthias Clasen
3ce8be47a9 Improve error wording
I just saw a confusing error messages that looked like two error
messages just running into each other. Better to end the first
one with a colon when using g_prefix_error.
2017-05-11 08:38:01 +02:00
Matthias Clasen
9998b0e6a1 repo: Print out gpg key hash too
This seems useful, at least it shows that a key is there.
2017-05-10 16:01:24 +02:00
Matthias Clasen
c30e00eef2 Make it possible to unset values in update-repo
The underlying setters interpret NULL as 'unset this key', but
we never pass NULL. Since empty strings are not useful values
for title or default-branch or redirect-url, just interpret
an explicit empty value as 'unset this key'. E.g. to unset
the redirect url, use

flatpak build-update-repo --redirect-url= ~/my-repo/
2017-05-10 11:53:01 +02:00
Matthias Clasen
0ea9d93001 repo: Print out redirect url too
This is useful information about a repository, so make
the repo command print it out.
2017-05-10 11:53:01 +02:00
Matthias Clasen
4ecd7a9dfe Add a missing return
The compiler pointed this out.
2017-05-10 11:43:40 +02:00
Alexander Larsson
7a4c82529e Support build-update-repo --redirect-url=
When clients install/update they will see this property in the
(signed) summary and update the url in the config, making this
essentially a permanent redirect.
2017-05-09 17:02:00 +02:00
Alexander Larsson
c7f770bd7a install: Fix automatic metadata update
We should update the metadata when installing from
a regular repo, not from a bundle.
2017-05-09 17:00:55 +02:00
Alexander Larsson
21778f1075 Add support for adding new gpg keys via signed summary 2017-05-09 16:43:20 +02:00
Alexander Larsson
c89aa03695 remote-add/modify: Break out gpg loading code to helper 2017-05-09 15:56:31 +02:00
Alexander Larsson
44cf5076fa update: Split update into check_for_update and update
This way we can avoid printing "updating foo" for every
app even if there is no update.
2017-05-09 14:08:27 +02:00
Alexander Larsson
864f2def12 transaction: Always update metadata for remotes on update/install
All remotes involved in an update are updated before starting
transaction.
2017-05-09 13:25:21 +02:00
Alexander Larsson
b25987255e remote-modify: Don't modify if no arguments are specified
For instance, if we pass only --update-metadata we don't
want to get a polkit request for a no-op change.
2017-05-09 13:25:21 +02:00
Alexander Larsson
b106fd9c67 remote-modify: Never update explicitly set values
Whenever you explicitly specify some value (e.g. for
title or default-branch) we set a $KEY-is-set option
to True, and if that is set we never automatically update it.
2017-05-09 13:25:21 +02:00
Matthias Clasen
b04529dfd0 info: Print some more information
Make sure that info prints at least the same amount of
information as list -d.
2017-05-08 11:29:22 +02:00
Alexander Larsson
2b5af6a036 install: Make already-installed a warning, not an error
This seems to match what dnf and apt does, and it makes it
easier to ensure a set of apps are installed.
2017-05-04 13:48:27 +02:00
Alexander Larsson
858a4b6044 build: Kill sandbox when flatpak build dies
This ensures that no processes from the build lives
past the return of the build itself, which might
accidentally happen.

We still allow apps to stay around after the regular
flatpak run command finished though, as this is sometimes
done on purpose.
2017-05-04 10:53:48 +02:00
Alexander Larsson
08397923bf remote-ls: Fix up the column titles
The index for these were wrong.
2017-05-04 10:16:21 +02:00
Alexander Larsson
93e13a42ec run: Only forward as document if the target app can't see the file 2017-05-03 18:23:30 +02:00
Matthias Clasen
20c40149af Enable file forwarding in flatpak run
Add a --file-forwarding option for the run command, which triggers
the rest argument processing that was implemented in the previous
commit.

This is how it is used:

flatpak run --file-forwarding --command=cat \
        org.gnome.Recipes @@ $HOME/todo @@

Note that the @@ are passed as separate arguments.
2017-05-03 13:27:52 +02:00
Matthias Clasen
75b84b4bfe Include the generated document portal code in common
Move the sources from app/ to common/. We will use this
code from common/ in subsequent commits.
2017-05-03 13:27:52 +02:00
Alexander Larsson
a4b16255d5 info/list: Move subpath list to info
We just show "partial" on the list and then
the details are in flatpak info.
2017-05-03 11:28:07 +02:00
Alexander Larsson
fb6695e9a4 Add macros for common ANSI tty escape codes 2017-05-03 11:17:41 +02:00
Alexander Larsson
52be2e86c6 info: Use flatpak_fancy_output 2017-05-03 11:08:54 +02:00
Matthias Clasen
ae93d66d39 info: Preserve the previous output format
At least, to the extent that it is needed for tests to pass.
If any of --show-ref, --show-commit, --show-origin or --show-size
are given, emit the previous one-line format. Otherwise, use the
new, friendly multi-line format.
2017-05-03 11:07:52 +02:00
Matthias Clasen
91f48f51ae Don't use escape sequences unless on a tty 2017-05-03 11:07:52 +02:00
Matthias Clasen
35ca4534b3 Fix compiler warnings
Some unused variables.
2017-05-03 11:07:52 +02:00
Matthias Clasen
fb06477ff5 Improve info output
Emit more information, and format it in a better way.
2017-05-03 11:07:52 +02:00
Matthias Clasen
b176edcf07 remotes: Improve output formatting
Set column titles.
2017-05-03 11:06:43 +02:00
Matthias Clasen
4af266660c list: Improve output formatting
Set column titles, and align the size column.
2017-05-03 11:06:43 +02:00
Matthias Clasen
6d8e83f375 remote-ls: Improve the output
Add column titles, and align the size columns at the decimal point.
2017-05-03 11:06:43 +02:00
Matthias Clasen
c3e017d9de repo: Use the new number column support
This code was moved to the table printer itself.
2017-05-03 11:06:43 +02:00
Matthias Clasen
b07240f525 Use the new output helper
Instead of open-coding isatty(), use flatpak_fancy_output().
2017-05-03 11:06:43 +02:00
Joaquim Rocha
de2c6cc85b Add the possibility of installing/updating without static deltas
Sometimes we need to pull a commit without using static deltas to e.g.
make sure that an app with a corrupted commit can still be updated by
pulling the new commit in full.

This option has been added to the FlatpakUpdateFlags,
FlatpakInstallFlags, as well as a parameter for the CLI.
2017-05-02 15:05:48 +02:00
Matthias Clasen
363e03cb26 Make flatpak remote-ls show more details
Show the installed and download size for each ref,
when --show-details is given. The tabular display
could be improved by making FlatpakTablePrinter support
alignment at the decimal point.
2017-05-02 15:00:07 +02:00
Matthias Clasen
62b8ae2953 table printer: move to its own source files
This is a pretty standalone object, and it is nicer to
have it in its own files. All users have been updated
to include the new flatpak-table-printer.h header.
2017-05-02 14:56:04 +02:00
Matthias Clasen
1577c1a08e repo: Set column titles
Set column titles when printing branch information using the
table printer.
2017-05-02 14:56:04 +02:00