This tests the situation when we can't accommodate
the requested width with the available shrinkage.
This used to cause an infinite loop in the table
printer.
Closes: #2498
Approved by: matthiasclasen
We may not want to guarantee all the formats that this
datetime parser accepts, but NOW seems useful enough and
is already mentioned in flatpak-build-commit-from(1).
Closes: #2498
Approved by: matthiasclasen
Add another test that links against libflatpak-common.la
and tests functions that are not part of the public
library api.
Closes: #2498
Approved by: matthiasclasen
Use the same function that flatpak uses to parse this
field from metadata to ensure that we don't accept
invalid data.
Closes: #2498
Approved by: matthiasclasen
It is possible for self->repo to be NULL, therefore
call flatpak_dir_ensure_repo() in a bunch more places,
before accessing self->repo.
Closes: #2483Closes: #2484
Approved by: matthiasclasen
This is a bit more flexible than "All of the above",
in that it allows to select a subset of the available
choices.
Closes: #2559
Approved by: alexlarsson
This is a variant that allows to enter multiple numbers,
either individually, or as range. Parts can be separated
by space or comma. Examples:
1-3,5
1 2 4
6
Closes: #2559
Approved by: alexlarsson
This uses less horizontal space, given that all the elements in the
column is one-character strings. Also, Op seems to better describe this
than Change.
Closes: #2560
Approved by: alexlarsson
In some cases, when NULL was passed for an OstreeProgress,
the library code would instantate its own progress object
and write progress information out to the console. That
is not a good thing for a library to do - it has the
potential to mess up the cli tools output.
Stop doing this, and require that all callers pass
a non-NULL progress.
Closes: #2468
Approved by: alexlarsson
The new function, flatpak_compete_columns, takes an array
of Column structs and completes a --columns= option.
Unfortunately, bash completion does not let us do better
than repeating the entire list of columns for every
possible completion. This is not ideal, but at least
it gives good results for the first column.
Closes: #2445
Approved by: alexlarsson
Ostree just gives us a generic G_IO_ERROR_FAILED (boo!),
so we need to scrape the message to infer that this was
out-of-space. Translate this to an explicit error code
that we handle in the UI.
Closes: #2477
Approved by: alexlarsson
test-info.sh was needlessly relying on the exact output
of flatpak info --show-extensions. Update it to match the
new output.
Closes: #2502
Approved by: alexlarsson
printf(), and by extension, g_print() interprets
field width in terms of bytes, not characters.
Therefore, using %*s for padding strings with
non-ASCII characters does not work. Instead, use
the new utility function for aligned lines.
Closes: #2502
Approved by: alexlarsson
printf(), and by extension, g_print() interprets
field width in terms of bytes, not characters.
Therefore, using %*s for padding strings with
non-ASCII characters does not work. Instead, use
the new utility function for aligned lines.
While we are doing this, also fix up the alignment of
the extension sections in the output.
Closes: #2502
Approved by: alexlarsson
Add a new utility for printing
TITLE: value
while properly handling Unicode wrt to alignment.
This will be shared between info and remote-info.
Closes: #2502
Approved by: alexlarsson
We are allowing Unicode output, so we need to
use g_utf8_strlen whenever we want to count the
number of columns occupied by a string.
Closes: #2502
Approved by: alexlarsson
Be more systematic about returning FLATPAK_ERROR unmodified
and wrap everything else in a G_DBUS_ERROR_FAILED.
Closes: #2391Closes: #2532
Approved by: alexlarsson
These options were not showing up in completion,
and, if present in the commandline, would prevent
further completion, despite being accepted by
the run command.
Closes: #2534
Approved by: alexlarsson
The info command has its own --system/--user/--installation
options, but it was not setting a name for the argument
of --installation. This was showing up in the completion
missing a '=' after --installation.
Closes: #2534
Approved by: alexlarsson
I was seeing some issues because make check was
picking up a custom installation that was defined
in /etc/flatpak/installations.d/ on my system.
Avoid that by pointing FLATPAK_CONFIG_DIR at
a non-existing place.
Closes: #2534
Approved by: alexlarsson
Move this typedef to flatpak-complete.h, where it
belongs. Also add a autoptr definition for it and use
it to avoid leaking the completion in flatpak-main.c.
Closes: #2534
Approved by: alexlarsson