Commit Graph
2639 Commits
Author SHA1 Message Date
Matthias Clasen 153dd18a7d Implement file forwarding for flatpak_run_app
Add a flag that triggers extra processing of the 'rest'
commandline arguments, as follows: When we see arguments
that are enclosed in a pair of '@@' arguments, we interpret
them as file paths, export them in the document store, and
pass the resulting document path to the launched application.

Currently, the files are exported non-persistent (i.e. only
for the current session), and with read and write permissions
for the app.
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
Matthias Clasen 1742881509 Generate fd-passing arguments for document portal
Add an annotation that lets us pass an fd-list to
the generated wrapper around Add(). This is more
convenient than calling the method manually.

Currently, we have no callers for the wrapper, so
this does not affect any other code.
2017-05-03 13:27:52 +02:00
Alexander Larsson 6711b56794 Unset TMPDIR in the sandbox
Its quite possible that a custom TMPDIR is not mapped
in the sandbox, and /tmp is per-app anyway, so it doesn't
really make sense to use the custom one.

Fixes https://github.com/alexlarsson/spotify-app/issues/41
2017-05-03 13:25:35 +02:00
Matthias Clasen e76761e827 Don't crash if there's more titles than columns
This was crashing when running flatpak list for
an empty installation.
2017-05-03 12:40:14 +02:00
AsciiWolf 5e854403f6 Fix man page typo 2017-05-03 12:39: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 52f7d1b0f5 Update the man page a bit 2017-05-03 11:07:52 +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 ea93b3977d table printer: Use localeconv for decimal point
This gives us a chance of working correctly in exotic locales.
2017-05-03 11:06:43 +02:00
Matthias Clasen 5635adea29 Add table printer api for number columns
This is better than open-coding the decimal point
check in all the callers.
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
Matthias Clasen ecc90b95e7 Add a helper for formatted output
For now this just uses isatty(), but we might
allow overriding this with an environment variable
in the future.
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
Alexandru Băluț ad4aada754 scripts: Fix flatpak-bisect log
The script was using stdout=subprocess.STDOUT but the Popen
documentation does not mention this as a valid value.

An exception was being thrown when running flatpak-bisect <name> log:
OSError: [Errno 9] Bad file descriptor
2017-05-02 15:01:19 +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 70a56f9d60 Add an API to get the summary of a remote
This will be used by flatpak remote-ls in subsequent commits.
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 1998acb18e table printer: Only show titles on ttys
Avoid showing column titles unless stdout is a tty.
2017-05-02 14:56:04 +02:00
Matthias Clasen be92e4aa7e table printer: Support column titles
Add an api to set column titles, and format them in bold.
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 2a5ce5a05e table printer: Support column alignment
Add support for aligning columns at a certain position.
This will be used to line up numbers at the decimal point,
in future commits.
2017-05-02 14:56:04 +02:00
Matthias Clasen fbcaf05362 table printer: Introduce a cell struct
No functional change here, simply some data structure reorg,
so we can have more data for each cell in the future.
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 1137c64bf6 Document some environment variables (#754)
* Document some environment variables

These are only the most 'official' looking ones.
2017-05-02 14:52:51 +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 47c5ae9fd5 Merge pull request #745 from cgwalters/bump-libglnx
libglnx: Bump to latest master, use new file copy API
2017-04-30 07:48:47 -04:00
Matthias Clasen a6e4534997 Merge pull request #748 from nazgul77/master
Update German translation
2017-04-29 08:54:09 -04:00
Christian 2a73aa958c Merge pull request #1 from nazgul77/de-translations
Update German translation
2017-04-29 14:29:05 +02:00
Christian b1261e335c Update German translation 2017-04-29 14:27:55 +02:00
Colin Walters c50648a594 libglnx: Bump to latest master, use new file copy API
The new `glnx_regfile_copy_bytes()` is better than the previous
`flatpak_copy_bytes()` in that it will use reflink/sendfile if available.

More information in https://github.com/GNOME/libglnx/commit/3a4d0f4684f4653338c4756c8a1abfc6b5738467
2017-04-28 10:04:22 -04:00
Matthias Clasen 0b033fdc6f Merge pull request #743 from rffontenelle/patch-2
Brazilian Portuguese translation update
2017-04-27 22:33:36 -04:00
Matthias Clasen 3f2789b6f0 Merge pull request #744 from AsciiWolf/cs-update
Update Czech translation
2017-04-27 22:32:22 -04:00
AsciiWolf 9522b06a5d Update Czech translation 2017-04-27 19:39:48 +02:00
Rafael Fontenelle ea42b266ad Brazilian Portuguese translation update 2017-04-27 14:20:15 -03:00
Georges Basile Stavracas Neto 0007edb7bd Ensure commits are available when checking for extra-data
After the introduction of linear progress reports based on
heuristics, Flatpak still couldn't make precise reports for
the extra-data field is contained in the commits. When we
were setting extra-data up, Flatpak didn't have the commits,
so it always failed.

Fix that by downloading the commits first, and then setting
up the extra-data fields.

flatpak/flatpak#609
2017-04-27 17:21:29 +02:00
Rafael Fontenelle 09c070f667 flatpak-run.c: valid locations, not types
Some previous g_set_error messages were related to 'unknown type', but this one about 'unknown location'. So it would probably be best to suggest 'valid locations', instead of 'valid types'.
2017-04-27 17:20:40 +02:00
Matthias Clasen 28dc9ecb4e Merge pull request #739 from AsciiWolf/cs-update
Update Czech translation
2017-04-26 21:30:17 -04:00
AsciiWolf 1f06e04aa4 Update Czech translation 2017-04-26 23:50:43 +02:00