diff -Nru folks-0.9.5/debian/changelog folks-0.9.5/debian/changelog --- folks-0.9.5/debian/changelog 2014-03-20 19:32:41.000000000 +0000 +++ folks-0.9.5/debian/changelog 2014-04-04 15:55:17.000000000 +0000 @@ -1,3 +1,10 @@ +folks (0.9.5-1ubuntu5) trusty; urgency=medium + + * debian/patches/fixed-folks-disable-linking.patch + - Fixed disable linking when FOLKS_DISABLE_LINKING is set. + + -- Renato Araujo Oliveira Filho Fri, 04 Apr 2014 12:35:25 -0300 + folks (0.9.5-1ubuntu4) trusty; urgency=medium * debian/patches/bz726787.patch diff -Nru folks-0.9.5/debian/patches/fixed-folks-disable-linking.patch folks-0.9.5/debian/patches/fixed-folks-disable-linking.patch --- folks-0.9.5/debian/patches/fixed-folks-disable-linking.patch 1970-01-01 00:00:00.000000000 +0000 +++ folks-0.9.5/debian/patches/fixed-folks-disable-linking.patch 2014-04-04 15:55:17.000000000 +0000 @@ -0,0 +1,78 @@ +From 6c096c49ecaa112a6ae635aa9bebce0f49d83996 Mon Sep 17 00:00:00 2001 +From: Renato Araujo Oliveira Filho +Date: Mon, 31 Mar 2014 16:14:16 -0300 +Subject: [PATCH 1/3] Fixed FOLKS_DISABLE_LINKING. + +Avoid candidate list get populate during the first step of _add_personas +function, this could cause problems during the second step of the function. +--- + folks/individual-aggregator.vala | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala +index 06d0f3d..e1da1da 100644 +--- a/folks/individual-aggregator.vala ++++ b/folks/individual-aggregator.vala +@@ -1213,7 +1213,8 @@ public class Folks.IndividualAggregator : Object + + /* If the Persona is the user, we *always* want to link it to the + * existing this.user. */ +- if (persona.is_user == true && user != null && ++ if (this._linking_enabled == true && ++ persona.is_user == true && user != null && + ((!) user).has_anti_link_with_persona (persona) == false) + { + debug (" Found candidate individual '%s' as user.", +@@ -1223,7 +1224,8 @@ public class Folks.IndividualAggregator : Object + + /* If we don't trust the PersonaStore at all, we can't link the + * Persona to any existing Individual */ +- if (trust_level != PersonaStoreTrust.NONE) ++ if (this._linking_enabled == true && ++ trust_level != PersonaStoreTrust.NONE) + { + unowned GenericArray? candidates = + this._link_map.get (persona.iid); +@@ -1245,7 +1247,8 @@ public class Folks.IndividualAggregator : Object + } + } + +- if (persona.store.trust_level == PersonaStoreTrust.FULL) ++ if (this._linking_enabled == true && ++ persona.store.trust_level == PersonaStoreTrust.FULL) + { + /* If we trust the PersonaStore the Persona came from, we can + * attempt to link based on its linkable properties. */ +@@ -1304,6 +1307,7 @@ public class Folks.IndividualAggregator : Object + /* Ensure the original persona makes it into the final individual */ + final_personas.add (persona); + ++ assert (this._linking_enabled == true || candidate_inds.size == 0); + if (candidate_inds.size > 0 && this._linking_enabled == true) + { + /* The Persona's IID or linkable properties match one or more +@@ -1316,7 +1320,7 @@ public class Folks.IndividualAggregator : Object + final_personas.add_all (individual.personas); + } + } +- else if (candidate_inds.size > 0) ++ else if (!this._linking_enabled) + { + debug (" Linking disabled."); + } +@@ -1400,6 +1404,12 @@ public class Folks.IndividualAggregator : Object + private void _persona_linkable_property_changed_cb (Object obj, + ParamSpec pspec) + { ++ /* Ignore it if the link is disabled */ ++ if (this._linking_enabled == false) ++ { ++ return; ++ } ++ + /* The value of one of the linkable properties of one the personas has + * changed, so that persona might require re-linking. We do this in a + * simplistic and hacky way (which should work) by simply treating the +-- +1.9.1 + diff -Nru folks-0.9.5/debian/patches/series folks-0.9.5/debian/patches/series --- folks-0.9.5/debian/patches/series 2014-03-20 19:15:38.000000000 +0000 +++ folks-0.9.5/debian/patches/series 2014-04-04 15:55:17.000000000 +0000 @@ -3,3 +3,4 @@ bz724809.patch bz724058.patch bz726787.patch +fixed-folks-disable-linking.patch