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
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/1877Closes: #1924
Approved by: treitter
This pulls in the renameat2() fix that's required for building with
latest glibc (e.g. Fedora rawhide).
Closes: #1890Closes: #1914
Approved by: alexlarsson
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/1255Closes: #1893
Approved by: alexlarsson
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.
If a remote is added or modified in the cloned FlatpakDir
we also drop caches in the one in the installation.
Fixes#1882Closes: #1883
Approved by: alexlarsson
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#1845Closes: #1873
Approved by: mwleeds