nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] [patch] undo of install-mh (Debian bug #551704)


From: Valdis . Kletnieks
Subject: Re: [Nmh-workers] [patch] undo of install-mh (Debian bug #551704)
Date: Mon, 08 Nov 2010 15:28:23 -0500

On Mon, 08 Nov 2010 21:06:04 +0100, markus schnalke said:
> [2010-11-05 22:34] markus schnalke <address@hidden>
> >
> > A second try for removing only what install-mh(1) installs:
> > 
> >     ctx="${MHCONTEXT:-`mhparam context`}"
> >     case "$ctx" in
> >     '/*') rm "$ctx" ;;
> >     *)    rm "`mhpath +`/$ctx" ;;
> >     esac
> >     rmdir "`mhpath +`"
> >     rm "$MH" || rm ~/.mh_profile
> 
> I discovered another mistake in this code. Install-mh(1) always stores
> the context as ``context'' within the mail directory. This simplifies
> the work:
> 
> rm "`mhpath +`/context"

That, my friends, is only safe if there's one context file.

Consider this:

export MHCONTEXT=~/Mail/.mhcontext-`tty|sed -e "s,.dev.,," -e "s,/,.,"`

to support a separate context for each xterm you have open....

Also, remember there can be a 'context' entry in .mh_profile,
which would mean that 'mhparam context' would find it but your
rm command would fail to find it.

Bottom line - you *really* need to front-end an 'uninstall-mh' with some
checks to verify that you're trying to clean up a virgin never-used MH
environment.  If the user has been monkeying with its innards, it's
really hard to do correctly.

Attachment: pgph2n2_VrSqo.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]