On 2/23/06, Hiroshi SAKURAI <[EMAIL PROTECTED]> wrote: > On 2/23/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > On 2/23/06, Hiroshi SAKURAI <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > On 2/23/06, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: > > > > > > > > * Automatically rename files with a name that is known to have been > > > > previously used by fish. This seems scary since a sysadmin might > > > > create a /etc/fish.d/fish_functions.fish files and be in for a > > > > surprise. > > > > * Pause the install process to interactively ask the user if s/he want > > > > to rename the relevant files. > > > > * Refuse to install if old deprecated init files still exist, and tell > > > > the user to use 'make uninstall' first. > > > > * Just send a big warning message if the relevant files are already > > > > present, but don't take any action. > > > > > > I like the fourth one. > > > I don't think the third one is good because it prevent users > > > who have deleted old tarball accidentaly from installing new tarball. > > > > > > > Good point, but one can get around this by implementing a 'make > > uninstall' script in the new tarball that can uninstall older fish > > releases. Also, as an additional saftey, the error message could print > > the names of the offending files. > > In that case, I think the third one is the best solution. > Automatic renaming(the first and second one) is too dangerous and > the third one is more user-friendly than the fourth one. >
I have tried implementing the third option - but I realised it is not possible to do this without the possibility of erasing files placed in /etc/fish.d/completions/ by the sysadmin. Therfore, I added another make target, uninstall-legacy, that uninstalls a legacy installation, and potentially removed files put in place by the sysadmin. If an earlier version is detected when running 'make install', the following error message is printed: ERROR An older fish installation using an incompatible filesystem hierarchy was detected You must uninstall this fish version before installing proceeding type 'make uninstall-legacy' to uninstall these files, or type 'make install-force' to force installation. The latter may result in a broken installation. And quite predictably, 'make uninstall-legacy' should be able to uninstall any version of fish, so long as both versions use the same sysconfdir. And if they don't, then there should be no clash, and the uninstall script wouldn't have detected the problem in the first place. As the above suggests, I've also added a 'make force-install' rule to force installation even if this probably means breaking somthing, for users who really know what they are doing. The changes are in the darcs tree. Seems like quite a few rules and complications, but I honestly don't know of a better way. Suggestions for alternative solutions are welcome! > > -- > Hiroshi SAKURAI > http://vimrc.hp.infoseek.co.jp/ > -- Axel ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
