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

Re: Bug#201023: dosemu: purging doesmu wipes out all user data under /var/lib/dosemu)



Hi,

On Tue, Jul 15, 2003 at 07:23:43AM +1000, Herbert Xu wrote:

> Roger Leigh <roger@whinlatter.uklinux.net> wrote:
> > 
> >> This is a directory owned by the dosemu package and it will ensure its
> >> removal upon purging.
> > 
> > Why?  Just let dpkg remove the conffiles and, if you really must, do
> > something *non-destructive* like:
> 
> dpkg --purge is defined as an operation which removes all traces of a
> package.  When you do that, you are taking the responsibility to ensure
> that you have no files under any directories solely owned by that package
> that you wish to keep.
> 
> Never use purge unless you're sure that you have no data that you wish
> to keep that is still left under the package's directories.  There is a
> reason why frontend's never select the purge option for you automatically.

Sorry for following up twice, but there is another argument why this
behaviour of --purge is wrong, which is about usefulness.

Basically, there are three categories of files:

1. dpkg -L
2. conffiles 
3. user data created using the package

The way you're approaching the issue gives the user two choices:
* remove, which deletes category 1;
* purge, which deletes categories 1, 2 and 3.

But there is no way for the user to request deletion of category 1 and
2.

I contend that having --purge delete categories 1 and 2 only is more
useful. You may want to remove your configuration because you've messed
it up. You may want to remove your configuration when upgrading and you
suspect bugs in the postinst. When troubleshooting the package. In all
these cases you want to keep the data you created.

It's much more likely the user is able to manually delete the files in
category 3, than the files in category 2, because he directly or
indirectly created the files in category 3 himself. 

In your scheme, if the user wants to delete 1 + 2 only, which as said is
not all that unreasonable, he uses a plain remove to get rid of 1 and
has to take care of 2 manually. If the user wants to delete 1 + 2 + 3,
which I suspect happens far more rarely, that's made very easy using
--purge.

In the conservative scheme, if the user wants to delete 1 + 2 only, he
uses --purge. Quick and simple. If the user wants to delete 1 + 2 + 3,
he either deletes 3 using the software itself and then does --purge, or
runs the --purge and then manually deletes 3, given useful hints by the
dpkg warnings.

In short, conservative scheme reduces risks without loosing power. On
the contrary, I think such --purge behaviour is much more useful.

Cheers,


Emile.

-- 
E-Advies - Emile van Bergen           emile@e-advies.nl      
tel. +31 (0)70 3906153           http://www.e-advies.nl    

Attachment: pgpzsVajGtlsd.pgp
Description: PGP signature


Reply to: