[Python-modules-team] Bug#516518: helper tool doesn't create the symlink farm if something weird happens during an upgrade

Emilio Pozuelo Monfort pochu at ubuntu.com
Thu Mar 26 23:23:33 UTC 2009


severity 516518 grave
tags 516518 - moreinfo unreproducible
thanks

Hi,

I can reproduce the bug. I'm raising the severity as it leaves python-cairo
completely unusable (it can't be imported from any python version).

The problem is due to the switch to python-support, there were probably some
files that have to be removed in postrm but aren't right now:

We start with the package from testing, which uses python-central:

emilio at saturno:~$ dpkg -l python-cairo | grep ii
ii  python-cairo                              1.4.12-1.2
Python bindings for the Cairo vector graphics library


The symlinks are correct, and we can import the cairo module

emilio at saturno:~$ ll /usr/lib/python2.5/site-packages/cairo/
total 80
-rw-r--r-- 1 root root 70564 ene 14 20:53 _cairo.so
lrwxrwxrwx 1 root root    37 mar 27 00:06 __init__.py ->
/usr/share/pyshared/cairo/__init__.py
-rw-r--r-- 1 root root   174 ene 15 13:12 __init__.pyc


Now we update to python-cairo from unstable, which has switched to python-support:

emilio at saturno:~$ LC_ALL=C sudo aptitude install python-cairo
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages will be upgraded:
  python-cairo
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/67.8kB of archives. After unpacking 81.9kB will be freed.
Do you want to continue? [Y/n/?]
Writing extended state information... Done
Reading changelogs... Done
(Reading database ... 200648 files and directories currently installed.)
Preparing to replace python-cairo 1.4.12-1.2 (using
.../python-cairo_1.8.4-1_i386.deb) ...
Unpacking replacement python-cairo ...

dpkg: warning - unable to delete old directory
`/usr/lib/python2.5/site-packages/cairo': Directory not empty
dpkg: warning - unable to delete old directory
`/usr/lib/python2.4/site-packages/cairo': Directory not empty


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That's the problem


Setting up python-cairo (1.8.4-1) ...
Processing triggers for python-support ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done

Current status: 0 updates [-1].


emilio at saturno:~$ ll /usr/lib/python2.5/site-packages/cairo/
total 4
lrwxrwxrwx 1 root root  37 mar 27 00:06 __init__.py ->
/usr/share/pyshared/cairo/__init__.py
-rw-r--r-- 1 root root 174 ene 15 13:12 __init__.pyc

^^^ The symlink keeps pointing to /u/s/pyshared, which is not used (yet) by
python-support



emilio at saturno:~$ LC_ALL=C ls /usr/share/pyshared/cairo
ls: cannot access /usr/share/pyshared/cairo: No such file or directory

emilio at saturno:~$ ls -d /var/lib/python-support/python2.*/cairo
/var/lib/python-support/python2.5/cairo
emilio at saturno:~$ ll /var/lib/python-support/python2.5/cairo/
total 8
lrwxrwxrwx 1 root root  62 mar 27 00:18 _cairo.so ->
/usr/lib/python-support/python-cairo/python2.5/cairo/_cairo.so
lrwxrwxrwx 1 root root  56 mar 27 00:18 __init__.py ->
/usr/share/python-support/python-cairo/cairo/__init__.py
-rw-r--r-- 1 root root 175 mar 27 00:18 __init__.pyc
emilio at saturno:~$



Sounds to me that you need to remove the leftovers from python-central as it
won't do it by itself.

HTH,
Emilio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20090327/157395dd/attachment.pgp 


More information about the Python-modules-team mailing list