[Pkg-puppet-devel] Bug#571130: Bug#571130: puppet-common: Package purge should remove all puppet directories
Stephen Gran
sgran at debian.org
Wed Feb 24 23:01:19 UTC 2010
This one time, at band camp, Mathias Gug said:
> On Wed, Feb 24, 2010 at 01:35:35PM -0800, Russ Allbery wrote:
> > Mathias Gug <mathiaz at ubuntu.com> writes:
> >
> > > Agreed - that's the point of view of never ever delete a file created by
> > > the user. OTOH by purging a package one may want to start a new
> > > configuration from scratch in a well-known state (which means that there
> > > aren't any files left over from a previous package installation).
> >
> > Right, which is why you remove all files owned by the package. But rm -rf
> > of the entire directory goes beyond that. I think purge should rm -f each
> > file in /etc/puppet that is installed by the package, and then remove the
> > /etc/puppet directory if it's empty.
> >
>
> Considering that puppet templates are stored under /etc/puppet/templates/
> purging the puppet-common package would *not* remove the local templates. Upon
> package re-installation the old templates files would still be around -
> defeating the intent of purging a package in order to start a new configuration
> from scratch.
>
> I guess the correct solution depends on what are the expectations about the
> state of a purged package and how the package should behave upon reinstallation
> after purge.
>
> Another solution could be to move the content of /etc/puppet/ to
> /var/backups/puppet-version_something/ *before* rm -rf /etc/puppet/. That way
> local files are not lost on package purge and could be rescued by the local
> user while still providing a clean start configuration if the package gets
> reinstalled.
We've gone around this sort of argument several times since I've been
involved with Debian, and the outcome has always seemed to be: do not
throw away user data. The Right Thing(TM) would be to only delete what
is shipped with puppet and use rmdir /etc/puppet at the end. This will
throw a warning that /etc/puppet isn't empty and can't be removed, so
the admin who really wants a clean slate can rm -rf the directory
themselves, and the rest of us who expect a Debian package to not eat
our data won't be deeply disappointed.
Cheers,
--
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' : sgran at debian.org |
| `. `' Debian user, admin, and developer |
| `- http://www.debian.org |
-----------------------------------------------------------------
More information about the Pkg-puppet-devel
mailing list