Bug 49737

Summary: [1.0] full parallel-installability of CMs and MC
Product: Telepathy Reporter: Jonny Lamb <jonny.lamb>
Component: tp-specAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: xclaesse
Version: git masterKeywords: patch
Hardware: Other   
OS: All   
Whiteboard: review?
i915 platform: i915 features:
Bug Depends on: 70990, 71262    
Bug Blocks: 23148, 68660, 70991    
Attachments: telepathy-glib docs: add $(DOC_MODULE_VERSION)
[gabble next] Be parallel-installable with Gabble 0.x
[salut next 1/2] Install salut.manager to the correct directory
[salut next 2/2] Be parallel-installable with Salut 0.x
[idle next] Be parallel-installable with Idle 0.x
[rakia next] Be parallel-installable with Rakia 0
[haze next] Be parallel-installable with Haze 0.x
[tp-glib master] examples: explicitly ask for TelepathyGLib-0.12
[tp-glib next 1/2] Rename the Logger's GIR to TelepathyLogger-1
[tp-glib next 2/2] examples: explicitly ask for TelepathyGLib-1
[MC next] Split documentation to be fully parallel-installable with MC 5

Description Jonny Lamb 2012-05-10 07:49:15 UTC
Will and I were just thinking about whether we could have Telepathy 0.20 and 1.0 installed at the same time. Given they've changed bus names there's no conflict there at all, but we can't have old and new gabble installed due to manager file conflict.

Here's a list of things that will need to be changed:

    /usr/share/telepathy → /usr/share/telepathy-1

    ~/.mission-control → [something, also see bug #35896]

Anything else?
Comment 1 Simon McVittie 2013-10-29 11:12:26 UTC
Low-hanging fruit:

* Move .client files to ${datadir}/telepathy-1/clients
  [spec, MC, tp-glib?, Logger, Empathy, all regression tests]

* Move .manager files to ${datadir}/telepathy-1/managers
  [spec, tp-glib, MC?, all CMs, all regression tests including Folks]

* Decide whether Telepathy 0 and Telepathy 1 can safely share the avatar cache
  (I think the answer is probably "yes")
  [spec, tp-glib]

* Make MC load accounts from ${XDG_DATA_DIRS}/telepathy-1/mission-control
  or maybe ${XDG_DATA_DIRS}/telepathy-1/accounts - for now, load *only*
  from there, and I'll file a separate bug for a migration step
  (see also Bug #54875 which introduces a more sensible account storage
  format, "some stringified GVariants")
  [MC]

* Make MC use a different file for its crash-recovery state dump
  [MC]

* rename Telepathy-1.gir to Telepathy1-1.gir? (ask g-i people
  whether this is desirable?)
  [tp-glib, Folks, ...]

* make MC install mc6-tool (or maybe rename to telepathy-account)
  and mc6-wait-for-name
  [MC]

* make sure all docs, etc. are parallel-installable, for instance
  by installing Telepathy 0 and Telepathy 1 to separate clean prefixes
  and scripting a comparison
  [tp-glib, MC, Logger, tp-farstream]
Comment 2 Simon McVittie 2013-10-29 11:14:10 UTC
I opened Bug #70990 separately since it's more involved.
Comment 3 Simon McVittie 2013-10-29 11:19:02 UTC
(In reply to comment #1)
> * Make MC load accounts from ${XDG_DATA_DIRS}/telepathy-1/mission-control
>   or maybe ${XDG_DATA_DIRS}/telepathy-1/accounts - for now, load *only*
>   from there, and I'll file a separate bug for a migration step

Bug #70991.
Comment 4 Guillaume Desmottes 2013-10-29 14:09:01 UTC
(In reply to comment #1)
> * Move .client files to ${datadir}/telepathy-1/clients
>   [spec, MC, tp-glib?, Logger, Empathy, all regression tests]

http://cgit.collabora.com/git/user/cassidy/telepathy-spec/log/?h=move-client
http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=move-client
http://cgit.collabora.com/git/user/cassidy/telepathy-logger/log/?h=move-client
http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=move-client

Neither tp-glib or its unit tests uses client files so I think that's all of them.
Comment 5 Simon McVittie 2013-10-29 14:33:34 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > * Move .client files to ${datadir}/telepathy-1/clients
> >   [spec, MC, tp-glib?, Logger, Empathy, all regression tests]
> 
> http://cgit.collabora.com/git/user/cassidy/telepathy-spec/log/?h=move-client
> http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> ?h=move-client
> http://cgit.collabora.com/git/user/cassidy/telepathy-logger/log/?h=move-
> client
> http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=move-client
> 
> Neither tp-glib or its unit tests uses client files so I think that's all of
> them.

All of those look good.
Comment 6 Guillaume Desmottes 2013-10-31 09:17:18 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #1)
> > > * Move .client files to ${datadir}/telepathy-1/clients
> > >   [spec, MC, tp-glib?, Logger, Empathy, all regression tests]
> > 
> > http://cgit.collabora.com/git/user/cassidy/telepathy-spec/log/?h=move-client
> > http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> > ?h=move-client
> > http://cgit.collabora.com/git/user/cassidy/telepathy-logger/log/?h=move-
> > client
> > http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=move-client
> > 
> > Neither tp-glib or its unit tests uses client files so I think that's all of
> > them.
> 
> All of those look good.

Merged.
Comment 8 Guillaume Desmottes 2013-10-31 10:16:35 UTC
(In reply to comment #1)
> * make MC install mc6-tool (or maybe rename to telepathy-account)
>   and mc6-wait-for-name
>   [MC]

http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=next-rename
Comment 9 Guillaume Desmottes 2013-10-31 10:44:53 UTC
(In reply to comment #1)
> * Make MC use a different file for its crash-recovery state dump
>   [MC]

Also in http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=next-rename
Comment 10 Guillaume Desmottes 2013-10-31 11:22:28 UTC
(In reply to comment #1)
> * Make MC load accounts from ${XDG_DATA_DIRS}/telepathy-1/mission-control
>   or maybe ${XDG_DATA_DIRS}/telepathy-1/accounts - for now, load *only*
>   from there, and I'll file a separate bug for a migration step
>   (see also Bug #54875 which introduces a more sensible account storage
>   format, "some stringified GVariants")
>   [MC]

http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=nex-accounts
Comment 11 Simon McVittie 2013-10-31 13:09:28 UTC
(In reply to comment #10)
> http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> ?h=nex-accounts

++ as a starting point, although we should also check the various fallback paths that it uses. I think we should perhaps "#if 0" the handling of ~/.missioncontrol for now, and reinstate it when we've worked out how old-account importing/migration works.
Comment 12 Simon McVittie 2013-10-31 13:11:56 UTC
(In reply to comment #8)
> (In reply to comment #1)
> > * make MC install mc6-tool (or maybe rename to telepathy-account)
> >   and mc6-wait-for-name
> >   [MC]
> 
> http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> ?h=next-rename

++ as a starting point (including the move-manager part) but please also check the content of the man pages.
Comment 15 Guillaume Desmottes 2013-10-31 16:05:18 UTC
(In reply to comment #12)
> (In reply to comment #8)
> > (In reply to comment #1)
> > > * make MC install mc6-tool (or maybe rename to telepathy-account)
> > >   and mc6-wait-for-name
> > >   [MC]
> > 
> > http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> > ?h=next-rename
> 
> ++ as a starting point (including the move-manager part) but please also
> check the content of the man pages.

Inded I forgot about the content, fixed in
http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=next-rename
Comment 16 Simon McVittie 2013-10-31 16:06:14 UTC
(In reply to comment #15)
> Inded I forgot about the content, fixed in
> http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> ?h=next-rename

Ship it
Comment 17 Guillaume Desmottes 2013-10-31 16:20:27 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> > ?h=nex-accounts
> 
> ++ as a starting point, although we should also check the various fallback
> paths that it uses. I think we should perhaps "#if 0" the handling of
> ~/.missioncontrol for now, and reinstate it when we've worked out how
> old-account importing/migration works.

Merged.

I tried #if 0'ing this code ( http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/?h=next-old-location )
Comment 18 Guillaume Desmottes 2013-10-31 16:22:19 UTC
(In reply to comment #1)
> Low-hanging fruit:
> 
> * Move .client files to ${datadir}/telepathy-1/clients
>   [spec, MC, tp-glib?, Logger, Empathy, all regression tests]

done.

> * Move .manager files to ${datadir}/telepathy-1/managers
>   [spec, tp-glib, MC?, all CMs, all regression tests including Folks]

done.
 
> * Decide whether Telepathy 0 and Telepathy 1 can safely share the avatar
> cache
>   (I think the answer is probably "yes")
>   [spec, tp-glib]

Xavier: you know more about avatars caching as I do; any advice?

> * Make MC load accounts from ${XDG_DATA_DIRS}/telepathy-1/mission-control
>   or maybe ${XDG_DATA_DIRS}/telepathy-1/accounts - for now, load *only*
>   from there, and I'll file a separate bug for a migration step
>   (see also Bug #54875 which introduces a more sensible account storage
>   format, "some stringified GVariants")
>   [MC]

done.

> * Make MC use a different file for its crash-recovery state dump
>   [MC]

done.

> * rename Telepathy-1.gir to Telepathy1-1.gir? (ask g-i people
>   whether this is desirable?)
>   [tp-glib, Folks, ...]

It's still not clear what's the right answer here. I'd vote for 'Telepathy1-0.gir' I think.

> * make MC install mc6-tool (or maybe rename to telepathy-account)
>   and mc6-wait-for-name
>   [MC]

done.

> * make sure all docs, etc. are parallel-installable, for instance
>   by installing Telepathy 0 and Telepathy 1 to separate clean prefixes
>   and scripting a comparison
>   [tp-glib, MC, Logger, tp-farstream]

TODO
Comment 19 Simon McVittie 2013-11-04 12:09:16 UTC
Created attachment 88604 [details] [review]
telepathy-glib docs: add $(DOC_MODULE_VERSION)

---

Here's a nice simple one.
Comment 20 Xavier Claessens 2013-11-07 15:41:17 UTC
+1
Comment 21 Simon McVittie 2013-11-11 20:13:51 UTC
Comment on attachment 88604 [details] [review]
telepathy-glib docs: add $(DOC_MODULE_VERSION)

Merged for 0.99.5, thanks.
Comment 22 Simon McVittie 2013-11-12 13:45:34 UTC
Created attachment 89087 [details] [review]
[gabble next] Be parallel-installable with Gabble 0.x

... apart from /usr/share/doc, which packagers will probably
shuffle around according to distro policy anyway.

Also use telepathy-glib-1 and telepathy-glib-1-dbus in the .pc files.
Comment 23 Simon McVittie 2013-11-12 13:46:04 UTC
Created attachment 89088 [details] [review]
[salut next 1/2] Install salut.manager to the correct directory
Comment 24 Simon McVittie 2013-11-12 13:46:21 UTC
Created attachment 89089 [details] [review]
[salut next 2/2] Be parallel-installable with Salut 0.x

... apart from /usr/share/doc, which packagers will probably move
around according to distro policy anyway.

Also use telepathy-glib-1 and telepathy-glib-1-dbus in .pc files,
instead of telepathy-glib.
Comment 25 Simon McVittie 2013-11-12 13:46:58 UTC
Created attachment 89090 [details] [review]
[idle next] Be parallel-installable with Idle 0.x
Comment 26 Simon McVittie 2013-11-12 13:52:18 UTC
Created attachment 89091 [details] [review]
[rakia next] Be parallel-installable with Rakia 0
Comment 27 Simon McVittie 2013-11-12 13:55:29 UTC
Created attachment 89092 [details] [review]
[haze next] Be parallel-installable with Haze 0.x
Comment 28 Simon McVittie 2013-11-12 13:58:03 UTC
Created attachment 89093 [details] [review]
[tp-glib master] examples: explicitly ask for TelepathyGLib-0.12

TelepathyGLib-1 isn't going to be fully compatible.
Comment 29 Simon McVittie 2013-11-12 13:58:32 UTC
Created attachment 89094 [details] [review]
[tp-glib next 1/2] Rename the Logger's GIR to TelepathyLogger-1
Comment 30 Simon McVittie 2013-11-12 13:58:53 UTC
Created attachment 89095 [details] [review]
[tp-glib next 2/2] examples: explicitly ask for TelepathyGLib-1
Comment 31 Simon McVittie 2013-11-12 14:03:17 UTC
(In reply to comment #1)
> * Decide whether Telepathy 0 and Telepathy 1 can safely share the avatar
>   cache (I think the answer is probably "yes")
>   [spec, tp-glib]

Still to do, but I still think it's OK.

> * rename Telepathy-1.gir to Telepathy1-1.gir? (ask g-i people
>   whether this is desirable?)
>   [tp-glib, Folks, ...]

One of the GNOME people explained in #telepathy that it's conventional to keep the same .gir name even in new ABI versions. It's actually entirely possible to select a GIR version in at least PyGI and gjs, so I'm inclined to say "whatever, let's keep it TelepathyGLib", and patch GNOME Shell (perhaps also GNOME Chat and Polari if they're g-i) to explicitly ask for "0.12" until it's ported.

> * make sure all docs, etc. are parallel-installable, for instance
>   by installing Telepathy 0 and Telepathy 1 to separate clean prefixes
>   and scripting a comparison
>   [tp-glib, MC, Logger, tp-farstream]

The Logger still installs:

/opt/telepathy-1.0/share/glib-2.0/schemas/org.freedesktop.Telepathy.Logger.gschema.xml

/opt/telepathy-1.0/libexec/telepathy-logger

The former might need to use clever dconf aliasing like MC does.

The latter is really easy.

In addition, we need to decide how to make the actual logs compatible (Bug #70990).
Comment 32 Guillaume Desmottes 2013-12-04 16:40:54 UTC
++ for all your patches
Comment 33 Simon McVittie 2014-01-07 15:10:45 UTC
(In reply to comment #31)
> It's actually entirely
> possible to select a GIR version in at least PyGI and gjs, so I'm inclined
> to say "whatever, let's keep it TelepathyGLib", and patch GNOME Shell
> (perhaps also GNOME Chat and Polari if they're g-i) to explicitly ask for
> "0.12" until it's ported.

Shell: https://bugzilla.gnome.org/show_bug.cgi?id=721704

Polari: https://bugzilla.gnome.org/show_bug.cgi?id=721703
Comment 34 Simon McVittie 2014-01-07 15:50:09 UTC
tp-glib patches merged for 0.23.1, 0.99.6.
Comment 35 Simon McVittie 2014-01-07 16:46:16 UTC
Comment on attachment 89087 [details] [review]
[gabble next] Be parallel-installable with Gabble 0.x

Fixed in git for, er, 0.99.5 probably?
Comment 36 Simon McVittie 2014-01-07 16:46:36 UTC
Comment on attachment 89088 [details] [review]
[salut next 1/2] Install salut.manager to the correct directory

Fixed in git for, er, 0.99.5 probably?
Comment 37 Simon McVittie 2014-01-07 16:47:09 UTC
Comment on attachment 89089 [details] [review]
[salut next 2/2] Be parallel-installable with Salut 0.x

Fixed in git for 0.99.5 or thereabouts
Comment 38 Simon McVittie 2014-01-07 16:47:50 UTC
Comment on attachment 89090 [details] [review]
[idle next] Be parallel-installable with Idle 0.x

Fixed in git for 0.99.5
Comment 39 Simon McVittie 2014-01-07 17:09:56 UTC
Created attachment 91608 [details] [review]
[MC next] Split documentation to be fully parallel-installable with MC  5
Comment 40 Simon McVittie 2014-01-07 17:11:52 UTC
Comment on attachment 89092 [details] [review]
[haze next] Be parallel-installable with Haze 0.x

haze 0.99.5
Comment 41 Simon McVittie 2014-01-07 17:11:59 UTC
Comment on attachment 89091 [details] [review]
[rakia next] Be parallel-installable with Rakia 0

rakia 0.99.5
Comment 42 Guillaume Desmottes 2014-01-08 09:03:49 UTC
Comment on attachment 91608 [details] [review]
[MC next] Split documentation to be fully parallel-installable with MC  5

Review of attachment 91608 [details] [review]:
-----------------------------------------------------------------

++
Comment 43 Simon McVittie 2014-01-13 13:14:23 UTC
Comment on attachment 91608 [details] [review]
[MC next] Split documentation to be fully parallel-installable with MC  5

in MC 0.99.6, thanks
Comment 44 Simon McVittie 2014-01-14 10:49:43 UTC
(In reply to comment #17)
> I tried #if 0'ing this code (
> http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> ?h=next-old-location )

Let's do that for now.
Comment 45 Simon McVittie 2014-01-14 10:53:53 UTC
(In reply to comment #44)
> (In reply to comment #17)
> > I tried #if 0'ing this code (
> > http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> > ?h=next-old-location )
> 
> Let's do that for now.

review+ for now. In Bug #70991 I would suggest that the right way would be to make it runtime-conditional: give McdAccountManagerDefault the ability to be instantiated in "old mode" (which would read from those old locations) and do something like this:

* normally, instantiate a normal McdAccountManagerDefault
* when starting up and ~/.local/share/telepathy/mission-control/migrated-to-v6.stamp doesn't exist:
  * instantiate a read-only, "old mode" McdAccountManagerDefault
  * enumerate all its accounts
  * copy them into the "real" McdAccountManagerDefault
  * dispose the "old" McdAccountManagerDefault
Comment 46 Guillaume Desmottes 2014-01-14 15:34:50 UTC
(In reply to comment #45)
> (In reply to comment #44)
> > (In reply to comment #17)
> > > I tried #if 0'ing this code (
> > > http://cgit.collabora.com/git/user/cassidy/telepathy-mission-control/log/
> > > ?h=next-old-location )
> > 
> > Let's do that for now.
> 
> review+ for now. 

Merged to 'next'.
Comment 47 Simon McVittie 2014-04-03 14:38:49 UTC
0.99.10 will be fully parallel-installable.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.