Subject: Re: removing directories with modified configuration files
To: None <tech-pkg@netbsd.org>
From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
List: tech-pkg
Date: 09/09/2002 22:30:39
On Mon, Sep 09, 2002 at 09:54:23PM +0200, Klaus Heinz wrote:
> if I install a package which creates a configuration directory, add an
> _additional_ file in this directory and then remove the package I get
> this:
> 
>   pkg_delete: unable to completely remove directory '/usr/pkg/etc/spamassassin'
>   pkg_delete: couldn't entirely delete package `spamassassin-2.41'
> 
> Other packages employ a method to avoid such messages:
> 
>   @unexec ${RMDIR} %D/etc/spamassassin 2>/dev/null || true
> 
> Is this the recommended way? Or should the warning above be visible to
> the end user?

If you think it the user might add more files to that directory
(e.g., because a typical installation of the program expects it), then
do the @unexec ${RMDIR} dance.

If not, then just @dirrm it and let the user deal with the error
message.

Bye,
 Thomas

-- 
Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
Main Rule of Usenet:  Never argue with idiots.  They drag you down to
their level, then beat you with experience.