drop spew when --makefile-install-rule is run

epel9
Ray Strode 12 years ago
parent 9a453412c7
commit 9990a3d240

@ -17,8 +17,11 @@ URL: http://projects.gnome.org/gconf/
# http://bugzilla.gnome.org/show_bug.cgi?id=568845 # http://bugzilla.gnome.org/show_bug.cgi?id=568845
Patch0: GConf-gettext.patch Patch0: GConf-gettext.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=671490
Patch1: drop-spew.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=755992 # https://bugzilla.redhat.com/show_bug.cgi?id=755992
Patch1: workaround-crash.patch Patch99: workaround-crash.patch
BuildRequires: libxml2-devel >= %{libxml2_version} BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: libxslt-devel BuildRequires: libxslt-devel
@ -63,7 +66,9 @@ development using GConf.
%prep %prep
%setup -q -n GConf-%{version} %setup -q -n GConf-%{version}
%patch0 -p1 -b .gettext %patch0 -p1 -b .gettext
%patch1 -p1 -b .workaround-crash %patch1 -p1 -b .drop-spew
%patch99 -p1 -b .workaround-crash
autoreconf -i -f autoreconf -i -f
@ -154,6 +159,7 @@ fi
%changelog %changelog
* Mon Apr 15 2013 Ray Strode <rstrode@redhat.com> 3.2.6-4 * Mon Apr 15 2013 Ray Strode <rstrode@redhat.com> 3.2.6-4
- Make pkill -HUP -f gconfd-2 work again - Make pkill -HUP -f gconfd-2 work again
- Make --makefile-install-rull less noisy
* Fri Apr 12 2013 Ray Strode <rstrode@redhat.com> 3.2.6-3 * Fri Apr 12 2013 Ray Strode <rstrode@redhat.com> 3.2.6-3
- Update GConf upgrade macros (Patch from Michael Schwendt) - Update GConf upgrade macros (Patch from Michael Schwendt)

@ -0,0 +1,98 @@
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] 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
@@ -104,9 +104,9 @@ static GConfEngine *default_engine = NULL;
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,
gboolean start_if_not_found,
@@ -382,18 +382,20 @@ gconf_engine_detach (GConfEngine *conf)
}
}
static gboolean
-ensure_dbus_connection (void)
+ensure_dbus_connection (GError **err)
{
DBusError error;
if (global_conn != NULL)
return TRUE;
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;
}
dbus_error_init (&error);
@@ -401,9 +403,12 @@ ensure_dbus_connection (void)
global_conn = dbus_bus_get_private (DBUS_BUS_SESSION, &error);
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;
}
@@ -430,15 +435,10 @@ ensure_service (gboolean start_if_not_found,
DBusError error;
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);
}
@@ -2511,9 +2511,9 @@ gboolean
gconf_ping_daemon (void)
{
if (global_conn == NULL)
{
- if (!ensure_dbus_connection ())
+ if (!ensure_dbus_connection (NULL))
{
return FALSE;
}
g_assert (global_conn != NULL);
--
1.8.1.4
Loading…
Cancel
Save