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

Re: Bug#201023: dosemu: purging doesmu wipes out all user data



Thomas Hood <jdthood@yahoo.co.uk> writes:

> Here is my suggestion for how purge should be handled.  Purge
> would delete #1 through #4 _and_ everything in /var/lib/<pckg>/.
> User data created using the package must then not be stored in
> /var/lib/<pckg>/ but somewhere else, e.g., in someone's home
> directory.  Dosemu, for example, could store the not-to-be-purged
> DOS image in user "dosemu"'s home dir.
>
> Would that work?
>
> I would emphasize here that the postrm must never do "rm -rf"
> on an /etc/ subdirectory.  In order to make it easier for
> packages to obey this rule, I suggest that dpkg be enhanced
> so that the control file can contain a "Config-Files:" field.
> This would list all configuration files stored in /etc/ that
> are not handled as conffiles.  The files in the Config-Files
> list would be deleted on purge by dpkg.  This would save
> the maintainer a bit of effort and would also provide a way
> for one package to take over, as configuration files, files
> that had belonged to another package as conffiles.  See bug
> report #163657 for more information about this problem.

I'm unconvinced that this would be a good idea.  debian/control is a
static file.  I'd need the ability to add things to it dynamically
during the package build.  (I *already* autogenerate debian/control
from a template in gimp-print.  I'd prefer some way to dynamically
specify package dependencies at build time (using sed is a kludge)).

> Several people have said that /var/lib/<pckg>/ should not be
> removed, but I think that that may not be practical.  It would
> in some cases be too difficult for maintainers to keep track
> of each and every file that is created in /var/lib/<pckg>/.
> It would be OK to delete that whole directory _provided_ it
> is widely known that this is what will happen on purge _and_
> there is an alternative place to put things that should not
> be deleted on purge.

True.  In the current upstream development version of
cupsys-driver-gimpprint, I have all printer definitions (PPDs)
generated at install time, and the user has the option of
deleting/creating them as needed.  I will "rm -rf" these without
question, since they are automatically generated--no one needs to keep
these files.  For several reasons, it's not possible to know in
advance how many files will be created, or what their names will be,
so "rm -rf" is appropriate.

For packages like dosemu, this is not (currently) appropriate.  There
is no technially valid reason for doing this, since the conffiles and
symlinks that might exist are known by name.


-- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848 available on public keyservers



Reply to: