Package: python-central
Version: 0.5.0
Severity: normal
Tags: patch
Hi,
as Joe Wreschnig noted on the debian-python list[1], it could
happen that users install Python packages locally with distutils.
Then python-central refuses to overwrite the already-installed
files and gives an error.
[1] http://lists.debian.org/debian-python/2006/06/msg00292.html
This patch overwrites the local files, which relieves the user from
deleting all those files manually (since distutils has no uninstall...)
Regards,
Bastian
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-treasure21
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages python-central depends on:
ii python 2.3.5-11 An interactive high-level object-o
python-central recommends no packages.
-- no debconf information
--- python-central-0.5.0.orig/pycentral.py 2006-06-27 00:53:30.921448048
+0200
+++ python-central-0.5.0/pycentral.py 2006-06-27 00:58:33.172553043 +0200
@@ -644,12 +644,12 @@
linked_files.append(fn2)
continue
msg = msg + " -> %s" % link
- raise PyCentralError, msg
- else:
- link_cmd(fn, fn2)
- linked_files.append(fn2)
+ print "warning:", msg
+ os.unlink(fn2)
+ link_cmd(fn, fn2)
+ linked_files.append(fn2)
except PyCentralError, msg:
- raise PyCentralError, msg
+ raise
except Exception, msg:
print msg
# FIXME: undo