The manpage description for flatpak-update's --appstream option says it
updates appstream data for the remote, but it's unclear that the remote
should be passed on the command line instead of a ref. This commit
updates the manpage to document that form of the command.
Closes: #1177
Approved by: alexlarsson
This variable is never actually read, as it is protected by
the ostree_metadata_checksum check, but some compilers warn about it.
Closes: #1178
Approved by: mwleeds
* Update appstream data on "flatpak update"
This is especially useful since we now have flatpak search which uses
this data.
* fixup! Update appstream data on "flatpak update"
If a remote has an empty url (which can happen for automatically created
remotes from some bundle files) we can't fetch from it. So for example
if you use "flatpak remote-ls --updates" it gives you a cryptic error
message from OSTree ("Failed to parse uri: "). This commit changes
flatpak to instead print an error message that mentions the remote name.
For backwards compatibility reasons, a remote with an empty url is
considered disabled, so say so.
Closes: #1165
Approved by: alexlarsson
Sometimes fetching a remote repository's summary file fails and it can
be hard to tell what went wrong because even with --verbose flatpak
doesn't tell you which remote it's fetching from. Add a debug statement
to fix that.
Closes: #1165
Approved by: alexlarsson
Due to the way as_app_search_matches() works, "flatpak search" only
checks if the search text is a prefix of an element of the app ID, not
if it's any substring. Add a substring check, so for example you can
find SuperTuxKart using "flatpak search tuxkart".
Closes: #1161
Approved by: TingPing
The code assumes that *all* refs in a remote contain a slash, which
technically is not the case, and pragmatically is definitely not the
case once the remote has an ostree-metadata ref.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1153
Approved by: mwleeds
If `flatpak repo --info` is run on a repository which doesn’t have a
summary file, or an ostree-metadata branch, it previously printed a very
unhelpful, unadorned, ‘No such file or directory’. Add a bit more
context to that error message.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1155
Approved by: cgwalters
On RHEL7 compiler I got things like:
app/flatpak-builtins-search.c:196:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (guint j = 0; j < remote_stores->len; ++j)
Maybe we should allow this and tweak the warnings, but for now, just make it build.
Closes: #1151
Approved by: alexlarsson
This allows searching for applications easily greatly improving
the UX of the cli. This relies upon appstream data which currently
must be updated with `flatpak update --appstream`.
Closes: #1136
Approved by: mwleeds
This introduces no functional changes, but makes it a bit more obvious
that we do temporarily have ownership of the FlatpakInstallation
instance.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1138
Approved by: alexlarsson
If a particular system installation is inaccessible (for example,
because it doesn’t currently exist, and we don’t have permissions to
create it), don’t error out of flatpak_get_system_installations().
Instead, do what the documentation says will happen, and ignore the
failure (emit a warning message about it).
The function continues to return an error if *no* installations could be
found.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1138
Approved by: alexlarsson
The commitstate check in parent dir was fixed in ostree 2017.13,
so we only apply the workaround for previous versions.
Closes: #1131
Approved by: alexlarsson
The return value of flatpak_deploy_data_get_subpaths needs a (shallow)
free, so put it in a separate autofree variable.
Closes: #1126
Approved by: alexlarsson
This is a mostly trivial conversion to use FlatpakBwrap instead
of separate argv_array/fd_array/envp variables. Anywhere it is
trivial to pass the bwrap we do, but for anything complicated
we keep the old code with separated args.
Closes: #1114
Approved by: alexlarsson
This is a wrapper around the argv, envp and fd array that
are used in the code when invoking bubblewrap. We collect them
in a single object to avoid passing a lot of arguments around.
Closes: #1114
Approved by: alexlarsson
If regenerate_ld_cache was used then the fds involved in the
ld.so.conf files were used twice, which means they are at
the end the second time. So, we tweak the child setup to always
seek back to the start of all fds.
Closes: #1112
Approved by: alexlarsson
fd_array is always non-NULL at this point; adding a conditional there
confuses the code, confuses static analysis, and leaves open the
possibility for ld_so_fd to be leaked if that conditional is not taken
in future.
Coverity CID: #1457790
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1108
Approved by: alexlarsson
Whenever we add a add a local dependency we add both the languages
based on the current locale, and (in case of an update) whatever was
installed before. We also properly merge this with any normally
specified (non-dependency) update (typically happens e.g. when just
doing a "flatpak update", which adds .Locale updates both as
dependencies and regular updates).
This means you can just configure a new language and then flatpak
update will pull everything with those languages.
Closes: #1098
Approved by: alexlarsson