Partial dh_python2 transitions
Martin Pitt
martin.pitt at ubuntu.com
Thu Jun 16 15:29:16 UTC 2011
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.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the ubuntu-devel
mailing list