[Distutils] Opinion on uninstall

Bastian Kleineidam calvin@cs.uni-sb.de
Fri, 24 Mar 2000 18:19:26 +0100 (CET)


here are some thoughts about an uninstall enhancement. If you supply
it as an option to install.py (e.g. --create-uninstall), you can not be
sure that the user always turns this option on. Suppose he ran the
install command without --create-uninstall and some files got
installed. Now he runs it again, but with --create-uninstall. The
result is that no new files will be copied and the file list of (newly)
installed files is empty. So your package list of installed files is
empty and therefore incorrect.
Solution: either you turn on self.force or you dont supply an option
and write the package list every time you run the install command.
I like the second solution more.

A second problem with installation of Debian packages:
I can install everything in `pwd`/debian/tmp with --home or supply my
own install directories. But then the uninstall information is
incorrect. When the Debian package gets installed the package files are
still pointing to `pwd`/debian/tmp.
This is the point where my --destdir=<destpath> option kicks in. 
The destpath prefix gets stripped off the package file list.
If I run "./setup.py install --destdir=`pwd`/debian/tmp" a file installed
as "`pwd`/debian/tmp/usr/lib/python1.5/foo.py" is listed in the package
file list as "/usr/lib/python1.5/foo.py".

Greetings, Bastian