potential problem - should it be fixed?
| From: | Greg Beaver | Date: | Sun, 05 Oct 2003 03:04:03 +0000 |
| Subject: | potential problem - should it be fixed? | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-22374@lists.php.net to get a copy of this message | ||
Hi,
It occurred to me today that this sequence of events would leave orphaned files on the hard disk:
$ pear config-set data_dir /path/to/first
$ pear install phpDocumentor
install OK
$ pear config-set data_dir /some/other/path
$ pear uninstall phpDocumentor
Although unlikely in the past, if we recommend that people switch the data directory to a subdirectory of a webserver, any previously installed data will be orphaned in the old location.
Should this be fixed, or is it too minor of an issue to bother?
As far as I can tell, it would amount to storing the configuration at the installation/upgrade time in the registry along with the file list, kind of a state snapshot, and using these values on uninstall.
Another alternative would be to scan the registry for files whose role would put them in the new directory, and warn the user that these files are there, and re-installation may be necessary to keep them, and let the user handle the problem.
Regards,
Greg