GNOME Bugzilla – Bug 612519
Handle a butterfly network ID migration
Last modified: 2011-08-29 10:12:28 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.
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.
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.
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.
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
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.
(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.
Branch looks good. I'll send a email asking for yet another exception. I let you know when we can merge it.
Great stuff, thanks.
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.
I added a comment to bug #612555 about this too.