Disable subman plugin
This commit is contained in:
parent
d711fdd99b
commit
dcc45eb70c
@ -42,8 +42,6 @@ Source1: org.gnome.settings-daemon.plugins.power.gschema.override
|
||||
Patch0: housekeeping-disambiguate-mount-names-in-notifications.patch
|
||||
|
||||
|
||||
# https://issues.redhat.com/browse/RHEL-127784
|
||||
Patch2: subman-delay-startup-notification-by-30min.patch
|
||||
|
||||
# https://issues.redhat.com/browse/RHEL-124242
|
||||
Patch3: use-shell-brightness.patch
|
||||
@ -239,7 +237,7 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas
|
||||
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.override
|
||||
|
||||
%changelog
|
||||
* Tue May 19 2026 Andrew Lukoshko <alukoshko@almalinux.org> - 47.2-10.alma.1
|
||||
* Wed May 20 2026 Andrew Lukoshko <alukoshko@almalinux.org> - 47.2-10.alma.1
|
||||
- Disable subman plugin
|
||||
|
||||
## START: Generated by rpmautospec
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
From 0b7f0aa63629a406921ecf1f0b56367456a42581 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Borges <felipeborges@gnome.org>
|
||||
Date: Wed, 12 Nov 2025 12:50:32 +0100
|
||||
Subject: [PATCH] subman: Delay startup notification by 30 minutes
|
||||
|
||||
We don't want to disturb users during their first login, initial
|
||||
setup, and/or onboarding.
|
||||
|
||||
Let's show the notification 30 minutes later.
|
||||
|
||||
Resolves: RHEL-127784
|
||||
---
|
||||
plugins/subman/gsd-subscription-manager.c | 27 ++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/subman/gsd-subscription-manager.c b/plugins/subman/gsd-subscription-manager.c
|
||||
index eb45e367..e2acba37 100644
|
||||
--- a/plugins/subman/gsd-subscription-manager.c
|
||||
+++ b/plugins/subman/gsd-subscription-manager.c
|
||||
@@ -39,6 +39,8 @@
|
||||
#define GSD_SUBSCRIPTION_DBUS_PATH GSD_DBUS_PATH "/Subscription"
|
||||
#define GSD_SUBSCRIPTION_DBUS_INTERFACE GSD_DBUS_BASE_INTERFACE ".Subscription"
|
||||
|
||||
+#define STARTUP_NOTIFICATION_DELAY (30 * 60)
|
||||
+
|
||||
static const gchar introspection_xml[] =
|
||||
"<node>"
|
||||
" <interface name='org.gnome.SettingsDaemon.Subscription'>"
|
||||
@@ -84,6 +86,8 @@ typedef struct
|
||||
NotifyNotification *notification_registration_required;
|
||||
GsdSubmanSubscriptionStatus subscription_status;
|
||||
GsdSubmanSubscriptionStatus subscription_status_last;
|
||||
+
|
||||
+ guint startup_registration_required_notification_id;
|
||||
} GsdSubscriptionManagerPrivate;
|
||||
|
||||
enum {
|
||||
@@ -510,6 +514,15 @@ _show_notification (GsdSubscriptionManager *manager, _NotifyKind notify_kind)
|
||||
g_timer_reset (priv->timer_last_notified);
|
||||
}
|
||||
|
||||
+static void _client_maybe__show_notification (GsdSubscriptionManager *manager);
|
||||
+static gboolean
|
||||
+_startup_registration_required_notification_cb (GsdSubscriptionManager *manager)
|
||||
+{
|
||||
+ _client_maybe__show_notification (manager);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
_client_maybe__show_notification (GsdSubscriptionManager *manager)
|
||||
{
|
||||
@@ -603,7 +616,14 @@ _client_maybe__show_notification (GsdSubscriptionManager *manager)
|
||||
|
||||
/* startup */
|
||||
if (!was_read && is_read && priv->subscription_status == GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN) {
|
||||
- _show_notification (manager, _NOTIFY_REGISTRATION_REQUIRED);
|
||||
+ if (priv->startup_registration_required_notification_id == 0) {
|
||||
+ priv->startup_registration_required_notification_id =
|
||||
+ g_timeout_add_seconds (STARTUP_NOTIFICATION_DELAY,
|
||||
+ (GSourceFunc) _startup_registration_required_notification_cb, manager);
|
||||
+ } else {
|
||||
+ _show_notification (manager, _NOTIFY_REGISTRATION_REQUIRED);
|
||||
+ }
|
||||
+
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1175,6 +1195,11 @@ gsd_subscription_manager_finalize (GObject *object)
|
||||
g_clear_object (&priv->bus_cancellable);
|
||||
}
|
||||
|
||||
+ if (priv->startup_registration_required_notification_id) {
|
||||
+ g_source_remove (priv->startup_registration_required_notification_id);
|
||||
+ priv->startup_registration_required_notification_id = 0;
|
||||
+ }
|
||||
+
|
||||
g_clear_pointer (&priv->installed_products, g_ptr_array_unref);
|
||||
g_clear_pointer (&priv->introspection_data, g_dbus_node_info_unref);
|
||||
g_clear_object (&priv->connection);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user