[Python-modules-team] Bug#543351: Bug#543351: logilab.astng cannot be imported after upgrade from stable

Alexandre Fayolle alexandre.fayolle at logilab.fr
Mon Sep 7 08:21:39 UTC 2009


On Thursday 03 September 2009 12:25:00 Sandro Tosi wrote:
> Hi Chris,
> thanks for your report.
>
> On Mon, Aug 24, 2009 at 14:43, Chris Lamb<lamby at debian.org> wrote:
> > Package: python-logilab-astng
> > Severity: serious
> > Version: 0.19.0-2
>
> ...
>
> > I can make it work by manually removing
> >
> >  /usr/lib/python2.5/site-packages/logilab
>
> Since all the packages sharing logilab namespace have a new upstream
> version to package, it's a good time to try to fix this on all of
> them.
>
> The preinst file of logilab-astng is [1]: we already try to fix the
> migration (central->support) problem but we don't remove to common
> logilab/ directory.
>
> [1]
> http://svn.debian.org/viewsvn/python-modules/packages/logilab-astng/trunk/d
>ebian/python-logilab-astng.preinst?view=markup
>
> I'd like to know what would be the best solution for this (hence
> -python in the loop):
>
> - logilab-common is the lower level of logilab* packages, so we can
> add conflict there with all the other logilab-* packages and then
> remove logilab/ completely from its preinst
> - add extra logic to all logilab* packages to check if
> /usr/lib/python*/site-packages/logilab is empty and then remove it
> (could there be cases where it left hanging dirs?)
>
> I'm considering teh second solution a bit better, but I'd like to hear
> from your what youi think.

The problem I can see with removing blindly from the postinst is that 
potentially you're going  to delete files belonging to other  packages (e.g. 
older packages installed from Logilab's Debian repositories). 

Could the following work: 

logilab-common postinst removes /usr/lib/python*/site-
packages/logilab/__init__.py*, and issues a warning if there are other stuff in 
the directory : this will stop packages installed under that tree from working 
without deleting the files themselves (enabling the administrator to find out 
what's broken with that installation). 

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science






More information about the Python-modules-team mailing list