[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[HELP] update-alternatives



Hi,

I got problems with update-alternatives, I'd like to have your
help. kaffe used to provide 'appletviewer' application (this is an
alternative). I'd like to be sure to remove the alternative only if it
exists. I have a .prerm code like this:

,----[ debian/kaffe.prerm ]
| #!/bin/sh
| set -e
| 
| if [ "$1" != "upgrade" ] ; then
| 	for file in javadoc java jar appletviewer javap rmic \
|               rmiregistry serialver javac javah; do
| 		update-alternatives --remove $file /usr/lib/kaffe/bin/$file
| 	done
| fi
| 
| #DEBHELPER#
`----

I suppose I can add a condition in the for loop but I don't know *what*
I have to test. Can I do something like:

(for loop)
if [ -f /usr/lib/kaffe/bin/$file ]
   update-alternatives --remove $file /usr/lib/kaffe/bin/$file
fi
(end of the for loop)

Also, I don't know why the javadoc alternative (and the javadoc kaffe
manpage) are not removed...

Many thanks for your help,

-- 
  .''`. 
 : :' :rnaud
 `. `'  
   `-    



Reply to: