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 612519 - Handle a butterfly network ID migration
Handle a butterfly network ID migration
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Archives
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-11 00:32 UTC by Jonny Lamb
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonny Lamb 2010-03-11 00:32:18 UTC
We should probably remove the network ID suffixes on contact IDs in butterfly. Louis-Francis wrote a patch a while ago which works great -- it's in use on maemo. The reason I've not merged it to butterfly git is because everyone's logs in Empathy will be broken.

First of all, do we care? If not, then I'll happily merge it right away.

If we do care (which we probably do), we should provide some kind of migration of logs. The easiest would be to move path/to/logs/foo@bar#1 to path/to/logs/foo@bar, which is pretty simple. Last time I looked at this issue, I was rather convinced that this would be sufficient -- I.e. there is no need to sed the actual log files themselves.

Any advice on this then, Guillaume? I should have seen to this sooner, sigh.
Comment 1 Guillaume Desmottes 2010-03-11 08:50:19 UTC
We need to keep logs, if you think that moving file is enough please go for it.
We should indeed do that asap because logs storage will move to tp-logger soon.
Comment 2 Jonny Lamb 2010-03-12 02:26:22 UTC
Okay, I've written a patch to do this:

http://git.collabora.co.uk/?p=user/jonny/empathy.git;a=shortlog;h=refs/heads/butterfly-networkid

The whole patch makes me so sad, mainly because it's just such a jawdroppingly large number of lines of code. :-(

Anyway, yeah, works for me. When this goes in, I'll add it to bug #612555 so we remove this hack when we no longer care about old butterfly.

Sad times.
Comment 3 Jonny Lamb 2010-03-12 09:14:54 UTC
Oh, also, I put the code in empathy-main-window as that's where the EmpathyContactList callback is, and there's no -utils.c file in src/. I could add a new file and add this migration code to said file instead if you'd prefer though? That's a fair bit neater.
Comment 4 Jonny Lamb 2010-03-12 10:29:56 UTC
If you want to test this, my networkid butterfly branch is here:

http://git.collabora.co.uk/?p=user/jonny/telepathy-butterfly.git;a=shortlog;h=refs/heads/networkid
Comment 5 Guillaume Desmottes 2010-03-12 15:04:28 UTC
This patch breaks UI freeze as gconf key descriptions are translated :(

Yeah I'd prefer to have this code in another.

Maybe we could disconnect the contact-added signal once we're done with it?

When was used the '#32' suffix?

+                       new_name = g_strndup (subdir, (strlen (subdir) - 2));
This won't remove the '#' if the suffix is #32.
Comment 6 Jonny Lamb 2010-03-12 16:48:54 UTC
(In reply to comment #5)
> This patch breaks UI freeze as gconf key descriptions are translated :(

:-(

> Yeah I'd prefer to have this code in another.

Another file? Done.

> Maybe we could disconnect the contact-added signal once we're done with it?

Done.

> When was used the '#32' suffix?

Yahoo!

> +                       new_name = g_strndup (subdir, (strlen (subdir) - 2));
> This won't remove the '#' if the suffix is #32.

Haha, good point!

Okay, I've updated the branch. I squashed all the commits because moving the functions to a new file made the odd anyway.
Comment 7 Guillaume Desmottes 2010-03-12 17:47:47 UTC
Branch looks good. I'll send a email asking for yet another exception. I let you know when we can merge it.
Comment 8 Jonny Lamb 2010-03-12 18:04:52 UTC
Great stuff, thanks.
Comment 9 Guillaume Desmottes 2010-03-15 08:13:17 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 10 Jonny Lamb 2010-03-15 08:14:56 UTC
I added a comment to bug #612555 about this too.