slackware-current/source/l/GConf/patches/0002-dbus-Don-t-spew-to-console-when-unable-to-connect-to.patch
Patrick J Volkerding d31c50870d Slackware 14.2
Thu Jun 30 20:26:57 UTC 2016
Slackware 14.2 x86_64 stable is released!

The long development cycle (the Linux community has lately been living in
"interesting times", as they say) is finally behind us, and we're proud to
announce the release of Slackware 14.2.  The new release brings many updates
and modern tools, has switched from udev to eudev (no systemd), and adds
well over a hundred new packages to the system.  Thanks to the team, the
upstream developers, the dedicated Slackware community, and everyone else
who pitched in to help make this release a reality.

The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided
32-bit/64-bit x86/x86_64 DVD.  Please consider supporting the Slackware
project by picking up a copy from store.slackware.com.  We're taking
pre-orders now, and offer a discount if you sign up for a subscription.

Have fun!  :-)
2018-05-31 23:31:18 +02:00

87 lines
2.6 KiB
Diff

From b0895e1998ebc83ab030ec0f17c0685439f5b404 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 15 Apr 2013 09:57:34 -0400
Subject: [PATCH 02/11] dbus: Don't spew to console when unable to connect to
dbus daemon
Instead pass the error up for the caller to decide what to do.
This prevent untrappable warning messages from showing up at the
console if gconftool --makefile-install-rule is called.
---
gconf/gconf-dbus.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
index 5610fcf..048e3ea 100644
--- a/gconf/gconf-dbus.c
+++ b/gconf/gconf-dbus.c
@@ -105,7 +105,7 @@ static GHashTable *engines_by_db = NULL;
static GHashTable *engines_by_address = NULL;
static gboolean dbus_disconnected = FALSE;
-static gboolean ensure_dbus_connection (void);
+static gboolean ensure_dbus_connection (GError **error);
static gboolean ensure_service (gboolean start_if_not_found,
GError **err);
static gboolean ensure_database (GConfEngine *conf,
@@ -383,7 +383,7 @@ gconf_engine_detach (GConfEngine *conf)
}
static gboolean
-ensure_dbus_connection (void)
+ensure_dbus_connection (GError **err)
{
DBusError error;
@@ -392,7 +392,9 @@ ensure_dbus_connection (void)
if (dbus_disconnected)
{
- g_warning ("The connection to DBus was broken. Can't reinitialize it.");
+ g_set_error (err, GCONF_ERROR,
+ GCONF_ERROR_NO_SERVER,
+ "The connection to DBus was broken. Can't reinitialize it.");
return FALSE;
}
@@ -402,7 +404,10 @@ ensure_dbus_connection (void)
if (!global_conn)
{
- g_warning ("Client failed to connect to the D-BUS daemon:\n%s", error.message);
+ g_set_error (err, GCONF_ERROR,
+ GCONF_ERROR_NO_SERVER,
+ "Client failed to connect to the D-BUS daemon:\n%s",
+ error.message);
dbus_error_free (&error);
return FALSE;
@@ -431,13 +436,8 @@ ensure_service (gboolean start_if_not_found,
if (global_conn == NULL)
{
- if (!ensure_dbus_connection ())
- {
- g_set_error (err, GCONF_ERROR,
- GCONF_ERROR_NO_SERVER,
- _("No D-BUS daemon running\n"));
- return FALSE;
- }
+ if (!ensure_dbus_connection (err))
+ return FALSE;
g_assert (global_conn != NULL);
}
@@ -2512,7 +2512,7 @@ gconf_ping_daemon (void)
{
if (global_conn == NULL)
{
- if (!ensure_dbus_connection ())
+ if (!ensure_dbus_connection (NULL))
{
return FALSE;
}
--
2.6.4