From 5e1d2488ba44ab3649dd3de0bee36cb92cdf0338 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 2 May 2011 14:28:23 -0400 Subject: [PATCH] try to fix a crash --- ...h-absence-of-gnome-session-gracefull.patch | 44 +++++++++++++++++++ gnome-settings-daemon.spec | 7 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-updates-deal-with-absence-of-gnome-session-gracefull.patch diff --git a/0001-updates-deal-with-absence-of-gnome-session-gracefull.patch b/0001-updates-deal-with-absence-of-gnome-session-gracefull.patch new file mode 100644 index 0000000..6d4347c --- /dev/null +++ b/0001-updates-deal-with-absence-of-gnome-session-gracefull.patch @@ -0,0 +1,44 @@ +From 5de806c640d812041d0174307c628e0385c81561 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 2 May 2011 14:23:53 -0400 +Subject: [PATCH] updates: deal with absence of gnome-session gracefully + +This was leading to crashes when g-s-d got started under xfce. +--- + plugins/updates/gsd-updates-refresh.c | 13 +++++++++---- + 1 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c +index 15e6917..60d5f80 100644 +--- a/plugins/updates/gsd-updates-refresh.c ++++ b/plugins/updates/gsd-updates-refresh.c +@@ -560,7 +560,7 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh) + /* use gnome-session for the idle detection */ + refresh->priv->proxy_session = + g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, +- G_DBUS_PROXY_FLAGS_NONE, ++ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, + NULL, /* GDBusInterfaceInfo */ + "org.gnome.SessionManager", + "/org/gnome/SessionManager/Presence", +@@ -578,9 +578,14 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh) + refresh); + status = g_dbus_proxy_get_cached_property (refresh->priv->proxy_session, + "status"); +- g_variant_get (status, "u", &status_code); +- refresh->priv->session_idle = (status_code == PRESENCE_STATUS_IDLE); +- g_variant_unref (status); ++ if (status) { ++ g_variant_get (status, "u", &status_code); ++ refresh->priv->session_idle = (status_code == PRESENCE_STATUS_IDLE); ++ g_variant_unref (status); ++ } ++ else { ++ refresh->priv->session_idle = FALSE; ++ } + } + + /* we check this in case we miss one of the async signals */ +-- +1.7.5 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 6c57d35..283fd58 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 3.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -40,6 +40,7 @@ BuildRequires: libgudev1-devel BuildRequires: nss-devel Patch0: 0001-datetime-Fix-setting-NTP-on-Fedora-15.patch +Patch1: 0001-updates-deal-with-absence-of-gnome-session-gracefull.patch %description A daemon to share settings from GNOME to other applications. It also @@ -58,6 +59,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .sysv +%patch1 -p1 -b .updates-crash autoreconf -i -f @@ -200,6 +202,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/gnome-settings-daemon-3.0/input-device-example.sh %changelog +* Mon Mon 2 2011 Matthias Clasen 3.0.1-3 +- Try to fix a crash (#698533) + * Thu Apr 28 2011 Bastien Nocera 3.0.1-2 - Fix setting ntpd usage with SystemD