[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pygtk 1.2 -> 2 transition, what's the best way ?

On Sun, 2003-08-24 at 12:27, Sebastien Bacher wrote:
> I'm looking on the best way to do the soon coming python-gtk 1.2 -> 2
> * After the next release he decides to install python-gtk2 (or an app
>   that need python-gtk2) by apt-get install python-gtk2 (or app).
>   => The default binding will be set to 2.0, and brokes all woody's
>   packages that use "import gtk" to have gtk 1.2.

due to upgrades from python (2.1) to python (2.3), I doubt any python
packages from woody will work with the next release, except for the
python2.1-<foo> packages which should have been explicitly using
python2.1-gtk (and hence should still work).

> I'm seeing two solutions for that :
> 1- Make current python-gtk(2) conflict with all old packages depending
> on python-gtk to force the update.
> This solution will :
> - be ok for the upgrade
> - need no changes for the others packages
> but: 
> - need to list all the packages concerned (and be carefull not forgotten
> one)
> - will not work with non-official packages

yeah, messy. I don't like it.

> 2- Make python-gtk2 conflicts with python-gtk, and introduced a
> python-gtk-compat1.2 package to replace it. 
> Then you just need to build all packages depending on python-gtk (1.2)
> against the new package (about 20 packages to rebuild, not a lot of
> work).
> So a install of python-gtk2 will remove python-gtk, install
> python-gtk-compat1.2 and upgrade all needed packages.

I would probably call it python-gtk1 or python-gtk1.2 rather than
python-gtk-compat1.2. This seems to be the convention for versioned

>From reading the little discussion on the 1.2 ->2 transition, it looks
like upstream have chosen a nasty method of doing "legacy support" for
gtk1.2. Requiring old gtk1.2 apps to add "pygtk.require('1.2')"  means
you need to modify legacy applications to use the legacy support...
kinda defeats the purpose of legacy support, doesn't it? Why not just
have new apps do "import gtk2"?

I'm not sure what the replacement python-gtk1.2 package would provide...
would it enable legacy applications to work unmodified, or would they
need to be modified to add "pygtk.require('1.2')". Can the python-gtk1.2
package co-exist with python-gtk2? How do you make sure applications
import the right one?

I don't really need answers, just posing the questions you need to
consider :-)

The other thing to consider is using the pythonX.Y-gtk2 + python-gtk2
wrapper approach. This might look like more work to start with, but does
give you easier transitions and legacy support in the long run (just
looked and it seems you have already done this... good :-).

There is another approach which might work, depending on how long/well
you thing you need to support gtk1.2. This solution is to tie the gtk1.2
-> gtk2 transition to the python (2.2) -> python (2.3) transition.
Simply just make the following packages;

python2.1-gtk1.2  (for legacy support of woody packages)
python2.2-gtk1.2  (for legacy support using python2.2)
python2.3-gtk2    (for using gtk2 with python2.3)
python-gtk2       (a dependency wrapper for python2.3-gtk2 with python

This means gtk1.2 is only supported for python2.1 and python2.2. Any
package using gtk2 must use python2.3 or python (2.3).

> I'm thinking the second one is the best solution, but I prefer asking
> here for having some advices before starting in that way. 
> I've made some test of the second solution in a chroot, all seems to be
> ok (install of python-gtk2, of a app depending on python-gtk2, upgrade,
> ...). If nobody is against that, I think I'll upload the new
> python-gtk-compat1.2 during the next week.

I dunno when you posted this, but looking at the packages already in
testing and unstable it looks like you are already well on the way.
What's there already looks pretty good. 

Donovan Baarda <abo@minkirri.apana.org.au>

Reply to: