From fadb9d8eaf27f088c38c5d474ec221db626f35f7 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Feb 15 2010 18:53:05 +0000 Subject: - Add patch to avoid assertions when setting a GError that includes a '-' in the enumeration value. Should fix #528897 --- diff --git a/0001-Squash-underscores-and-dashes-in-errors-when-convert.patch b/0001-Squash-underscores-and-dashes-in-errors-when-convert.patch new file mode 100644 index 0000000..9886338 --- /dev/null +++ b/0001-Squash-underscores-and-dashes-in-errors-when-convert.patch @@ -0,0 +1,39 @@ +From 35b30ed4f5e7678ab75affad0ec2fb1869eec384 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 1 Feb 2010 10:09:53 -0500 +Subject: [PATCH] Squash underscores and dashes in errors when converting to DBus errors + +We were just taking the enumeration nick and appending to the DBus +error name, but since these can contain '-' we need to squash. +--- + dbus/dbus-gobject.c | 13 +++++++++++-- + 1 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c +index f75a3b1..9fca6a2 100644 +--- a/dbus/dbus-gobject.c ++++ b/dbus/dbus-gobject.c +@@ -1093,9 +1093,18 @@ gerror_domaincode_to_dbus_error_name (const DBusGObjectInfo *object_info, + } + else + { +- dbus_error_name = g_string_new (domain_str); ++ char *domain_member, *code_member; ++ ++ /* TODO should further validate these */ ++ domain_member = uscore_to_wincaps (domain_str); ++ code_member = uscore_to_wincaps (code_str); ++ ++ dbus_error_name = g_string_new (domain_member); + g_string_append_c (dbus_error_name, '.'); +- g_string_append (dbus_error_name, code_str); ++ g_string_append (dbus_error_name, code_member); ++ ++ g_free (domain_member); ++ g_free (code_member); + } + + return g_string_free (dbus_error_name, FALSE); +-- +1.6.6 + diff --git a/dbus-glib.spec b/dbus-glib.spec index 821400c..e14f725 100644 --- a/dbus-glib.spec +++ b/dbus-glib.spec @@ -8,7 +8,7 @@ Summary: GLib bindings for D-Bus Name: dbus-glib Version: 0.84 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.freedesktop.org/software/dbus/ Source0: http://dbus.freedesktop.org/releases/dbus-glib/%{name}-%{version}.tar.gz License: AFL and GPLv2+ @@ -22,10 +22,11 @@ BuildRequires: libxml2-devel BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gettext BuildRequires: autoconf - # this patch requires autoreconf BuildRequires: autoconf automake libtool gettext-devel gtk-doc +Patch0: 0001-Squash-underscores-and-dashes-in-errors-when-convert.patch + %description D-Bus add-on library to integrate the standard D-Bus library with @@ -58,6 +59,7 @@ D-Bus tools written using the gtk+ GUI libaries %prep %setup -q +%patch0 -p1 %build libtoolize --force --copy @@ -115,6 +117,10 @@ rm -rf %{buildroot} %endif %changelog +* Mon Feb 15 2010 Colin Walters - 0.84-2 +- Add patch to avoid assertions when setting a GError that + includes a '-' in the enumeration value. Should fix #528897 + * Wed Jan 27 2010 Colin Walters - 0.84-1 - New upstream Has introspect.xml internally, drop it from here