From ac1bbf92f086727a2a5c33e813691f69205bd862 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Apr 09 2018 22:13:13 +0000 Subject: Update to 3.28.1 --- diff --git a/.gitignore b/.gitignore index 64b1849..a469f77 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,4 @@ /gnome-software-3.27.90.tar.xz /gnome-software-3.27.92.tar.xz /gnome-software-3.28.0.tar.xz +/gnome-software-3.28.1.tar.xz diff --git a/0001-Revert-Revert-trivial-Use-new-libappstream-glib-to-b.patch b/0001-Revert-Revert-trivial-Use-new-libappstream-glib-to-b.patch deleted file mode 100644 index 53474ed..0000000 --- a/0001-Revert-Revert-trivial-Use-new-libappstream-glib-to-b.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 2a0f56590f4c86550c8603e1de5a97e57426ff2a Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Tue, 13 Mar 2018 13:08:39 +0100 -Subject: [PATCH] Revert "Revert "trivial: Use new libappstream-glib to build - the ID"" - -We've now fixed the appstream generator to match the generated ID in -https://github.com/hughsie/appstream-glib/commit/1f7ff84a04c227bccb60c76f461f3dccbe372f7a - -This reverts commit c9dbd646c3f7d23699685f320baefcb12198298f. ---- - plugins/shell-extensions/gs-plugin-shell-extensions.c | 10 ++-------- - 1 file changed, 2 insertions(+), 8 deletions(-) - -diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c b/plugins/shell-extensions/gs-plugin-shell-extensions.c -index 8edee560b904..f55eb2fbc5e8 100644 ---- a/plugins/shell-extensions/gs-plugin-shell-extensions.c -+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c -@@ -105,12 +105,6 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app) - } - } - --static gchar * --gs_plugin_shell_extensions_id_from_uuid (const gchar *uuid) --{ -- return g_strdup_printf ("%s.shell-extension", uuid); --} -- - static AsAppState - gs_plugin_shell_extensions_convert_state (guint value) - { -@@ -143,7 +137,7 @@ gs_plugin_shell_extensions_parse_installed (GsPlugin *plugin, - g_autoptr(AsIcon) ic = NULL; - g_autoptr(GsApp) app = NULL; - -- id = gs_plugin_shell_extensions_id_from_uuid (uuid); -+ id = as_utils_appstream_id_build (uuid); - app = gs_app_new (id); - gs_app_set_metadata (app, "GnomeSoftware::Creator", - gs_plugin_get_name (plugin)); -@@ -540,7 +534,7 @@ gs_plugin_shell_extensions_parse_app (GsPlugin *plugin, - tmp = json_object_get_string_member (json_app, "uuid"); - if (tmp != NULL) { - g_autofree gchar *id = NULL; -- id = gs_plugin_shell_extensions_id_from_uuid (tmp); -+ id = as_utils_appstream_id_build (tmp); - as_app_set_id (app, id); - as_app_add_metadata (app, "shell-extensions::uuid", tmp); - } --- -2.16.2 - diff --git a/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch b/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch index c8d0667..52b3ab2 100644 --- a/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch +++ b/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch @@ -1,53 +1,3 @@ -From 047a077a0ac308fabe002ad3099b8e1f2f24eccd Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 15 Mar 2018 11:23:52 +0100 -Subject: [PATCH] appstream: Don't compare appstream origin to package origin - -Use new as_utils_unique_id_match() from appstream-glib 0.7.8 to ignore -origin when matching AsApp to GsApp. In Fedora, we have all of system -appstream coming from system-installed appstream-data package that has -origin "fedora", but actual packages come from e.g. "updates-testing" -which doesn't match up. ---- - plugins/core/gs-plugin-appstream.c | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c -index 9ca091112231..3cd95c586eae 100644 ---- a/plugins/core/gs-plugin-appstream.c -+++ b/plugins/core/gs-plugin-appstream.c -@@ -527,11 +527,28 @@ gs_plugin_refine_wildcard (GsPlugin *plugin, - g_autoptr(GsApp) new = NULL; - - /* is compatible */ -+#if AS_CHECK_VERSION(0,7,8) -+ if (!as_utils_unique_id_match (gs_app_get_unique_id (app), -+ as_app_get_unique_id (item), -+ AS_UNIQUE_ID_MATCH_FLAG_SCOPE | -+ AS_UNIQUE_ID_MATCH_FLAG_BUNDLE_KIND | -+ /* don't match origin as AsApp appstream -+ * origin can differ from package origin */ -+ AS_UNIQUE_ID_MATCH_FLAG_KIND | -+ AS_UNIQUE_ID_MATCH_FLAG_ID | -+ AS_UNIQUE_ID_MATCH_FLAG_BRANCH)) { -+ g_debug ("does not match unique ID constraints: %s, %s", -+ gs_app_get_unique_id (app), -+ as_app_get_unique_id (item)); -+ continue; -+ } -+#else - if (!as_utils_unique_id_equal (gs_app_get_unique_id (app), - as_app_get_unique_id (item))) { - g_debug ("does not match unique ID constraints"); - continue; - } -+#endif - - /* does the app have an installation method */ - if (as_app_get_pkgname_default (item) == NULL && --- -2.16.2 - diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c index 3cd95c586eae..8e558824caca 100644 --- a/plugins/core/gs-plugin-appstream.c diff --git a/0001-plugin-loader-Don-t-abort-for-refine-errors.patch b/0001-plugin-loader-Don-t-abort-for-refine-errors.patch deleted file mode 100644 index aac41b1..0000000 --- a/0001-plugin-loader-Don-t-abort-for-refine-errors.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5b24280921bee7fd7ad045641fe7afecf39d8130 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Tue, 13 Mar 2018 22:22:27 +0100 -Subject: [PATCH] plugin loader: Don't abort() for refine errors - -When refining a wildcard app fails, don't abort(), but instead warn and -return NULL. Refining can fail legitimately, e.g. when there's no -network access to refine a system app with pkgdb data. - -https://bugzilla.redhat.com/show_bug.cgi?id=1554986 ---- - lib/gs-plugin-loader.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index 55d8dde837a5..6e956b82acad 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -3749,7 +3749,7 @@ gs_plugin_loader_app_create (GsPluginLoader *plugin_loader, const gchar *unique_ - plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFINE, NULL); - helper = gs_plugin_loader_helper_new (plugin_loader, plugin_job); - if (!gs_plugin_loader_run_refine (helper, list, NULL, &error)) { -- g_error ("%s", error->message); -+ g_warning ("%s", error->message); - return NULL; - } - --- -2.16.2 - diff --git a/empty-os-updates.patch b/empty-os-updates.patch deleted file mode 100644 index 3683f16..0000000 --- a/empty-os-updates.patch +++ /dev/null @@ -1,290 +0,0 @@ -From c5cc2dc34fab191e9b40097fd1e53a84f3a47177 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Wed, 21 Mar 2018 09:48:22 +0100 -Subject: [PATCH 1/9] generic updates: Don't put wildcard apps in the os update - object - -Wildcard apps are filtered from the updates list after refine() and we -may end up with an empty OsUpdate object if we add wildcard apps to it -and there are no other updates. - -Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/332 - -https://bugzilla.redhat.com/show_bug.cgi?id=1558754 ---- - plugins/core/gs-plugin-generic-updates.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c -index 2fc805b7f157..733983a2929c 100644 ---- a/plugins/core/gs-plugin-generic-updates.c -+++ b/plugins/core/gs-plugin-generic-updates.c -@@ -96,6 +96,8 @@ gs_plugin_refine (GsPlugin *plugin, - /* do we have any packages left that are not apps? */ - for (guint i = 0; i < gs_app_list_length (list); i++) { - GsApp *app_tmp = gs_app_list_index (list, i); -+ if (gs_app_has_quirk (app_tmp, AS_APP_QUIRK_MATCH_ANY_PREFIX)) -+ continue; - if (gs_plugin_generic_updates_merge_os_update (app_tmp)) - gs_app_list_add (os_updates, app_tmp); - } --- -2.16.2 - - -From d2fd28a7d86b1c7f379e1ebcf105cd4f86d76630 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Wed, 21 Mar 2018 11:28:19 +0100 -Subject: [PATCH 2/9] Add a self test for the generic-updates plugin - -This also covers the fix in the previous commit. ---- - plugins/core/gs-self-test.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 81 insertions(+) - -diff --git a/plugins/core/gs-self-test.c b/plugins/core/gs-self-test.c -index 66ab4fd28cc4..dc27daa37d5b 100644 ---- a/plugins/core/gs-self-test.c -+++ b/plugins/core/gs-self-test.c -@@ -104,6 +104,83 @@ gs_plugins_core_os_release_func (GsPluginLoader *plugin_loader) - g_assert (app3 == app); - } - -+static void -+gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader) -+{ -+ gboolean ret; -+ GsApp *os_update; -+ GPtrArray *related; -+ g_autoptr(GsPluginJob) plugin_job = NULL; -+ g_autoptr(GsPluginJob) plugin_job2 = NULL; -+ g_autoptr(GError) error = NULL; -+ g_autoptr(GsApp) app1 = NULL; -+ g_autoptr(GsApp) app2 = NULL; -+ g_autoptr(GsApp) app_wildcard = NULL; -+ g_autoptr(GsAppList) list = NULL; -+ g_autoptr(GsAppList) list_wildcard = NULL; -+ -+ /* drop all caches */ -+ gs_plugin_loader_setup_again (plugin_loader); -+ -+ /* create a list with generic apps */ -+ list = gs_app_list_new (); -+ app1 = gs_app_new ("package1"); -+ app2 = gs_app_new ("package2"); -+ gs_app_set_kind (app1, AS_APP_KIND_GENERIC); -+ gs_app_set_kind (app2, AS_APP_KIND_GENERIC); -+ gs_app_set_state (app1, AS_APP_STATE_UPDATABLE); -+ gs_app_set_state (app2, AS_APP_STATE_UPDATABLE); -+ gs_app_add_source (app1, "package1"); -+ gs_app_add_source (app2, "package2"); -+ gs_app_list_add (list, app1); -+ gs_app_list_add (list, app2); -+ -+ /* refine to make the generic-updates plugin merge them into a single OsUpdate item */ -+ plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFINE, -+ "list", list, -+ "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS, -+ NULL); -+ ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error); -+ gs_test_flush_main_context (); -+ g_assert_no_error (error); -+ g_assert (ret); -+ -+ /* make sure there is one entry, the os update */ -+ g_assert_cmpint (gs_app_list_length (list), ==, 1); -+ os_update = gs_app_list_index (list, 0); -+ -+ /* make sure the os update is valid */ -+ g_assert_cmpstr (gs_app_get_id (os_update), ==, "org.gnome.Software.OsUpdate"); -+ g_assert_cmpint (gs_app_get_kind (os_update), ==, AS_APP_KIND_OS_UPDATE); -+ g_assert (gs_app_has_quirk (os_update, AS_APP_QUIRK_IS_PROXY)); -+ -+ /* must have two related apps, the ones we added earlier */ -+ related = gs_app_get_related (os_update); -+ g_assert_cmpint (related->len, ==, 2); -+ -+ /* another test to make sure that we don't get an OsUpdate item created for wildcard apps */ -+ list_wildcard = gs_app_list_new (); -+ app_wildcard = gs_app_new ("nosuchapp.desktop"); -+ gs_app_add_quirk (app_wildcard, AS_APP_QUIRK_MATCH_ANY_PREFIX); -+ gs_app_set_kind (app_wildcard, AS_APP_KIND_GENERIC); -+ gs_app_list_add (list_wildcard, app_wildcard); -+ plugin_job2 = gs_plugin_job_newv (GS_PLUGIN_ACTION_REFINE, -+ "list", list_wildcard, -+ "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS, -+ NULL); -+ ret = gs_plugin_loader_job_action (plugin_loader, plugin_job2, NULL, &error); -+ gs_test_flush_main_context (); -+ g_assert_no_error (error); -+ g_assert (ret); -+ -+ /* no OsUpdate item created */ -+ for (guint i = 0; i < gs_app_list_length (list_wildcard); i++) { -+ GsApp *app_tmp = gs_app_list_index (list_wildcard, i); -+ g_assert_cmpint (gs_app_get_kind (app_tmp), !=, AS_APP_KIND_OS_UPDATE); -+ g_assert (!gs_app_has_quirk (app_tmp, AS_APP_QUIRK_IS_PROXY)); -+ } -+} -+ - int - main (int argc, char **argv) - { -@@ -115,6 +192,7 @@ main (int argc, char **argv) - const gchar *xml; - const gchar *whitelist[] = { - "appstream", -+ "generic-updates", - "icons", - "os-release", - NULL -@@ -180,6 +258,9 @@ main (int argc, char **argv) - g_test_add_data_func ("/gnome-software/plugins/core/os-release", - plugin_loader, - (GTestDataFunc) gs_plugins_core_os_release_func); -+ g_test_add_data_func ("/gnome-software/plugins/core/generic-updates", -+ plugin_loader, -+ (GTestDataFunc) gs_plugins_core_generic_updates_func); - return g_test_run (); - } - --- -2.16.2 - - -From 9eab01082b07acd525b8a390ab6b43136cf400a5 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 22 Mar 2018 13:03:55 +0100 -Subject: [PATCH 5/9] generic updates: Only put packages in the OS Update item - -Make sure we don't put flatpaks in the OS Update item as this is by -design only for hiding low level system package updates. - -flatpaks use online updates and packages use offline updates; if we mix -them up in a single OS Update item this breaks the updates page where -we're supposed to group online and offline updates separately. - -https://gitlab.gnome.org/GNOME/gnome-software/issues/332 ---- - plugins/core/gs-plugin-generic-updates.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c -index 733983a2929c..d8e2db39e3df 100644 ---- a/plugins/core/gs-plugin-generic-updates.c -+++ b/plugins/core/gs-plugin-generic-updates.c -@@ -33,10 +33,16 @@ gs_plugin_initialize (GsPlugin *plugin) - static gboolean - gs_plugin_generic_updates_merge_os_update (GsApp *app) - { -+ /* this is only for grouping system-installed packages */ -+ if (gs_app_get_bundle_kind (app) != AS_BUNDLE_KIND_PACKAGE || -+ gs_app_get_scope (app) != AS_APP_SCOPE_SYSTEM) -+ return FALSE; -+ - if (gs_app_get_kind (app) == AS_APP_KIND_GENERIC) - return TRUE; - if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE) - return TRUE; -+ - return FALSE; - } - --- -2.16.2 - - -From 223b9f9a6bb5fc500aeee0a392ba909c0fdec097 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 22 Mar 2018 14:08:49 +0100 -Subject: [PATCH 6/9] trivial: Fix the "OS Updates" self test - -Adapt the test now that we're only putting package updates in "OS -Updates" after commit 9eab01082b07acd525b8a390ab6b43136cf400a5. ---- - plugins/core/gs-self-test.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/plugins/core/gs-self-test.c b/plugins/core/gs-self-test.c -index dc27daa37d5b..da22aaebb231 100644 ---- a/plugins/core/gs-self-test.c -+++ b/plugins/core/gs-self-test.c -@@ -128,6 +128,10 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader) - app2 = gs_app_new ("package2"); - gs_app_set_kind (app1, AS_APP_KIND_GENERIC); - gs_app_set_kind (app2, AS_APP_KIND_GENERIC); -+ gs_app_set_bundle_kind (app1, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_bundle_kind (app2, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_scope (app1, AS_APP_SCOPE_SYSTEM); -+ gs_app_set_scope (app2, AS_APP_SCOPE_SYSTEM); - gs_app_set_state (app1, AS_APP_STATE_UPDATABLE); - gs_app_set_state (app2, AS_APP_STATE_UPDATABLE); - gs_app_add_source (app1, "package1"); --- -2.16.2 - - -From 22e217f3725307dce12d477bad2593912e2b72d6 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 22 Mar 2018 14:33:02 +0100 -Subject: [PATCH 7/9] trivial: Fix dummy plugin self test - -Adapt for commit 9eab01082b07acd525b8a390ab6b43136cf400a5. ---- - plugins/dummy/gs-plugin-dummy.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c -index e238ab54c51e..5293fe3b3ddc 100644 ---- a/plugins/dummy/gs-plugin-dummy.c -+++ b/plugins/dummy/gs-plugin-dummy.c -@@ -384,6 +384,8 @@ gs_plugin_add_updates (GsPlugin *plugin, - gs_app_set_update_details (app, "Fix several memory leaks."); - gs_app_set_update_urgency (app, AS_URGENCY_KIND_LOW); - gs_app_set_kind (app, AS_APP_KIND_GENERIC); -+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM); - gs_app_set_state (app, AS_APP_STATE_UPDATABLE); - gs_app_add_source (app, "libvirt-glib-devel"); - gs_app_add_source_id (app, "libvirt-glib-devel;0.0.1;noarch;fedora"); -@@ -398,6 +400,8 @@ gs_plugin_add_updates (GsPlugin *plugin, - gs_app_set_update_details (app, "Do not crash when using libvirt."); - gs_app_set_update_urgency (app, AS_URGENCY_KIND_HIGH); - gs_app_set_kind (app, AS_APP_KIND_GENERIC); -+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM); - gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE); - gs_app_add_source (app, "chiron-libs"); - gs_app_add_source_id (app, "chiron-libs;0.0.1;i386;updates-testing"); --- -2.16.2 - - -From 732951dbe669aa5db4e6a6157f7b71a6fbce51b6 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 22 Mar 2018 15:05:20 +0100 -Subject: [PATCH 9/9] trivial: rpm-ostree: Set bundle kind and scope for - updates - -This ensures that updates get correctly grouped under "OS Updates" item -after commit 9eab01082b07acd525b8a390ab6b43136cf400a5. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index cb3d3d4f9bad..aae2e6dbd6dc 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -320,6 +320,8 @@ make_app (GVariant *variant) - gs_app_set_management_plugin (app, "rpm-ostree"); - gs_app_set_size_download (app, 0); - gs_app_set_kind (app, AS_APP_KIND_GENERIC); -+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM); - - details = g_variant_get_child_value (variant, 2); - g_return_val_if_fail (details != NULL, NULL); --- -2.16.2 - diff --git a/gnome-software.spec b/gnome-software.spec index ef800aa..c331b55 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -10,20 +10,16 @@ %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.28.0 -Release: 5%{?dist} +Version: 3.28.1 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.28/%{name}-%{version}.tar.xz -# Backported from upstream -Patch0: 0001-Revert-Revert-trivial-Use-new-libappstream-glib-to-b.patch -Patch1: 0001-plugin-loader-Don-t-abort-for-refine-errors.patch +# Lower appstream-glib version check as we have new API backported Patch2: 0001-appstream-Don-t-compare-appstream-origin-to-package-.patch -Patch3: empty-os-updates.patch -Patch4: rpm-ostree-updates.patch BuildRequires: gettext BuildRequires: libxslt @@ -217,6 +213,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Mon Apr 09 2018 Kalev Lember - 3.28.1-1 +- Update to 3.28.1 + * Thu Mar 29 2018 Kalev Lember - 3.28.0-5 - Fix empty OS Updates showing up - Make rpm-ostree update triggering work diff --git a/rpm-ostree-updates.patch b/rpm-ostree-updates.patch deleted file mode 100644 index f6e0d73..0000000 --- a/rpm-ostree-updates.patch +++ /dev/null @@ -1,803 +0,0 @@ -From 433feac892472ca2c6ab2cf074117100764a3f75 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 22 Mar 2018 15:00:56 +0100 -Subject: [PATCH] trivial: rpm-ostree: Update rpmostree1 dbus interface - description - ---- - .../rpm-ostree/org.projectatomic.rpmostree1.xml | 81 ++++++++++++++++++++-- - 1 file changed, 76 insertions(+), 5 deletions(-) - -diff --git a/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml b/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -index 0a4a915c6493..edfa28f319bd 100644 ---- a/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -+++ b/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -@@ -23,8 +23,10 @@ - - - -- -+ - -+ -+ - - -+ -+ - - - -@@ -74,12 +79,36 @@ - 'timestamp' (type 't') - 'origin' (type 's') - 'signatures' (type 'av') -+ 'gpg-enabled' (type 'b') -+ 'ref-has-new-commit' (type 'b') -+ TRUE if 'checksum' refers to a new base commit we're not booted in. -+ 'rpm-diff' (type 'a{sv}') -+ 'upgraded' (type 'a(us(ss)(ss))') -+ 'downgraded' (type 'a(us(ss)(ss))') -+ 'removed' (type 'a(usss)') -+ 'added' (type 'a(usss)') -+ 'advisories' (type 'a(suuasa{sv})') - --> - - - -- -- -+ -+ -+ -+ -+ -+ -+ - - - -@@ -218,17 +247,44 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - - - -+ -+ -+ -+ -+ - - - -@@ -273,6 +341,9 @@ - - - -+ -+ -+ - - - --- -2.16.2 - -From bea127b2be371c80ace8a0a49295c2046b58fbd8 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 15:31:27 +0200 -Subject: [PATCH 1/7] rpm-ostree: Use Upgrade instead of DownloadUpdateRpmDiff - -Upgrade is new do-it-all API that supersedes DownloadUpdateRpmDiff and -many other individual rpm-ostree dbus methods. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 45 +++++++++++++++++++++++++++---- - 1 file changed, 40 insertions(+), 5 deletions(-) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index aae2e6dbd6dc..5b173dfdd509 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -364,6 +364,29 @@ make_app (GVariant *variant) - return g_steal_pointer (&app); - } - -+static GVariant * -+make_rpmostree_options_variant (gboolean reboot, -+ gboolean allow_downgrade, -+ gboolean cache_only, -+ gboolean download_only, -+ gboolean skip_purge, -+ gboolean no_pull_base, -+ gboolean dry_run, -+ gboolean no_overrides) -+{ -+ GVariantDict dict; -+ g_variant_dict_init (&dict, NULL); -+ g_variant_dict_insert (&dict, "reboot", "b", reboot); -+ g_variant_dict_insert (&dict, "allow-downgrade", "b", allow_downgrade); -+ g_variant_dict_insert (&dict, "cache-only", "b", cache_only); -+ g_variant_dict_insert (&dict, "download-only", "b", download_only); -+ g_variant_dict_insert (&dict, "skip-purge", "b", skip_purge); -+ g_variant_dict_insert (&dict, "no-pull-base", "b", no_pull_base); -+ g_variant_dict_insert (&dict, "dry-run", "b", dry_run); -+ g_variant_dict_insert (&dict, "no-overrides", "b", no_overrides); -+ return g_variant_ref_sink (g_variant_dict_end (&dict)); -+} -+ - gboolean - gs_plugin_refresh (GsPlugin *plugin, - guint cache_age, -@@ -375,11 +398,23 @@ gs_plugin_refresh (GsPlugin *plugin, - - if (flags & GS_PLUGIN_REFRESH_FLAGS_METADATA) { - g_autofree gchar *transaction_address = NULL; -- -- if (!gs_rpmostree_os_call_download_update_rpm_diff_sync (priv->os_proxy, -- &transaction_address, -- cancellable, -- error)) { -+ g_autoptr(GVariant) options = NULL; -+ -+ options = make_rpmostree_options_variant (FALSE, /* reboot */ -+ FALSE, /* allow-downgrade */ -+ FALSE, /* cache-only */ -+ TRUE, /* download-only */ -+ FALSE, /* skip-purge */ -+ FALSE, /* no-pull-base */ -+ FALSE, /* dry-run */ -+ FALSE); /* no-overrides */ -+ if (!gs_rpmostree_os_call_upgrade_sync (priv->os_proxy, -+ options, -+ NULL /* fd list */, -+ &transaction_address, -+ NULL /* fd list out */, -+ cancellable, -+ error)) { - gs_utils_error_convert_gio (error); - return FALSE; - } --- -2.16.2 - - -From 533ab16b0a671bb8e39c6c0b6afa4c4438a5cb70 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 18:13:05 +0200 -Subject: [PATCH 2/7] rpm-ostree: Avoid using GetCachedUpdateRpmDiff dbus - method - -rpm-ostree GetCachedUpdateRpmDiff method doesn't handle layered packages -correctly. Instead, this commit switches to using the newer CachedUpdate -property instead which has all the info we need for add_updates(). ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 196 +++++++++++++++++++++--------- - 1 file changed, 140 insertions(+), 56 deletions(-) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 5b173dfdd509..64a86bef9549 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -303,16 +303,14 @@ out: - } - - static GsApp * --make_app (GVariant *variant) -+app_from_modified_pkg_variant (GVariant *variant) - { - g_autoptr(GsApp) app = NULL; -- g_autoptr(GVariant) details = NULL; -- const char *old_name, *old_evr, *old_arch; -- const char *new_name, *new_evr, *new_arch; -- gboolean have_old = FALSE; -- gboolean have_new = FALSE; -+ const char *name; -+ const char *old_evr, *old_arch; -+ const char *new_evr, *new_arch; - -- app = gs_app_new (NULL); -+ g_variant_get (variant, "(us(ss)(ss))", NULL /* type*/, &name, &old_evr, &old_arch, &new_evr, &new_arch); - - /* create new app */ - app = gs_app_new (NULL); -@@ -323,42 +321,51 @@ make_app (GVariant *variant) - gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); - gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM); - -- details = g_variant_get_child_value (variant, 2); -- g_return_val_if_fail (details != NULL, NULL); -+ /* update or downgrade */ -+ gs_app_add_source (app, name); -+ gs_app_set_version (app, old_evr); -+ gs_app_set_update_version (app, new_evr); -+ gs_app_set_state (app, AS_APP_STATE_UPDATABLE); - -- have_old = g_variant_lookup (details, -- "PreviousPackage", "(&s&s&s)", -- &old_name, &old_evr, &old_arch); -+ g_debug ("!%s-%s-%s\n", name, old_evr, old_arch); -+ g_debug ("=%s-%s-%s\n", name, new_evr, new_arch); - -- have_new = g_variant_lookup (details, -- "NewPackage", "(&s&s&s)", -- &new_name, &new_evr, &new_arch); -+ return g_steal_pointer (&app); -+} - -- if (have_old && have_new) { -- g_assert (g_strcmp0 (old_name, new_name) == 0); -+static GsApp * -+app_from_single_pkg_variant (GVariant *variant, gboolean addition) -+{ -+ g_autoptr(GsApp) app = NULL; -+ const char *name; -+ const char *evr; -+ const char *arch; - -- /* update */ -- gs_app_add_source (app, old_name); -- gs_app_set_version (app, old_evr); -- gs_app_set_update_version (app, new_evr); -- gs_app_set_state (app, AS_APP_STATE_UPDATABLE); -+ g_variant_get (variant, "(usss)", NULL /* type*/, &name, &evr, &arch); - -- g_print ("!%s-%s-%s\n", old_name, old_evr, old_arch); -- g_print ("=%s-%s-%s\n", new_name, new_evr, new_arch); -- } else if (have_old) { -- /* removal */ -- gs_app_add_source (app, old_name); -- gs_app_set_version (app, old_evr); -- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE); -+ /* create new app */ -+ app = gs_app_new (NULL); -+ gs_app_add_quirk (app, AS_APP_QUIRK_NEEDS_REBOOT); -+ gs_app_set_management_plugin (app, "rpm-ostree"); -+ gs_app_set_size_download (app, 0); -+ gs_app_set_kind (app, AS_APP_KIND_GENERIC); -+ gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); -+ gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM); - -- g_print ("-%s-%s-%s\n", old_name, old_evr, old_arch); -- } else if (have_new) { -- /* install */ -- gs_app_add_source (app, new_name); -- gs_app_set_version (app, new_evr); -+ if (addition) { -+ /* addition */ -+ gs_app_add_source (app, name); -+ gs_app_set_version (app, evr); - gs_app_set_state (app, AS_APP_STATE_AVAILABLE); - -- g_print ("+%s-%s-%s\n", new_name, new_evr, new_arch); -+ g_debug ("+%s-%s-%s\n", name, evr, arch); -+ } else { -+ /* removal */ -+ gs_app_add_source (app, name); -+ gs_app_set_version (app, evr); -+ gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE); -+ -+ g_debug ("-%s-%s-%s\n", name, evr, arch); - } - - return g_steal_pointer (&app); -@@ -438,33 +445,110 @@ gs_plugin_add_updates (GsPlugin *plugin, - GError **error) - { - GsPluginData *priv = gs_plugin_get_data (plugin); -- g_autoptr(GVariant) result = NULL; -- g_autoptr(GVariant) details = NULL; -- GVariantIter iter; -- GVariant *child; -- -- if (!gs_rpmostree_os_call_get_cached_update_rpm_diff_sync (priv->os_proxy, -- "", -- &result, -- &details, -- cancellable, -- error)) { -- gs_utils_error_convert_gio (error); -+ g_autoptr(GVariant) cached_update = NULL; -+ g_autoptr(GVariant) rpm_diff = NULL; -+ const gchar *checksum = NULL; -+ const gchar *version = NULL; -+ g_auto(GVariantDict) cached_update_dict; -+ -+ cached_update = gs_rpmostree_os_dup_cached_update (priv->os_proxy); -+ g_variant_dict_init (&cached_update_dict, cached_update); -+ -+ if (!g_variant_dict_lookup (&cached_update_dict, "checksum", "&s", &checksum)) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'checksum' in CachedUpdate dict"); - return FALSE; - } -+ if (!g_variant_dict_lookup (&cached_update_dict, "version", "&s", &version)) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'version' in CachedUpdate dict"); -+ return FALSE; -+ } -+ g_debug ("got CachedUpdate version '%s', checksum '%s'", version, checksum); -+ -+ rpm_diff = g_variant_dict_lookup_value (&cached_update_dict, "rpm-diff", G_VARIANT_TYPE ("a{sv}")); -+ if (rpm_diff != NULL) { -+ GVariantIter iter; -+ GVariant *child; -+ g_autoptr(GVariant) upgraded = NULL; -+ g_autoptr(GVariant) downgraded = NULL; -+ g_autoptr(GVariant) removed = NULL; -+ g_autoptr(GVariant) added = NULL; -+ g_auto(GVariantDict) rpm_diff_dict; -+ g_variant_dict_init (&rpm_diff_dict, rpm_diff); -+ -+ upgraded = g_variant_dict_lookup_value (&rpm_diff_dict, "upgraded", G_VARIANT_TYPE ("a(us(ss)(ss))")); -+ if (upgraded == NULL) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'upgraded' in rpm-diff dict"); -+ return FALSE; -+ } -+ downgraded = g_variant_dict_lookup_value (&rpm_diff_dict, "downgraded", G_VARIANT_TYPE ("a(us(ss)(ss))")); -+ if (downgraded == NULL) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'downgraded' in rpm-diff dict"); -+ return FALSE; -+ } -+ removed = g_variant_dict_lookup_value (&rpm_diff_dict, "removed", G_VARIANT_TYPE ("a(usss)")); -+ if (removed == NULL) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'removed' in rpm-diff dict"); -+ return FALSE; -+ } -+ added = g_variant_dict_lookup_value (&rpm_diff_dict, "added", G_VARIANT_TYPE ("a(usss)")); -+ if (added == NULL) { -+ g_set_error_literal (error, -+ GS_PLUGIN_ERROR, -+ GS_PLUGIN_ERROR_INVALID_FORMAT, -+ "no 'added' in rpm-diff dict"); -+ return FALSE; -+ } - -- if (g_variant_n_children (result) == 0) -- return TRUE; -+ /* iterate over all upgraded packages and add them */ -+ g_variant_iter_init (&iter, upgraded); -+ while ((child = g_variant_iter_next_value (&iter)) != NULL) { -+ g_autoptr(GsApp) app = app_from_modified_pkg_variant (child); -+ if (app != NULL) -+ gs_app_list_add (list, app); -+ g_variant_unref (child); -+ } -+ -+ /* iterate over all downgraded packages and add them */ -+ g_variant_iter_init (&iter, downgraded); -+ while ((child = g_variant_iter_next_value (&iter)) != NULL) { -+ g_autoptr(GsApp) app = app_from_modified_pkg_variant (child); -+ if (app != NULL) -+ gs_app_list_add (list, app); -+ g_variant_unref (child); -+ } - -- /* GVariant format should be a(sua{sv}) */ -- g_variant_iter_init (&iter, result); -+ /* iterate over all removed packages and add them */ -+ g_variant_iter_init (&iter, removed); -+ while ((child = g_variant_iter_next_value (&iter)) != NULL) { -+ g_autoptr(GsApp) app = app_from_single_pkg_variant (child, FALSE); -+ if (app != NULL) -+ gs_app_list_add (list, app); -+ g_variant_unref (child); -+ } - -- while ((child = g_variant_iter_next_value (&iter)) != NULL) { -- g_autoptr(GsApp) app = make_app (child); -- if (app != NULL) { -- gs_app_list_add (list, app); -+ /* iterate over all added packages and add them */ -+ g_variant_iter_init (&iter, added); -+ while ((child = g_variant_iter_next_value (&iter)) != NULL) { -+ g_autoptr(GsApp) app = app_from_single_pkg_variant (child, TRUE); -+ if (app != NULL) -+ gs_app_list_add (list, app); -+ g_variant_unref (child); - } -- g_variant_unref (child); - } - - return TRUE; --- -2.16.2 - - -From 5c2c66a4843a4d783796e50bb639edb1cf6a4831 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 20:31:23 +0200 -Subject: [PATCH 3/7] rpm-ostree: Implement triggering an update - -We only downloaded and showed updates so far, but didn't actually -implement triggering an update. This commit is the missing piece for -making rpm-ostree updates work. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 80 +++++++++++++++++++++++++++++++ - 1 file changed, 80 insertions(+) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 64a86bef9549..68de8943927a 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -35,6 +35,7 @@ struct GsPluginData { - GsRPMOSTreeSysroot *sysroot_proxy; - OstreeRepo *ot_repo; - OstreeSysroot *ot_sysroot; -+ gboolean update_triggered; - }; - - void -@@ -554,6 +555,85 @@ gs_plugin_add_updates (GsPlugin *plugin, - return TRUE; - } - -+static gboolean -+trigger_rpmostree_update (GsPlugin *plugin, -+ GsApp *app, -+ GCancellable *cancellable, -+ GError **error) -+{ -+ GsPluginData *priv = gs_plugin_get_data (plugin); -+ g_autofree gchar *transaction_address = NULL; -+ g_autoptr(GVariant) options = NULL; -+ -+ /* if we can process this online do not require a trigger */ -+ if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE) -+ return TRUE; -+ -+ /* only process this app if was created by this plugin */ -+ if (g_strcmp0 (gs_app_get_management_plugin (app), gs_plugin_get_name (plugin)) != 0) -+ return TRUE; -+ -+ /* already in correct state */ -+ if (priv->update_triggered) -+ return TRUE; -+ -+ /* trigger the update */ -+ options = make_rpmostree_options_variant (FALSE, /* reboot */ -+ FALSE, /* allow-downgrade */ -+ TRUE, /* cache-only */ -+ FALSE, /* download-only */ -+ FALSE, /* skip-purge */ -+ FALSE, /* no-pull-base */ -+ FALSE, /* dry-run */ -+ FALSE); /* no-overrides */ -+ if (!gs_rpmostree_os_call_upgrade_sync (priv->os_proxy, -+ options, -+ NULL /* fd list */, -+ &transaction_address, -+ NULL /* fd list out */, -+ cancellable, -+ error)) { -+ gs_utils_error_convert_gio (error); -+ return FALSE; -+ } -+ -+ if (!gs_rpmostree_transaction_get_response_sync (priv->sysroot_proxy, -+ transaction_address, -+ cancellable, -+ error)) { -+ gs_utils_error_convert_gio (error); -+ return FALSE; -+ } -+ -+ priv->update_triggered = TRUE; -+ -+ /* success */ -+ return TRUE; -+} -+ -+gboolean -+gs_plugin_update_app (GsPlugin *plugin, -+ GsApp *app, -+ GCancellable *cancellable, -+ GError **error) -+{ -+ GPtrArray *related = gs_app_get_related (app); -+ -+ /* we don't currently don't put all updates in the OsUpdate proxy app */ -+ if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY)) -+ return trigger_rpmostree_update (plugin, app, cancellable, error); -+ -+ /* try to trigger each related app */ -+ for (guint i = 0; i < related->len; i++) { -+ GsApp *app_tmp = g_ptr_array_index (related, i); -+ if (!trigger_rpmostree_update (plugin, app_tmp, cancellable, error)) -+ return FALSE; -+ } -+ -+ /* success */ -+ return TRUE; -+} -+ - static void - resolve_packages_app (GsPlugin *plugin, - GPtrArray *pkglist, --- -2.16.2 - - -From 50ba9b1682e9d04627127914419e926778e6e21e Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 20:55:14 +0200 -Subject: [PATCH 4/7] rpm-ostree: Avoid downloading updates during - gnome-software startup - -Only download updates when GS_PLUGIN_REFRESH_FLAGS_PAYLOAD is specified, -so that we don't block gnome-software startup with update downloads. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 68de8943927a..2e8681c980b5 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -404,7 +404,7 @@ gs_plugin_refresh (GsPlugin *plugin, - { - GsPluginData *priv = gs_plugin_get_data (plugin); - -- if (flags & GS_PLUGIN_REFRESH_FLAGS_METADATA) { -+ if (flags & GS_PLUGIN_REFRESH_FLAGS_PAYLOAD) { - g_autofree gchar *transaction_address = NULL; - g_autoptr(GVariant) options = NULL; - --- -2.16.2 - - -From 2503def95fbd1e6d7d299219d5cd0a6d591cfec6 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 21:03:19 +0200 -Subject: [PATCH 5/7] rpm-ostree: Don't return an error if we haven't - downloaded any updates yet - ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 19 +++++-------------- - 1 file changed, 5 insertions(+), 14 deletions(-) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 2e8681c980b5..e03f59385efa 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -455,20 +455,11 @@ gs_plugin_add_updates (GsPlugin *plugin, - cached_update = gs_rpmostree_os_dup_cached_update (priv->os_proxy); - g_variant_dict_init (&cached_update_dict, cached_update); - -- if (!g_variant_dict_lookup (&cached_update_dict, "checksum", "&s", &checksum)) { -- g_set_error_literal (error, -- GS_PLUGIN_ERROR, -- GS_PLUGIN_ERROR_INVALID_FORMAT, -- "no 'checksum' in CachedUpdate dict"); -- return FALSE; -- } -- if (!g_variant_dict_lookup (&cached_update_dict, "version", "&s", &version)) { -- g_set_error_literal (error, -- GS_PLUGIN_ERROR, -- GS_PLUGIN_ERROR_INVALID_FORMAT, -- "no 'version' in CachedUpdate dict"); -- return FALSE; -- } -+ if (!g_variant_dict_lookup (&cached_update_dict, "checksum", "&s", &checksum)) -+ return TRUE; -+ if (!g_variant_dict_lookup (&cached_update_dict, "version", "&s", &version)) -+ return TRUE; -+ - g_debug ("got CachedUpdate version '%s', checksum '%s'", version, checksum); - - rpm_diff = g_variant_dict_lookup_value (&cached_update_dict, "rpm-diff", G_VARIANT_TYPE ("a{sv}")); --- -2.16.2 - - -From 68f4c49157188e499bd36ef6e56239c78be5cc09 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 21:41:08 +0200 -Subject: [PATCH 6/7] rpm-ostree: Ensure D-Bus properties are updated before - reading them - -Use new Reload() API in rpm-ostree 2018.4 to make sure the daemon emits -all D-Bus properties before reading them. ---- - meson.build | 2 +- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 6 ++++++ - plugins/rpm-ostree/org.projectatomic.rpmostree1.xml | 6 ++++++ - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 53d10370249f..c22a34bb3894 100644 ---- a/meson.build -+++ b/meson.build -@@ -154,7 +154,7 @@ endif - - if get_option('enable-rpm-ostree') - ostree = dependency('ostree-1') -- rpm_ostree = dependency('rpm-ostree-1') -+ rpm_ostree = dependency('rpm-ostree-1', version : '>= 2018.4') - endif - - if get_option('enable-ubuntu-reviews') -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index e03f59385efa..d811df6f0cc3 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -452,6 +452,9 @@ gs_plugin_add_updates (GsPlugin *plugin, - const gchar *version = NULL; - g_auto(GVariantDict) cached_update_dict; - -+ /* ensure D-Bus properties are updated before reading them */ -+ gs_rpmostree_sysroot_call_reload_sync (priv->sysroot_proxy, cancellable, error); -+ - cached_update = gs_rpmostree_os_dup_cached_update (priv->os_proxy); - g_variant_dict_init (&cached_update_dict, cached_update); - -@@ -658,6 +661,9 @@ gs_plugin_refine (GsPlugin *plugin, - g_auto(GStrv) layered_packages = NULL; - g_autofree gchar *checksum = NULL; - -+ /* ensure D-Bus properties are updated before reading them */ -+ gs_rpmostree_sysroot_call_reload_sync (priv->sysroot_proxy, cancellable, error); -+ - booted_deployment = gs_rpmostree_os_dup_booted_deployment (priv->os_proxy); - g_assert (g_variant_lookup (booted_deployment, - "packages", "^as", -diff --git a/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml b/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -index edfa28f319bd..5e5bf0704508 100644 ---- a/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -+++ b/plugins/rpm-ostree/org.projectatomic.rpmostree1.xml -@@ -47,6 +47,12 @@ - - - -+ -+ -+ -+ -+ - - - --- -2.16.2 - - -From aca91ce6ca1ad4525335ad88276ccc970c7d2852 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Thu, 29 Mar 2018 22:34:29 +0200 -Subject: [PATCH 7/7] rpm-ostree: Use new AutomaticUpdateTrigger API - -It doesn't appear to be enough to just download updates with -Upgrade(download-only=true), but we also need to call -AutomaticUpdateTrigger(check=true) to actually make the CachedUpdate -property show up. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index d811df6f0cc3..2e8bda940cc5 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -436,6 +436,34 @@ gs_plugin_refresh (GsPlugin *plugin, - } - } - -+ if (flags & GS_PLUGIN_REFRESH_FLAGS_PAYLOAD) { -+ g_autofree gchar *transaction_address = NULL; -+ g_autoptr(GVariant) options = NULL; -+ GVariantDict dict; -+ -+ g_variant_dict_init (&dict, NULL); -+ g_variant_dict_insert (&dict, "mode", "s", "check"); -+ options = g_variant_ref_sink (g_variant_dict_end (&dict)); -+ -+ if (!gs_rpmostree_os_call_automatic_update_trigger_sync (priv->os_proxy, -+ options, -+ NULL, -+ &transaction_address, -+ cancellable, -+ error)) { -+ gs_utils_error_convert_gio (error); -+ return FALSE; -+ } -+ -+ if (!gs_rpmostree_transaction_get_response_sync (priv->sysroot_proxy, -+ transaction_address, -+ cancellable, -+ error)) { -+ gs_utils_error_convert_gio (error); -+ return FALSE; -+ } -+ } -+ - return TRUE; - } - --- -2.16.2 - diff --git a/sources b/sources index d3427c7..b1a55d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.28.0.tar.xz) = 44df87554e996f2a4019ffd88daafba873554ab766a1e075b22ba8ebd6aa758f768449dfa2cce6a1f3700ec732bd2c9a710d428b5e563a456190a3b802411298 +SHA512 (gnome-software-3.28.1.tar.xz) = 9a2b040307c5c4eb38e0cce41cd830f54e68adf6ac02f2aea30c1894ef2ec8e332dd1bfce699602629843cced4c3f660324e0aa8698591a57c40b13a3e474ded