Re: [Distutils] an uninstall option patch
[oops! meant to send this to the list, not to Bastian personally... here 'tis...] On 19 March 2000, Bastian Kleineidam said:
I have implemented an uninstall option. If you specify -c or --create-uninstall to the install command, an uninstall script named <package name>_uninstall.py will be built and it will be installed in install-lib resp. install-platlib. To uninstall your package, execute this script with python.
Hmmm, good idea. I've idly mused about how to uninstall module distributions, and this option hadn't occurred to me. So now I can see *two* good ways to do uninstallation: * keep track of the files installed (eg. using Michael Muller's "pkginfo" patch), and have a universal uninstall script that digs up the list of files for a particular distribution * generate a custom uninstall script for each installed module distribution In terms of correctness -- do we uninstall exactly the right files? -- they're equivalent; you write a list of files to the disk at installation time and retrieve it later. For user convenience, I *think* that Bastian's "custom script" approach would have a slight edge: as long as people know to type (eg.) "/usr/local/lib/python1.6/site-packages/uninstall_foo", they're fine. On the other hand, a single global uninstall script could go in a central location, so just "pymod_uninstall foo" might do the trick. HmmMMMmm. Also strikes me that the code might be a tad cleaner for a global uninstall script: no need to generate Python code, you just need to generate a list of filenames somewhere in the pkginfo. Opinions? Greg -- Greg Ward - Unix bigot gward@python.net http://starship.python.net/~gward/ BE ALERT!!!! (The world needs more lerts ...)
Obviously, I'm biased on this issue ;-). However, these approaches are equivalent in that they both track the set of installed files: an "uninstall" script just wraps a function around this set. Meta-info is more general: you can use it to uninstall, you can also use it to find out which package a particular file belongs to, or to verify a file's checksum if you believe that it may have been corrupted. The two approaches are not incompatible: why not provide both? Greg Ward wrote:
Hmmm, good idea. I've idly mused about how to uninstall module distributions, and this option hadn't occurred to me. So now I can see *two* good ways to do uninstallation:
* keep track of the files installed (eg. using Michael Muller's "pkginfo" patch), and have a universal uninstall script that digs up the list of files for a particular distribution
* generate a custom uninstall script for each installed module distribution
============================================================================= michaelMuller = mmuller@enduden.com | http://www.cloud9.net/~proteus ----------------------------------------------------------------------------- Those who do not understand Unix are condemned to reinvent it, poorly. -- Henry Spencer =============================================================================
participants (2)
-
Greg Ward
-
Michael Muller