Re: Bug#29352: Emacs postrm doesn't remove its site-lisp directory
jdg@maths.qmw.ac.uk (Julian Gilbey) writes:
> When emacs20 is de-installed or upgraded to a version with a different
> minor number, the /usr/share/emacs/20.x directory will probably not be
> removed as there will most likely be some junk left in it by other
> packages. Since the directory is then defunct, the postrm script
> should probably finish with
>
> rm -rf /usr/share/emacs/${MAJOR}.${MINOR} || true
>
> exit 0
OK, so presuming that this is the right thing to do, where is the safe
place to do it? I want to make sure I only remove this directory
after any other packages that need its contents during their removal
are finished (i.e. add-on packages). This would seem to indicate that
the right place would be the postrm, however, I noticed that I've got
the removal code for /usr/local in the prerm right now:
(rmdir /usr/local/share/emacs/${FULL}/site-lisp 2>/dev/null && \
rmdir /usr/local/share/emacs/${FULL} 2>/dev/null) || true
and as I recall I was pretty careful to try and make sure to put
things in the right files/order when I originally set this stuff up.
So which should it be for the "rm -rf major.minor", prerm, or postrm?
--
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930
Reply to: