Commit Graph

512 Commits

Author SHA1 Message Date
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
Matthias Clasen
ffef508830 repo: Improve formatting of size columns
Use the new aligned column support in the table printer.
2017-05-02 14:56:04 +02:00
Matthias Clasen
e958c15808 repo command: use FlatpakTablePrinter
This makes the output more similar to the other commands,
and will make us benefit from future improvements to the
table printer.
2017-05-02 14:56:04 +02:00
Matthias Clasen
17dd7b7861 Revise the flatpak repo command slightly
Make --info only print out general information, and add a new
option --branches which lists the per-branch information.
2017-05-02 14:56:04 +02:00
Matthias Clasen
917d404773 Merge pull request #734 from matthiasclasen/partial-extension-size
Improve display of partial extension sizes
2017-04-30 07:54:28 -04:00
Matthias Clasen
7ad15edb62 Improve display of partial extension sizes
The installed size in the metadata refers to the full
extension. If we have subpaths, the actual installed
size may be much smaller. Unfortunately, it appears
hard to obtain the actual size, so just hint at this
fact by displaying a '<' before the size.
2017-04-25 15:24:11 -04:00
Alexander Larsson
dddb4a2e44 export: Always make directories accessible
There is no reason ever to make a flatpak with a
directory that is not accessible, so make them all
readable and executable.
2017-04-24 15:51:56 +02:00
Alexander Larsson
b4ee8581c3 build-update-repo: Spawn subprocesses when generating deltas
This means we can be parallel just like we were with threads,
but we're not using an enourmous amount of memory.
2017-04-19 22:16:17 +02:00
Alexander Larsson
9e80b3a1c1 build-update-repo: Add internal function to create a single delta
We will use this later to fork per-process delta creation instead
of threaded in order to use less memory.
2017-04-19 21:20:05 +02:00
Alexander Larsson
fe56c08203 build: Always set personality to linux32 when cross-building
This means that autodetection during builds works much better.
Fixes https://github.com/flatpak/flatpak/issues/712
2017-04-19 19:36:55 +02:00
Alexander Larsson
7da0726514 build: Ensure we add the default dbus permissions
When using flatpak build, use the same default dbus
permissions (portal.*) as we do in flatpak run.

Fixes https://github.com/flatpak/flatpak/issues/717
2017-04-19 16:55:01 +02:00
Matthias Clasen
91c78e553c Quiet compiler warnings
These variables were unused.
2017-04-18 12:36:23 +02:00
Matthias Clasen
16a5188a64 Add a repo command
For now, this just prints bits of summary information in
human-readable form. This command could grow over time
to provide other functionality for managing local repositories.
2017-04-18 12:36:23 +02:00
Matthias Clasen
dbfd5d82e7 Fix a compiler warning
Unused variable...
2017-04-18 12:34:19 +02:00
Matthias Clasen
9b002821ad flatpak info: Properly handle unmaintained extensions
We were misreporting these as uninstalled.
2017-04-18 12:34:19 +02:00
Matthias Clasen
9a661fd926 flatpak info: Show more information for extensions
Show the same data the we show for other refs, when we
list extensions. In addition, show the subpaths if there
are any. Note that this reveals that the installed size
for subpath'ed extensions is misleading, since it is
the installed size for the full extension.
2017-04-18 12:34:19 +02:00
Matthias Clasen
77cec62f51 Add a --show-extensions option to flatpak info
This option makes flatpak info list the found extension
that match the given ref.
2017-04-18 12:34:19 +02:00
Matthias Clasen
1d3e3132d7 Add more useful options to flatpak info
The new options are --show-size to show the installed size,
and --show-metadata, to show the metadata file.
2017-04-18 12:34:19 +02:00
Matthias Clasen
ee54e2b099 Avoid confusing behavior of flatpak info
I have multiple branches of org.gnome.Platform install system-wide,
and non per-user. And flatpak info gives me:

flatpak info org.gnome.Platform
-> not installed
flatpak info --system org.gnome.Platform
-> multiple branches

This confusing behavior comes from the fact that we are querying
multiple locations and are not careful enough to collate the
errors we get properly. This commit changes things so that we
keep querying the next location as long as we get a 'not installed'
error, and we report the first 'multiple branches' error we get.
2017-04-18 12:34:19 +02:00
Matthias Clasen
581e6f6df5 Drop useless options from flatpak info
The --app and --runtime options are not really useful
for flatpak info, since you need to specify a full ID
anyway, and it is highly unlikely that you will have
ID clashes between apps and runtimes. Also, the options
are documented in a confusing way.
2017-04-18 12:34:19 +02:00
Matthias Clasen
81f688fc66 Fix --help output for --installation
This option takes an argument, so specify an argument
name in the GOptionEntry to make the --help output
come out right.
2017-04-10 08:12:54 +02:00
Alexander Larsson
bbf5990adc build-update-repo: g_warning doesn't need newlines in the message 2017-04-07 16:35:25 +02:00
Alexander Larsson
3f9e72c793 builder: Support sdk-extensions also for apps
For apps this just means we ensure that the required sdk extension are
available.
2017-04-04 15:52:36 +02:00
Alexander Larsson
0dcc7332f7 Handle uris better when detecting .flatpak[repo,ref] suffix
We fully parse the argument as (possibly) a uri, which means
we can handle an argument like:
 https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-builder.flatpakref?h=stable

Which doesn't work with a simple has_suffix call.
This is important because the flatpak.org site now references
these kinds of uris.

Fixes https://github.com/flatpak/flatpak/issues/659
2017-04-03 10:02:28 +02:00
Alexander Larsson
5b0ad227e8 OCI: Verify signatures 2017-03-29 17:14:36 +02:00
Alexander Larsson
68035c1e4e OCI: Support signing build-bundld --oci output 2017-03-29 17:14:36 +02:00
Alexander Larsson
11943e7e40 OCI: Support OCI with system-helper by mirroring OCI repo
This allows us (when we later add signatures) to verify
the signatures of the OCI manifest, and can thus support
the system-helper.
2017-03-29 17:14:19 +02:00
Colin Walters
64fd2c2a8d Bump libglnx, use new glnx_throw(), fix callers
One benefit here becomes immediately obvious - `flatpak_fail()` was lacking
`G_GNUC_PRINTF` which meant we missed a lot of type checking. Fix up the
callers.
2017-03-27 10:42:36 +02:00
Alexander Larsson
bf5191e401 build-export: Export all files with canonical permissions
These match what ostree checkout --user-mode will use
so that we can avoid fsck issues with bare-user-only.
2017-03-24 11:22:05 +01:00
Alexander Larsson
d7f2bf000e Re-fix typo 2017-03-16 21:21:54 +01:00
Matthias Clasen
459e1c2b31 Revert "Fix typo"
This reverts commit 0906e5a9b9.

This commit broke the build in GNOME continuous.
See http://build.gnome.org/continuous/buildmaster/builds/2017/03/16/41/build/
2017-03-16 15:08:51 -04:00