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

Re: tuareg-mode and ocaml-mode



On Sun, Aug 21, 2005 at 09:21:26PM +0200, Jérôme Marant wrote:
> Ralf Treinen <treinen@free.fr> writes:
> 
> >> > You could compare the md5 checksum of the installed files with the 
> >> > checksum of the original files.
> >> 
> >> Sure, but there isn't anything I can do if checksums differ: I'm not
> >> allowed to modify conffiles.
> >
> > At least you could remove them in case the checksum is the same.
> > I guess this will almost always be the case anyway.
> 
> BTW, where do I get the checksums of the original files? When ocaml-nox
> is upgraded, /var/lib/dpkg/info/ocaml-nox.md5sums is replaced and
> checksums vanish.
> I think there is something I'm missing.

The md5 checksum of the files /etc/emacs/site-start.d/50ocaml{-nox}.el,
as installed on my system (I never touched them), is :

% md5sum /etc/emacs/site-start.d/50ocaml*el
a6939e717c2ca074f685d6f834fd44f8  /etc/emacs/site-start.d/50ocaml.el
a6939e717c2ca074f685d6f834fd44f8  /etc/emacs/site-start.d/50ocaml-nox.el

Hence, you could just hard-code this value into the postrm file,
something like (you have to truncate the output of md5sum
to make it work):

if md5sum /etc/emacs/site-start.d/50ocaml.el =
			a6939e717c2ca074f685d6f834fd44f8
then rm /etc/emacs/site-start.d/50ocaml.el
if md5sum /etc/emacs/site-start.d/50ocaml-nox.el =
			a6939e717c2ca074f685d6f834fd44f8
then rm /etc/emacs/site-start.d/50ocaml-nox.el

Or am I missing something?

-Ralf.
-- 



Reply to: