[gnome-software] rpm-ostree: Set the needs-reboot quirk for all apps



commit ce3ede359f621a8d9218603038b79fcb407efa3e
Author: Kalev Lember <klember redhat com>
Date:   Sat Feb 23 21:12:07 2019 +0100

    rpm-ostree: Set the needs-reboot quirk for all apps

 plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index add8cc23..9a685407 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -221,11 +221,13 @@ gs_plugin_adopt_app (GsPlugin *plugin, GsApp *app)
        if (gs_app_get_bundle_kind (app) == AS_BUNDLE_KIND_PACKAGE &&
            gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+               gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
                app_set_rpm_ostree_packaging_format (app);
        }
 
        if (gs_app_get_kind (app) == AS_APP_KIND_OS_UPGRADE) {
                gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+               gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        }
 }
 
@@ -396,8 +398,8 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant)
 
        /* create new app */
        app = gs_app_new (NULL);
-       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        gs_app_set_management_plugin (app, "rpm-ostree");
+       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
        gs_app_set_size_download (app, 0);
        gs_app_set_kind (app, AS_APP_KIND_GENERIC);
@@ -435,8 +437,8 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit
 
        /* create new app */
        app = gs_app_new (NULL);
-       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        gs_app_set_management_plugin (app, "rpm-ostree");
+       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
        gs_app_set_size_download (app, 0);
        gs_app_set_kind (app, AS_APP_KIND_GENERIC);
@@ -1122,6 +1124,7 @@ resolve_appstream_source_file_to_package_name (GsPlugin *plugin,
                        g_debug ("rpm: setting source to %s", name);
                        gs_app_add_source (app, name);
                        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+                       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
                        app_set_rpm_ostree_packaging_format (app);
                        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
                }
@@ -1178,6 +1181,7 @@ gs_plugin_refine (GsPlugin *plugin,
                    gs_app_get_scope (app) == AS_APP_SCOPE_SYSTEM &&
                    gs_app_get_source_default (app) != NULL) {
                        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+                       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
                        app_set_rpm_ostree_packaging_format (app);
                }
                /* resolve the source package name based on installed appdata/desktop file name */
@@ -1366,6 +1370,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
        app = gs_app_new (NULL);
        gs_app_set_metadata (app, "GnomeSoftware::Creator", gs_plugin_get_name (plugin));
        gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+       gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
        app_set_rpm_ostree_packaging_format (app);
        gs_app_set_kind (app, AS_APP_KIND_GENERIC);
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]