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

Re: NEVER remove log files without asking



On Mon, Aug 16, 2004 at 04:46:44PM +0200, Jonas Meurer wrote:
> On 16/08/2004 Steve Greenland wrote:
> > [...]
> > The trouble is there are two POVs on this, and the package maintainers
> > are stuck between them. If they don't remove every last trace of a
> > package, including any directories, then they get bugs filed. When they
> > fix those bugs, then the other group files bugs.
> > 
> > [...]
> > If enough people disagree with this, then we need to change policy so
> > that NO log files are to be removed. It's unreasonable to expect package
> > maintainers to be able to guess which log files are "important" and
> > which aren't, because no choice is going to make everyone, or even a
> > majority, happy.
> 
> sure, but there's a 'hard' way to go (rm -rf /var/log/<foo>), and a
> digressed one (rmdir /var/log/<foo>).
> 
> maybe a compromise would be, to disallow logdir removal at purge time,
> as long as subdirs exist in it.
> 
> this would be a clear policy: if admins want their logs to stay at
> packages purge, they have to create own subdirs for this.

Or how about the current policy: if you don't want your logfiles removed,
DON'T PURGE THE PACKAGE.  I know the finger-macros for package removal are
likely bound to 'dpkg --purge <foo>', but there's an old rule: "while
working as root, sit on your hands before pressing enter".

> anyway, it's a much more common policy than 'store your logs out of
> /var/log/<foo> if you want them to be kept'.
> 
> It's just reasonable for admins to store apache logs in /var/log/apache,
> even if they're manually created.

And it's explicitly stated in Policy that a package shall remove it's
logfiles on --purge, wherever they may be.  "So don't do that, then".
If you want to keep those logfiles for some reason, then copy them somewhere
else before you go gutting the package.

> another solution: add debconf questions about logdir removal at purge
> time in packages storing logs.

No.  No no nooooooo.  And did I mention, "NO!".  There's too many frigging
Debconf questions around already.

> it is the way many packages currently manage database removal.

Yeah, and I think it's a bad idea there, too.  It only exists in a couple of
my packages because I put it in there when I was young and naive (and on the
example of others), but I now firmly believe that if you don't want your
data / logfiles / whatever else silently removed, don't --purge.  -r is
shorter to type, too.

- Matt

Attachment: signature.asc
Description: Digital signature


Reply to: