gnudude wrote:Use the correct version of python-support for your system. Download the deb file.
use the command
dpkg -i --force-all /path/to/the/file.deb
to slam it in - maybe this solves everything....maybe not
use this command to try and bang it back out cleanly...
dpkg -P --force-all packagename
now use apt or even dpkg to try and install it cleanly without forcing it
then maybe a good
apt-get -f install
to see if everything is kosher
If the error really is in the package then this won't help and it will require a lot more fiddling to work around it.
I actually wonder if something else is wonky on your system.
*Do this at your own risk. It may cause your system to die a unseemly death, hair to grow on your palms, you may go blind....
No luck unfortunately.
smallchange wrote:The script that is failing is quit simple.
Code: Select all
cat /var/lib/dpkg/info/python-support.postinst
Does /var/lib/python-support exist? Is it a link to /usr/lib/pymodules?
If not what (if anything) is in it and what put it there?
It basically wants to remove that directory and create a link, so look at what is there and make it work, after considering what else is in there.
/var/lib/python-support exists and is a link to /usr/lib/pymodules.
In it, there's a 'python2.5' folder (and nothing else), and in that is a bunch of python things:
Code: Select all
$ ls -l /var/lib/python-support/python2.5/
total 128
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 atom
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 cairo
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 cameramonitor
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 ccm
lrwxrwxrwx 1 root root 55 2009-05-06 08:57 CDDB-1.4.egg-info -> /usr/share/python-support/python-cddb/CDDB-1.4.egg-info
lrwxrwxrwx 1 root root 45 2009-05-06 08:57 CDDB.py -> /usr/share/python-support/python-cddb/CDDB.py
lrwxrwxrwx 1 root root 54 2009-05-06 08:57 cdrom.so -> /usr/lib/python-support/python-cddb/python2.5/cdrom.so
lrwxrwxrwx 1 root root 55 2009-05-06 08:57 cups-1.0.egg-info -> /usr/share/python-support/python-cups/cups-1.0.egg-info
lrwxrwxrwx 1 root root 53 2009-05-06 08:57 cups.so -> /usr/lib/python-support/python-cups/python2.5/cups.so
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 cupsutils
drwxr-xr-x 3 root root 4096 2009-05-06 08:57 dbus
lrwxrwxrwx 1 root root 54 2009-05-06 08:57 dbus_bindings.py -> /usr/share/python-support/python-dbus/dbus_bindings.py
lrwxrwxrwx 1 root root 63 2009-05-06 08:57 _dbus_bindings.so -> /usr/lib/python-support/python-dbus/python2.5/_dbus_bindings.so
lrwxrwxrwx 1 root root 68 2009-05-06 08:57 _dbus_glib_bindings.so -> /usr/lib/python-support/python-dbus/python2.5/_dbus_glib_bindings.so
drwxr-xr-x 7 root root 4096 2009-05-06 08:57 deskbar
lrwxrwxrwx 1 root root 47 2009-05-06 08:57 DiscID.py -> /usr/share/python-support/python-cddb/DiscID.py
drwxr-xr-x 3 root root 4096 2009-05-06 08:57 DiskManager
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 DistUpgrade
lrwxrwxrwx 1 root root 55 2009-05-06 08:57 drv_libxml2.py -> /usr/share/python-support/python-libxml2/drv_libxml2.py
lrwxrwxrwx 1 root root 43 2009-05-06 08:57 feedparser-4.1.egg-info -> /usr/share/pyshared/feedparser-4.1.egg-info
lrwxrwxrwx 1 root root 33 2009-05-06 08:57 feedparser.py -> /usr/share/pyshared/feedparser.py
drwxr-xr-x 15 root root 4096 2009-05-06 08:57 gdata
lrwxrwxrwx 1 root root 62 2009-05-06 08:57 gdata.py-1.1.1.egg-info -> /usr/share/python-support/python-gdata/gdata.py-1.1.1.egg-info
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 GMenuSimpleEditor
lrwxrwxrwx 1 root root 55 2009-05-06 08:57 gmenu.so -> /usr/lib/python-support/python-gmenu/python2.5/gmenu.so
lrwxrwxrwx 1 root root 65 2009-05-06 08:57 GnuPGInterface.py -> /usr/share/python-support/python-gnupginterface/GnuPGInterface.py
drwxr-xr-x 12 root root 4096 2009-05-06 08:57 gtk-2.0
lrwxrwxrwx 1 root root 73 2009-05-06 08:57 gtksourceview2.so -> /usr/lib/python-support/python-gtksourceview2/python2.5/gtksourceview2.so
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 invest
lrwxrwxrwx 1 root root 62 2009-05-06 08:57 libxml2mod.so -> /usr/lib/python-support/python-libxml2/python2.5/libxml2mod.so
lrwxrwxrwx 1 root root 51 2009-05-06 08:57 libxml2.py -> /usr/share/python-support/python-libxml2/libxml2.py
lrwxrwxrwx 1 root root 52 2009-05-06 08:57 lsb_release.py -> /usr/share/python-support/lsb-release/lsb_release.py
lrwxrwxrwx 1 root root 57 2009-05-06 08:57 mmkeys.so -> /usr/lib/python-support/python-mmkeys/python2.5/mmkeys.so
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 ogg
lrwxrwxrwx 1 root root 57 2009-05-06 08:57 ORBit.so -> /usr/lib/python-support/python-pyorbit/python2.5/ORBit.so
lrwxrwxrwx 1 root root 38 2009-05-06 08:57 pyogg-1.3.egg-info -> /usr/share/pyshared/pyogg-1.3.egg-info
drwxr-xr-x 5 root root 4096 2009-05-06 08:57 PythonCard
drwxr-xr-x 3 root root 4096 2009-05-06 08:57 reportbug
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 reportbug-4.1.egg-info
drwxr-xr-x 4 root root 4096 2009-05-06 08:57 sabayon
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 selinux
lrwxrwxrwx 1 root root 53 2009-05-06 08:57 semanage.py -> /usr/share/python-support/python-semanage/semanage.py
lrwxrwxrwx 1 root root 62 2009-05-06 08:57 _semanage.so -> /usr/lib/python-support/python-semanage/python2.5/_semanage.so
lrwxrwxrwx 1 root root 53 2009-05-06 08:57 seobject.py -> /usr/share/python-support/policycoreutils/seobject.py
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 sepolgen
drwxr-xr-x 3 root root 4096 2009-05-06 08:57 softwareproperties
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 tidy
drwxr-xr-x 4 root root 4096 2009-05-06 08:57 UpdateManager
lrwxrwxrwx 1 root root 63 2009-05-06 08:57 uTidylib-0.2.egg-info -> /usr/share/python-support/python-utidylib/uTidylib-0.2.egg-info
drwxr-xr-x 2 root root 4096 2009-05-06 08:57 xdg
I tried a bunch of things:
1. deleted /usr/lib/pymodules and tried aptitude upgrade (it tries to reconfigure it each time I upgrade, so I figured this would produce the least unwanted side effects)
2. deleted /usr/lib/pymodules and tried aptitude reinstall python-support
3. deleted /usr/lib/pymodules and /var/lib/python-support and did as in 1 and 2
4. deleted /usr/lib/pymodules/python2.5 and did as in 1 and 2
5. deleted /usr/lib/pymodules and /var/lib/python-support and did as in 1 and 2
all without it fixing. Each time it remakes them when it installs the package, so it's creating then failing to delete them while installing, so it seems like the package itself and not my system.
Here's my /var/lib/dpkg/info/python-support.postinst:
Code: Select all
$ cat /var/lib/dpkg/info/python-support.postinst
#! /bin/sh
set -e
if [ "$1" = "triggered" ]; then
update-python-modules --post-install
exit 0
fi
# Remove the old directory.
if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 0.90; then
rm -rf /var/lib/python-support
fi
if ! [ -e /var/lib/python-support ]; then
ln -sf /usr/lib/pymodules /var/lib/python-support
fi
update-python-modules --post-install python-support.private
I tried calling
Code: Select all
sudo update-python-modules --post-install
from the command line, and it comes up with the same error as aptitude.
I also tried editing /var/lib/dpkg/info/python-support.postinst, specifically the line that tries to delete the file:
I changed to
Code: Select all
rmdir --ignore-fail-on-non-empty /var/lib/python-support
but it came up with an error saying "Setting up python-support (1.0.2) ... rmdir: failed to remove `/var/lib/python-support': Not a directory", which it isn't, but then why does the original error say "IOError: [Errno 21] Is a directory" with rm instead of rmdir there? I tried commenting out the whole 'if' part that tries to remove the directory, and it comes up with 'IOError: [Errno 21] Is a directory' again, so I think it's update-python-modules and not the rest of /var/lib/dpkg/info/python-support.postinst causing the problem, which brings us back to /usr/sbin/update-python-modules as the cause (assuming I'm right about all this).