[empathy/f20] Pull upstream patch to use empathy_ensure_individual_from_tp_contact().
Brian Pepple
bpepple at fedoraproject.org
Mon Nov 25 15:10:17 UTC 2013
commit 283fabeb34e6bbae5e097c2fe75dc9d72fd021d4
Author: Brian Pepple <bpepple at fedoraproject.org>
Date: Mon Nov 25 10:07:25 2013 -0500
Pull upstream patch to use empathy_ensure_individual_from_tp_contact().
...empathy_create_individual_from_tp_contact.patch | 102 ++++++++++++++++++++
empathy.spec | 8 ++-
2 files changed, 109 insertions(+), 1 deletions(-)
---
diff --git a/001-Remove_empathy_create_individual_from_tp_contact.patch b/001-Remove_empathy_create_individual_from_tp_contact.patch
new file mode 100644
index 0000000..c099260
--- /dev/null
+++ b/001-Remove_empathy_create_individual_from_tp_contact.patch
@@ -0,0 +1,102 @@
+From 96f2a474e0cdc5f8fe8a482d14a1a97c519def3a Mon Sep 17 00:00:00 2001
+From: Philip Withnall <philip.withnall at collabora.co.uk>
+Date: Thu, 21 Nov 2013 18:09:16 +0000
+Subject: libempathy: Remove empathy_create_individual_from_tp_contact()
+
+It has been replaced by empathy_ensure_individual_from_tp_contact(),
+which can’t cause internal state corruption in libfolks by wrapping an
+existing Persona in a second Individual when it’s already wrapped in
+one.
+
+This has also been fixed in libfolks.
+
+See: https://bugzilla.redhat.com/show_bug.cgi?id=1031252
+
+https://bugzilla.gnome.org/show_bug.cgi?id=712839
+---
+diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
+index e31b22f..b82aa93 100644
+--- a/libempathy-gtk/empathy-contact-chooser.c
++++ b/libempathy-gtk/empathy-contact-chooser.c
+@@ -232,7 +232,7 @@ get_contacts_cb (GObject *source,
+ /* another request has been started */
+ goto out;
+
+- individual = empathy_create_individual_from_tp_contact (contact);
++ individual = empathy_ensure_individual_from_tp_contact (contact);
+ if (individual == NULL)
+ goto out;
+
+diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
+index b7b0abe..7f53a7a 100644
+--- a/libempathy-gtk/empathy-individual-menu.c
++++ b/libempathy-gtk/empathy-individual-menu.c
+@@ -164,7 +164,7 @@ individual_menu_add_personas (EmpathyIndividualMenu *self,
+ goto while_finish;
+
+ contact = empathy_contact_dup_from_tp_contact (tp_contact);
+- single_individual = empathy_create_individual_from_tp_contact (
++ single_individual = empathy_ensure_individual_from_tp_contact (
+ tp_contact);
+
+ /* Pretty hacky. Creating single_individual had a side effect to change
+diff --git a/libempathy-gtk/empathy-individual-store-channel.c b/libempathy-gtk/empathy-individual-store-channel.c
+index 4064da0..a18bc33 100644
+--- a/libempathy-gtk/empathy-individual-store-channel.c
++++ b/libempathy-gtk/empathy-individual-store-channel.c
+@@ -70,7 +70,7 @@ add_members (EmpathyIndividualStoreChannel *self,
+ if (g_hash_table_lookup (self->priv->individuals, contact) != NULL)
+ continue;
+
+- individual = empathy_create_individual_from_tp_contact (contact);
++ individual = empathy_ensure_individual_from_tp_contact (contact);
+ if (individual == NULL)
+ return;
+
+diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
+index 4555d41..9ee9606 100644
+--- a/libempathy/empathy-utils.c
++++ b/libempathy/empathy-utils.c
+@@ -946,26 +946,6 @@ create_individual_from_persona (FolksPersona *persona)
+ return individual;
+ }
+
+-FolksIndividual *
+-empathy_create_individual_from_tp_contact (TpContact *contact)
+-{
+- TpfPersona *persona;
+- FolksIndividual *individual;
+-
+- persona = tpf_persona_dup_for_contact (contact);
+- if (persona == NULL)
+- {
+- DEBUG ("Failed to get a persona for %s",
+- tp_contact_get_identifier (contact));
+- return NULL;
+- }
+-
+- individual = create_individual_from_persona (FOLKS_PERSONA (persona));
+-
+- g_object_unref (persona);
+- return individual;
+-}
+-
+ /* Look for a FolksIndividual containing @contact as one of his persona
+ * and create one if needed */
+ FolksIndividual *
+diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
+index 40291b9..a9ff0d8 100644
+--- a/libempathy/empathy-utils.h
++++ b/libempathy/empathy-utils.h
+@@ -102,9 +102,6 @@ void empathy_individual_can_audio_video_call (FolksIndividual *individual,
+ gboolean empathy_client_types_contains_mobile_device (
+ const GStrv types);
+
+-FolksIndividual * empathy_create_individual_from_tp_contact (
+- TpContact *contact);
+-
+ FolksIndividual * empathy_ensure_individual_from_tp_contact (
+ TpContact *contact);
+
+--
+cgit v0.9.2
diff --git a/empathy.spec b/empathy.spec
index 7bc9bb7..024b9ea 100644
--- a/empathy.spec
+++ b/empathy.spec
@@ -17,7 +17,7 @@
Name: empathy
Version: 3.10.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Instant Messaging Client for GNOME
License: GPLv2+
@@ -25,6 +25,8 @@ URL: http://live.gnome.org/Empathy
Source0: http://download.gnome.org/sources/%{name}/3.10/%{name}-%{version}.tar.xz
Source1: %{name}-README.ConnectionManagers
+## Gnome Bug #712839
+Patch0: 001-Remove_empathy_create_individual_from_tp_contact.patch
BuildRequires: enchant-devel >= %{enchant_version}
BuildRequires: iso-codes-devel
@@ -83,6 +85,7 @@ It is built on top of the Telepathy framework.
%prep
%setup -q
+%patch0 -p1
# force this to be regenerated
rm data/empathy.desktop
@@ -197,6 +200,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/adium/message-styles/PlanetGNOME.AdiumMessageStyle/Contents/Resources/main.css
%changelog
+* Mon Nov 25 2013 Brian Pepple <bpepple at fedoraproject.org> - 3.10.2-2
+- Pull upstream patch to use empathy_ensure_individual_from_tp_contact().
+
* Mon Nov 11 2013 Richard Hughes <rhughes at redhat.com> - 3.10.2-1
- Update to 3.10.2
More information about the scm-commits
mailing list