[folks/f16] Add patch from git to fix gnome-shell crashes

Colin Walters walters at fedoraproject.org
Sun Nov 27 20:49:01 UTC 2011


commit fd763035bc7d6d37cec7cbee59d63d5f02f16348
Author: Colin Walters <walters at verbum.org>
Date:   Sun Nov 27 15:48:37 2011 -0500

    Add patch from git to fix gnome-shell crashes

 ...Details-public-strings-are-non-null-as-we.patch |   57 ++++++++++++++++++++
 folks.spec                                         |    9 +++-
 2 files changed, 64 insertions(+), 2 deletions(-)
---
diff --git a/0001-Ensure-NameDetails-public-strings-are-non-null-as-we.patch b/0001-Ensure-NameDetails-public-strings-are-non-null-as-we.patch
new file mode 100644
index 0000000..f78af5d
--- /dev/null
+++ b/0001-Ensure-NameDetails-public-strings-are-non-null-as-we.patch
@@ -0,0 +1,57 @@
+From 50bc2ead6f963da7942d1c06cdd5e1a9e354fc85 Mon Sep 17 00:00:00 2001
+From: Travis Reitter <travis.reitter at collabora.co.uk>
+Date: Mon, 14 Nov 2011 14:29:21 -0800
+Subject: [PATCH] Ensure NameDetails public strings are non-null as we
+ promise.
+
+Closes: bug#663889 - crash due to NameDetails which fail to guarantee
+non-null full-name/nickname
+---
+ NEWS                                    |    2 ++
+ backends/eds/lib/edsf-persona.vala      |    2 ++
+ backends/telepathy/lib/tpf-persona.vala |    2 ++
+ backends/tracker/lib/trf-persona.vala   |    2 ++
+ 4 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index f2754c1..9805051 100644
+--- a/backends/eds/lib/edsf-persona.vala
++++ b/backends/eds/lib/edsf-persona.vala
+@@ -700,6 +700,8 @@ public class Edsf.Persona : Folks.Persona,
+       var full_name =
+           (string) Edsf.Persona._get_property_from_contact (contact,
+               "full_name");
++      if (full_name == null)
++        full_name = "";
+ 
+       debug ("Creating new Edsf.Persona with IID '%s'", iid);
+ 
+diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
+index 2a626c9..b25ee32 100644
+--- a/backends/telepathy/lib/tpf-persona.vala
++++ b/backends/telepathy/lib/tpf-persona.vala
+@@ -752,6 +752,8 @@ public class Tpf.Persona : Folks.Persona,
+           else if (info.field_name == "fn")
+             {
+               new_full_name = info.field_value[0];
++              if (new_full_name == null)
++                new_full_name = "";
+             }
+           else if (info.field_name == "tel")
+             {
+diff --git a/backends/tracker/lib/trf-persona.vala b/backends/tracker/lib/trf-persona.vala
+index 636bbe3..45c674a 100644
+--- a/backends/tracker/lib/trf-persona.vala
++++ b/backends/tracker/lib/trf-persona.vala
+@@ -1102,6 +1102,8 @@ public class Trf.Persona : Folks.Persona,
+           var proto = addr_info[Trf.IMFields.PROTO];
+           var account_id = addr_info[Trf.IMFields.ID];
+           var nickname = addr_info[Trf.IMFields.IM_NICKNAME];
++          if (nickname == null)
++            nickname = "";
+ 
+           this._update_nickname (nickname);
+           this._add_im_address (tracker_id, proto, account_id, false);
+-- 
+1.7.6.4
+
diff --git a/folks.spec b/folks.spec
index b1aaf6e..e643dde 100644
--- a/folks.spec
+++ b/folks.spec
@@ -3,7 +3,7 @@
 Name:           folks
 Epoch:          1
 Version:        0.6.5
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        GObject contact aggregation library
 
 Group:          System Environment/Libraries
@@ -11,6 +11,8 @@ License:        LGPLv2+
 URL:            http://telepathy.freedesktop.org/wiki/Folks
 Source0:        http://download.gnome.org/sources/folks/0.6/%{name}-%{version}.tar.xz
 
+Patch0:		0001-Ensure-NameDetails-public-strings-are-non-null-as-we.patch
+
 BuildRequires:  telepathy-glib-devel >= %{tp_glib_ver}
 BuildRequires:  telepathy-glib-vala
 BuildRequires:  glib2-devel
@@ -47,7 +49,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q
-
+%patch0 -p1
 
 %build
 %configure --disable-static --enable-eds-backend
@@ -83,6 +85,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
 
 %changelog
+* Sun Nov 27 2011 Colin Walters <walters at verbum.org> - 1:0.6.5-2
+- Add patch from git to fix gnome-shell crashes
+
 * Fri Nov 11 2011 Brian Pepple <bpepple at fedoraproject.org> - 1:0.6.5-1
 - Update to 0.6.5.
 


More information about the scm-commits mailing list