Commit Graph

3953 Commits

Author SHA1 Message Date
Matthias Clasen
9783472eaa Fix error pileup
All the error handling in the for loop is meant to
use local_error, not error.

Closes: #1936
Approved by: mwleeds
2018-08-01 16:50:11 +00:00
Matthew Leeds
6b2fa94351 create-usb: Initialize a hash table in the correct scope
We need all_collection_ids to be initialized outside the loop that
iterates over all the refs; otherwise it only has the collection IDs
from the last ref (and related).

This fixes a bug where flatpak only includes the ostree-metadata and
appstream data for the collection IDs associated with the last ref given
on the command line and its runtime and related refs. So flatpak now
includes ostree-metadata and appstream data for collection IDs
associated with all the refs given (and their runtimes and related
refs).

Closes: #1930
Approved by: treitter
2018-07-27 23:45:09 +00:00
Matthias Clasen
97f2e3a3fa Merge pull request #1929 from flatpak/autoprune-unless-docs
doc: Document the autoprune-unless metadata key
2018-07-27 18:54:19 -04:00
Matthew Leeds
59997dd126 doc: Document the autoprune-unless metadata key 2018-07-27 12:47:08 -07:00
P. F. Chimento
fbd84d93e4 manpage: Refer to flatpak-metadata documentation
The documentation for extension info can be found there.

See #1341.

Closes: #1927
Approved by: mwleeds
2018-07-27 19:27:19 +00:00
Matthew Leeds
67510fa6cf create-usb: Rename variables for clarity
Closes: #1924
Approved by: treitter
2018-07-25 23:19:52 +00:00
Matthew Leeds
4a723f6b90 create-usb: Don't look for runtimes of runtimes
Currently the create-usb command looks for a runtime for every ref
passed to it, whether it's an app or runtime. This leads to an error
when a runtime was specified because runtimes don't have runtimes.
Normally you shouldn't need to pass a runtime to create-usb because it
finds dependencies on its own, but you conceivably could (and in fact
the eos-updater-prepare-volume tool in Endless does in order to make
sure an icon theme "runtime" is included with OS updates).

This commit fixes the issue by only checking for runtimes for apps. The
way it's written takes extra care to ensure the FlatpakKinds value used
is based on the ref value used, to protect against the case where one ID
exists in multiple installations with a different kind in each one, even
though it's hard to imagine that happening in actual use.

It's difficult to add a unit test for this at the moment since the unit
test for create-usb is blocked in
https://github.com/flatpak/flatpak/pull/1877

Closes: #1924
Approved by: treitter
2018-07-25 23:19:52 +00:00
Kukuh Syafaat
f1629aa731 Update Indonesian translation
Closes: #1922
Approved by: mwleeds
2018-07-25 20:11:58 +00:00
Will Thompson
96854b902a system-helper: fix error when updating not-installed app
Closes: #1919
Approved by: mwleeds
2018-07-24 20:30:52 +00:00
Piotr Drąg
26fe8c81a3 Update Polish translation
Closes: #1917
Approved by: mwleeds
2018-07-23 02:44:26 +00:00
Kalev Lember
942d417aac Update to latest libglnx
This pulls in the renameat2() fix that's required for building with
latest glibc (e.g. Fedora rawhide).

Closes: #1890

Closes: #1914
Approved by: alexlarsson
2018-07-21 08:34:13 +00:00
Matthias Clasen
c7c0366259 Merge pull request #1909 from mwleeds/add-repair-manpage
Add a man page for the repair command
2018-07-18 09:40:48 -04:00
Matthew Leeds
425385d3ea fixup! doc: Add a man page for the repair command 2018-07-17 12:20:44 -07:00
Matthew Leeds
af10bb98ec doc: Add a man page for the repair command
Add a man page based on one of the comments in
app/flatpak-builtins-repair.c

Fixes https://github.com/flatpak/flatpak/issues/1820
2018-07-16 17:43:12 -07:00
Matthew Leeds
ea36e8e83f repair: Fix --help output 2018-07-16 17:18:08 -07:00
Piotr Drąg
f067f184f0 Update Polish translation
Closes: #1905
Approved by: mwleeds
2018-07-16 20:27:13 +00:00
Kukuh Syafaat
0d61a8f3c6 Update Indonesian translation
Closes: #1901
Approved by: mwleeds
2018-07-16 20:05:19 +00:00
Richard Hughes
0afef8a38a Fix a memory leak when calling flatpak_build_file()
Closes: #1898
Approved by: mwleeds
2018-07-12 13:14:03 +00:00
Richard Hughes
d8c5d9c3b9 Fix several memory leaks when debugging is turned on
Closes: #1898
Approved by: mwleeds
2018-07-12 13:14:03 +00:00
朝歌
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