After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663829 - Butterfly -> Haze migration
Butterfly -> Haze migration
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.33.x
Other Linux
: Normal enhancement
: 3.4
Assigned To: empathy-maint
empathy-maint
: 666122 668293 (view as bug list)
Depends on:
Blocks: 663831
 
 
Reported: 2011-11-11 08:53 UTC by Guillaume Desmottes
Modified: 2012-02-21 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
protocol-chooser: stop using Butterfly (1.11 KB, patch)
2011-11-16 14:30 UTC, Guillaume Desmottes
committed Details | Review
Use the MSN account widget with Haze (1.01 KB, patch)
2011-11-16 14:30 UTC, Guillaume Desmottes
committed Details | Review
accounts-dialog: hide the switch in butterfly accounts (2.12 KB, patch)
2011-11-16 14:30 UTC, Guillaume Desmottes
committed Details | Review
explain why the account has been disabled (1.42 KB, patch)
2011-11-16 14:30 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-11-11 08:53:47 UTC
We don't want to use Butterfly any more in 3.4 (it doesn't implement ContactList and is not maintained any more).

We should:
- Stop using butterfly when creating a new account
- Migrate butterfly accounts to haze
- Ideally, migrate logs as well
Comment 1 Guillaume Desmottes 2011-11-11 12:25:21 UTC
(In reply to comment #0)
> - Migrate butterfly accounts to haze

Humm I'm not sure of the right place to do that. Ideally we should:
- if users has Haze installed: create a new Haze account and remove the Butterfly one
- If not, disable the Haze account (there is no point keeping a half working account) and display a message to the user telling him to install Haze in order to migrate his account. Once Haze is installed the account is migrated.

My initial plan was to implement it in empathy-auth-client (I implemented it actually), catching the account when handling the SASL channel and then doing the migration. Problem is, Butterfly doesn't implement SASL! The password is still stored by MC, so my beautiful code is never called. :\


So I don't know where to put this migration code.

A) In empathy-accounts: the MC4 -> MC5 migration path was there, but that means user has to open the accounts dialog in order to migrate his accounts.

B) In empathy. Not great as user can now be connected and chat without having empathy running at all.

C) In MC? As a plugin? Could work but won't allow us to warn user if Haze isn't installed...

d) As a post upgrade package hook? We could provide a small script doing but we'll have to rely on distros to hook it properly.

Other ideas?
Comment 2 Guillaume Desmottes 2011-11-11 15:14:25 UTC
I've done it with c) : https://bugs.freedesktop.org/show_bug.cgi?id=42814

Empathy should warn user if he still using Butterfly accounts.
Comment 3 Guillaume Desmottes 2011-11-11 15:26:58 UTC
(In reply to comment #0)
> - Ideally, migrate logs as well

This one is tricky as well. Just renaming the directory in ~/.local/share/TpLogger/logs to the new account prefix name is good enough to keep the logs (cool!). But which component should do it? MC could, but that would be pretty hacky as it's not supposed to know where is the logger storing its data.

Oth, even if we add API to liblogger to do the migration MC is not going to depend on it so...
Comment 4 Guillaume Desmottes 2011-11-14 12:51:57 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > - Ideally, migrate logs as well
> 
> This one is tricky as well. Just renaming the directory in
> ~/.local/share/TpLogger/logs to the new account prefix name is good enough to
> keep the logs (cool!). But which component should do it? MC could, but that
> would be pretty hacky as it's not supposed to know where is the logger storing
> its data.
> 
> Oth, even if we add API to liblogger to do the migration MC is not going to
> depend on it so...

Let's do it in the logger directly: https://bugs.freedesktop.org/show_bug.cgi?id=42917
Comment 5 Guillaume Desmottes 2011-11-16 14:30:49 UTC
Created attachment 201542 [details] [review]
protocol-chooser: stop using Butterfly

It doesn't implement any modern Telepathy API like ContactList for example and
we now rely on it.
Comment 6 Guillaume Desmottes 2011-11-16 14:30:52 UTC
Created attachment 201543 [details] [review]
Use the MSN account widget with Haze

The parameters supported by the UI have the same names as the Butterfly ones
so no change needed.
Comment 7 Guillaume Desmottes 2011-11-16 14:30:55 UTC
Created attachment 201544 [details] [review]
accounts-dialog: hide the switch in butterfly accounts

MC should migrate butterfly accounts. If it fails (typically because Haze
isn't installed) then it disables the account. There is no point allowing user
to re-enable it as it won't work properly with Empathy any way.
Comment 8 Guillaume Desmottes 2011-11-16 14:30:58 UTC
Created attachment 201545 [details] [review]
explain why the account has been disabled
Comment 9 Guillaume Desmottes 2011-11-16 14:31:36 UTC
We should wait that the MC bits have been merged and released before merging those patches but they can already be reviewed.
Comment 10 Danielle Madeley 2011-11-17 04:27:58 UTC
Review of attachment 201545 [details] [review]:

::: src/empathy-accounts-dialog.c
@@ +436,3 @@
+        {
+          accounts_dialog_status_infobar_set_message (dialog,
+              _("This account has been disabled because it rely on an old "

'relies'
'old,'
Comment 11 Danielle Madeley 2011-11-17 04:32:11 UTC
Nothing too scary here. ++

OTOH, what happens if someone wants to start hacking on butterfly again? Will MC continuously migrate their accounts to haze?
Comment 12 Guillaume Desmottes 2011-11-21 14:15:37 UTC
> Review of attachment 201545 [details] [review]:
> 
> ::: src/empathy-accounts-dialog.c
> @@ +436,3 @@
> +        {
> +          accounts_dialog_status_infobar_set_message (dialog,
> +              _("This account has been disabled because it rely on an old "
> 
> 'relies'
> 'old,'

Thx fixed.

(In reply to comment #11)
> Nothing too scary here. ++

Thanks for the review. I'll land the branch once the MC patches have been merged.

> OTOH, what happens if someone wants to start hacking on butterfly again? Will
> MC continuously migrate their accounts to haze?

Yeah. I'm ready to be convince to add a MC_USE_BUTTERFLY env variable preventing the migration but tbh I'm not sure it's worth it.(In reply to comment #10)
Comment 13 Guillaume Desmottes 2012-01-06 15:20:09 UTC
*** Bug 666122 has been marked as a duplicate of this bug. ***
Comment 14 Guillaume Desmottes 2012-01-20 12:25:29 UTC
*** Bug 668293 has been marked as a duplicate of this bug. ***
Comment 15 Guillaume Desmottes 2012-02-21 13:29:42 UTC
Attachment 201542 [details] pushed as 3826d72 - protocol-chooser: stop using Butterfly
Attachment 201543 [details] pushed as a5da0a7 - Use the MSN account widget with Haze
Attachment 201544 [details] pushed as f85fa94 - accounts-dialog: hide the switch in butterfly accounts
Attachment 201545 [details] pushed as e8dae49 - explain why the account has been disabled