Partial dh_python2 transitions
Matthias Klose
doko at ubuntu.com
Thu Jun 16 22:43:45 UTC 2011
On 06/16/2011 05:29 PM, Martin Pitt wrote:
> Hey Mike,
>
> Michael Terry [2011-06-16 11:17 -0400]:
>> Hello! I was just considering how a dh_python2 transition for the
>> various ubuntuone python modules would work. They all install into
>> the ubuntuone module, so would need to be updated at the same time.
>>
>> Is there a recommended way to avoid the problem of users partially
>> upgrading (either from builds finishing separately or specifically
>> apt-get installing only some of the packages) and having mixed tool
>> usage?
>
> We (as in pkg-gnome) indeed had the very same problem for pygobject,
> gnome-python, and various other packages, which install/share a
> "gtk-2.0" sub-namespace. What I did was:
>
> * debian/rules: Install a library search path for a pysupport compatible
> gtk-2.0 directory, to avoid instantly breaking all reverse dependencies.
> This needs to stay until they get converted to dh_python2.
>
> in debian/rules:
>
> # until all reverse dependencies of pygobject have been converted to
> # dh_python2, install a library search path which is backwards
> # compatible to pysupport (see Debian#614764)
> echo "/usr/lib/pymodules/python$*/gtk-2.0/" > $(CURDIR)/debian/python-gobject-dev/$(call py_libdir_sh, $*)/gtk-2.0-pysupport-compat.pth
>
> With this search path, a gtk-2.0 submodule can be in either
> /usr/lib/pymodules/python2.7/gtk-2.0 (pysupport) or
> /usr/lib/python2.7/dist-packages/gtk-2.0 (dh_python2/upstream python).
>
> It's a hack, but we considered it good enough, and much better than
> having to transition some 10 packages in lockstep.
I would be surprised if it does work. if a namespace package is involved, you'll
need the __init__.py in the two places too.
so please do not consider this hack for any further "transition", but use the
Breaks approach, and/or prepare a series of uploads in a PPA.
Matthias
More information about the ubuntu-devel
mailing list