Commit Graph

3934 Commits

Author SHA1 Message Date
朝歌
d7b9d3fc2b Update flatpak-document-unexport.xml
Closes: #1896
Approved by: mwleeds
2018-07-12 11:41:52 +00:00
Simon McVittie
596216532d app: Don't distribute gdbus-codegen output in tarballs
Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1891
Approved by: alexlarsson
2018-07-11 18:32:54 +00:00
Matthew Leeds
11c9d124d7 dir: Propagate errors from copying summary{.sig}
This commit ensures that flatpak_remote_state_save_summary()
initializes the passed GError pointer when returning FALSE. I found this
when looking into https://github.com/flatpak/flatpak/issues/1255 because
at the time of that bug report flatpak_dir_update_appstream() had this
g_file_replace_contents() code in it, which would have caused a seg
fault in update_appstream() after an unsuccessful call to
flatpak_dir_update_appstream().

Fixes https://github.com/flatpak/flatpak/issues/1255

Closes: #1893
Approved by: alexlarsson
2018-07-11 18:22:32 +00:00
Matthew Leeds
8aaacaac50 doc: Fix another typo 2018-07-11 17:58:13 +02:00
Matthew Leeds
6a49f65b6a doc: Fix a typo 2018-07-11 17:54:52 +02:00
AsciiWolf
8852534743 Update Czech translation
Closes: #1894
Approved by: mwleeds
2018-07-11 12:55:06 +00:00
AsciiWolf
354d36f6b4 Fix typo in permission-remove command
Closes: #1894
Approved by: mwleeds
2018-07-11 12:55:06 +00:00
Alexander Larsson
2195848fea Update pofiles for release 0.99.3 2018-07-10 19:54:19 +02:00
Alexander Larsson
0f70a29ba1 Update NEWS for release 2018-07-10 19:41:19 +02:00
Matthew Leeds
bb59dc134d lib: Fix a small memory leak 2018-07-10 19:34:04 +02:00
Matthew Leeds
7decfe39ae doc: Fix my typos 2018-07-10 19:30:58 +02:00
Richard Hughes
07c4df4475 Fix two tiny memory leaks 2018-07-10 19:26:29 +02:00
Alexander Larsson
50fd8aee24 Add FLATPAK_ERROR_RUNTIME_NOT_FOUND error 2018-07-10 19:26:16 +02:00
Alexander Larsson
0ac154e913 lib: Add FLATPAK_ERROR_REMOTE_NOT_FOUND error
And return it where we look up remotes.

Partial fix of #1855
2018-07-10 19:26:16 +02:00
Alexander Larsson
aecc6285d6 utils: Add flatpak_fail_error that takes an error code
This makes it easy to return FlatpakErrors
2018-07-10 19:26:16 +02:00
Matthew Leeds
c9a9b3a1ee doc: Mention P2P capabilities of install/update
Fixes https://github.com/flatpak/flatpak/issues/1329
2018-07-10 19:26:06 +02:00
Matthew Leeds
9c40725739 app: Drop some dead code
Since commit 096f7d4fb dropped flatpak_dir_check_for_appstream_update(),
this code can never be reached. Drop it to fix coverity issue 1471677.
2018-07-10 19:25:59 +02:00
Matthew Leeds
b664a2981c transaction: Fix NULL pointer dereference
This fixes coverity issue 1471684, and ensures we can correctly generate
an error message in flatpak_transaction_add_install_flatpakref().
2018-07-10 19:25:51 +02:00
Alexander Larsson
adffe7d15f fixup! Add flatpak_transaction_operation_type_to_string() 2018-07-10 19:25:44 +02:00
Richard Hughes
53d3a741da Add flatpak_transaction_operation_type_to_string()
This seemed like a useful thing to have, and is what I used in gnome-software.
2018-07-10 19:25:44 +02:00
Richard Hughes
6a3a637248 Don't force flatpakrepo files to haved signed content 2018-07-10 19:25:44 +02:00
Richard Hughes
b133d286d9 Post release version bump 2018-07-10 19:25:44 +02:00
Matthew Leeds
b35144a691 create-usb: Avoid invalidating the summary file
Since the create-usb command doesn't run as root (and if it did GNOME
Software wouldn't be able to call out to it), it can't update the
summary file in the source repo if the system installation is being
used. So the user is expected to run `ostree summary -u` before using
create-usb. But if the create-usb command then updates the appstream
data and repo metadata refs, the summary will no longer point to the
latest commits on those refs. As a short term fix, avoid updating the
appstream data and repo metadata, and mention in the manpage that the
user should do so. The better solution, not requiring any manual steps
on the user's part, will require a fix for
https://github.com/ostreedev/ostree/issues/1664.
2018-07-10 19:25:39 +02:00
Matthew Leeds
f16caf23af doc: Fix typos 2018-07-10 17:54:39 +02:00
Matthew Leeds
905d7ca096 doc: Fix grammar 2018-07-10 17:44:39 +02:00
Alexander Larsson
a568740b20 transaction: drop installation caches when needed
If a remote is added or modified in the cloned FlatpakDir
we also drop caches in the one in the installation.

Fixes #1882

Closes: #1883
Approved by: alexlarsson
2018-07-10 14:29:17 +00:00
Alexander Larsson
35786c9529 update-remote-config: Fix potential NULL dereference
This fixed coverity issue 1471683.

Closes: #1880
Approved by: mwleeds
2018-07-10 12:46:48 +00:00
Matthew Leeds
e3ec1ec537 dir: Use flatpak_dir_use_system_helper() more
Use the helper function to decide whether to use the system helper in
one more place.

Closes: #1874
Approved by: alexlarsson
2018-07-09 23:02:16 +00:00
Alexander Larsson
e4dbd107b3 system-helper: Fix race condition with idle exit
If the system helper process exits due to being idle the
FlatpakSystemHelper dbus proxy will return errors on
all calls, because it resolves the well known name to
a unique name on creation, which means it will try
to talk to the old idle-exited instance.

The fix is to not use GDBusProxy, but instead manually
call g_dbus_connection_call_sync().

Fixes #1845

Closes: #1873
Approved by: mwleeds
2018-07-09 17:22:00 +00:00
Piotr Drąg
93e1e19a70 Update Polish translation
Closes: #1872
Approved by: alexlarsson
2018-07-08 16:43:36 +00:00
Alexander Larsson
3f4518b15c Run uncrustify
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
c97b1d5202 uncrustify: Don't modify valgrind header.
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
f15d2937f0 uncrustify: Don't modify brackets
I don't think there is really an acceptable setting that does
the right thing always, so disable any adding/removing
of brackets.

Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Alexander Larsson
b5e6852a97 uncrustify.sh: We no longer have gvdb in the repo
Closes: #1870
Approved by: alexlarsson
2018-07-08 10:05:37 +00:00
Simon McVittie
7179c12e22 Fix error handling while deploying AppStream
Setting an error with second_error->message is going to work poorly
when second_error has never been set non-NULL.

Related to #1845, although not necessarily the full solution.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1867
Approved by: alexlarsson
2018-07-07 16:17:46 +00:00
Alexander Larsson
98fd052695 transaction: Move the handling of bundle runtime remote from cli code
This allows libflatpak users to also add runtime remotes
as needed by bundles.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Alexander Larsson
c0ebd3a121 transaction: Move flatpakref installation to transaction code
This adds the flatpak_transaction_add_install_flatpakref method
to easily install from flatpakref files. It additionally
adds a new signal called add-new-remote which is called in two
cases:

 To ask if the user wants to add a "normal" remote for the url
 specified by a flatpakref file.

 When a new remote is required for the runtimes the application
 depends on.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Alexander Larsson
1ecca029a8 transaction: Add flatpak_transaction_set_default_arch
This will be used as the default when installing something that
doesn't specify a ref, such as a flatpakref file.

Closes: #1868
Approved by: alexlarsson
2018-07-07 15:38:46 +00:00
Matthew Leeds
e959fd3db0 WIP: Add a create-usb command
Fixes https://github.com/flatpak/flatpak/issues/1672

Closes: #1828
Approved by: alexlarsson
2018-07-07 15:25:50 +00:00
Matthew Leeds
1a79b46059 doc: Point to the source of the generated HTML
When you're looking at the Flatpak Command Reference on
docs.flatpak.org, it's not clear that it was generated from the flatpak
repo. So add a notice to the docbook that's used to generate the HTML.
This was pointed out by
https://github.com/flatpak/flatpak-docs/pull/134
2018-07-07 17:17:03 +02:00
Alexander Larsson
c0f9d81fb0 tests: Fix up ioctl suppressions for tests
The FICLONE ioctl suppression was hit via a different
codepath too, so tweak the callstack for the
suppression.
2018-07-07 16:38:24 +02:00
Alexander Larsson
0d19e60ce3 system-helper: Add EnsureRepo operation
This is used to create the /var/lib/flatpak repo if
needed so that other later operations work. We have
some partial support for it not working in various
operations (using the allow_empty argument) but
this is in no way complete. For example, this
can easily happen if you have a per-user installation
but no system one and then you run flatpak install
with no --user, then it will try to figure out
which one to use and die.
2018-07-07 16:37:44 +02:00
Simon McVittie
3ed522c057 testlibrary: Capture stderr from more commands
This is the equivalent of commit 86fd56dce for the commands added
in commit 2465cf4 to test #1587.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1864
Approved by: alexlarsson
2018-07-07 08:35:50 +00:00
Simon McVittie
07a225b90e testlibrary: Remove unused argv_str
This was left over after commit 86fd56d.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #1864
Approved by: alexlarsson
2018-07-07 08:35:50 +00:00
Alexander Larsson
b999a785f2 flatpak_dir_deploy_appstream: Handle the no-local-commit exists case
For some reason I hit this with a test remote, and it crashes. Make
it return an error instead.

Closes: #1854
Approved by: alexlarsson
2018-07-05 07:38:35 +00:00
Piotr Drąg
1df3f7a5ee Update Polish translation
Closes: #1849
Approved by: alexlarsson
2018-07-02 08:26:38 +00:00
Simon McVittie
1f99b36593 build: Include built files from app/
This fixes an out-of-tree build.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1848
Approved by: alexlarsson
2018-07-02 08:17:08 +00:00
Simon McVittie
63162411e6 build: Tell make how to build app/*-dbus-generated.h
This was already set up for common/, but not yet for app/.

Signed-off-by: Simon McVittie <smcv@collabora.com>

Closes: #1848
Approved by: alexlarsson
2018-07-02 08:17:08 +00:00
Yuri Chornoivan
85375180aa Update Ukrainian translation
Closes: #1847
Approved by: alexlarsson
2018-07-02 08:07:52 +00:00
Matthew Leeds
dc3d86139d dir: Improve metadata fetch error message
In the case that the collection ID configured on a remote is NULL the
repo metadata comes from the summary file. But if there's an error
fetching the summary in _flatpak_dir_get_remote_state() and then
flatpak_remote_state_ensure_metadata() is called, the
metadata_fetch_error variable will be NULL and "unknown error" will be
returned as the error message. This commit returns the
summary_fetch_error message in that case so the user gets a slightly
more helpful error message.

Some Endless computers in Africa have recently been hitting this code
path and printing "unknown error" messages.

Closes: #1844
Approved by: alexlarsson
2018-07-02 07:57:37 +00:00