[Pkg-telepathy-commits] [SCM] MC 5 packaging branch, debian, updated. debian/1%5.12.1-2-4-g07a42a9

Simon McVittie smcv at debian.org
Thu Sep 6 17:21:20 UTC 2012


The following commit has been merged in the debian branch:
commit b62d1d749f79e78002b106f027cb1c8c1583ba0a
Author: Simon McVittie <smcv at debian.org>
Date:   Thu Sep 6 17:06:11 2012 +0100

    Add patch from upstream stable release 5.12.2 to enable migration of Butterfly accounts to Haze after Butterfly has been uninstalled (Closes: #686835)

diff --git a/debian/changelog b/debian/changelog
index 7b7af16..4eb7173 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ telepathy-mission-control-5 (1:5.12.1-3) UNRELEASED; urgency=low
   * Add patches from upstream stable release 5.12.2 to fix deletion of
     passwords from gnome-keyring, in particular when upgrading Empathy
     from squeeze to wheezy triggers a format migration. (Closes: #686836)
+  * Add patch from upstream stable release 5.12.2 to enable migration of
+    Butterfly accounts to Haze after Butterfly has been uninstalled
+    (Closes: #686835)
 
  -- Simon McVittie <smcv at debian.org>  Thu, 06 Sep 2012 09:41:30 +0100
 
diff --git a/debian/patches/0014-Migrate-from-Butterfly-to-Haze-even-if-Butterfly-is-.patch b/debian/patches/0014-Migrate-from-Butterfly-to-Haze-even-if-Butterfly-is-.patch
new file mode 100644
index 0000000..932ea4e
--- /dev/null
+++ b/debian/patches/0014-Migrate-from-Butterfly-to-Haze-even-if-Butterfly-is-.patch
@@ -0,0 +1,98 @@
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Thu, 6 Sep 2012 16:43:19 +0100
+Subject: [PATCH 14/16] Migrate from Butterfly to Haze even if Butterfly is no
+ longer installed
+
+Mission Control has a bug/design flaw/whatever in which it doesn't
+know the types of parameters without looking at the corresponding
+connection manager, which doesn't work if that connection manager has
+been uninstalled. This turns out to be bad for the upgrade from
+Debian 6 to Debian 7, which upgrades MC to a version that will
+perform the migration from Butterfly to Haze, but also uninstalls
+Butterfly...
+
+Since we know what the type of 'account' is, with a bit of refactoring
+we can tell McdAccount that we know it's a string, get its value
+anyway, and get on with our lives.
+
+Bug-Debian: http://bugs.debian.org/686835
+Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
+Origin: upstream, 5.12.2, commit:3ae49c706e93d06131cabf5b4a0421869948ec62
+---
+ src/mcd-account-manager.c |    4 +++-
+ src/mcd-account.c         |   18 +++++++++++++++---
+ src/mcd-account.h         |    6 ++++++
+ 3 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
+index 4d93220..a13ba03 100644
+--- a/src/mcd-account-manager.c
++++ b/src/mcd-account-manager.c
+@@ -1222,7 +1222,9 @@ migrate_butterfly_haze_ready (McdManager *manager,
+     }
+ 
+     /* Parameters; we just care about 'account' */
+-    if (!mcd_account_get_parameter (ctx->account, "account", &v, NULL))
++    if (!mcd_account_get_parameter_of_known_type (ctx->account,
++                                                  "account", G_TYPE_STRING,
++                                                  &v, NULL))
+     {
+         _mcd_account_set_enabled (ctx->account, FALSE, TRUE, NULL);
+         goto error;
+diff --git a/src/mcd-account.c b/src/mcd-account.c
+index 192d8d9..1864e7d 100644
+--- a/src/mcd-account.c
++++ b/src/mcd-account.c
+@@ -429,16 +429,28 @@ mcd_account_get_parameter (McdAccount *account, const gchar *name,
+                            GError **error)
+ {
+     McdAccountPrivate *priv = account->priv;
+-    McdStorage *storage = priv->storage;
+-    gchar key[MAX_KEY_LENGTH];
+     const TpConnectionManagerParam *param;
+     GType type;
+-    const gchar *account_name = mcd_account_get_unique_name (account);
+ 
+     param = mcd_manager_get_protocol_param (priv->manager,
+                                             priv->protocol_name, name);
+     type = mc_param_type (param);
+ 
++    return mcd_account_get_parameter_of_known_type (account, name,
++                                                    type, parameter, error);
++}
++
++gboolean
++mcd_account_get_parameter_of_known_type (McdAccount *account,
++                                         const gchar *name,
++                                         GType type,
++                                         GValue *parameter,
++                                         GError **error)
++{
++    const gchar *account_name = mcd_account_get_unique_name (account);
++    McdStorage *storage = account->priv->storage;
++    gchar key[MAX_KEY_LENGTH];
++
+     g_snprintf (key, sizeof (key), "param-%s", name);
+ 
+     if (mcd_storage_has_value (storage, account_name, key))
+diff --git a/src/mcd-account.h b/src/mcd-account.h
+index 6b0dd60..90e429a 100644
+--- a/src/mcd-account.h
++++ b/src/mcd-account.h
+@@ -148,6 +148,12 @@ gboolean mcd_account_get_parameter (McdAccount *account, const gchar *name,
+                            GValue *parameter,
+                            GError **error);
+ 
++gboolean mcd_account_get_parameter_of_known_type (McdAccount *account,
++                                                  const gchar *name,
++                                                  GType type,
++                                                  GValue *parameter,
++                                                  GError **error);
++
+ gchar * mcd_account_dup_icon (McdAccount *self);
+ 
+ gchar * mcd_account_dup_nickname (McdAccount *self);
+-- 
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 2569a55..fea8b8c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0011-_keyring_commit-perform-deletions-for-keys-in-remove.patch
 0012-Default-account-backend-when-deleting-from-the-keyri.patch
 0013-Default-account-backend-when-deleting-passwords-dele.patch
+0014-Migrate-from-Butterfly-to-Haze-even-if-Butterfly-is-.patch

-- 
MC 5 packaging



More information about the Pkg-telepathy-commits mailing list