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

Re: NEVER remove log files without asking



Steve Greenland wrote:
On 16-Aug-04, 17:41 (CDT), "Jamin W. Collins" <jcollins@asgardsrealm.net> wrote:
And what about other directories?  Such as /var/lib/$package/ or
/usr/share/$package/, is the admin to assume that these directories are
also sacrosanct and owned by the package?  That their sub-directories or
contents can be removed even though the files may not have been created
by the package?


The difference is that Policy doesn't mandate the removal of those
files.


Err on the side of caution, don't blindly remove directories that may
contain files your package didn't put there.  If you're not very certain
the files were created by your package don't remove them.


In general, yes. But I don't think it's unreasonable for the apache
maintainer to assume that /var/log/apache is full of apache log files,
put there by apache. How is the postrm supposed to distinguish log files
it's supposed to remove, because Policy 10.8 requires it, vs. log files
that the user wants to keep? Just those named 'access.log'? Or is it
'access.log.*'. Or 'access.log.*' in subdirs?

Is it wrong for package foobar to 'rm -rf /var/cache/foobar' when it is
purged?

As it has become obvious, that to some (even experienced) users it is _not_ obvious what is going to be deleted upon issuing -purge, maybe the solution of Solomon might be this:
Purge those directories in question
/var/log/foobar
/var/cache/foobar
/what/else?
with whatever files and subdirectories in it regardless.
_But_ issue a warning naming those directories when -purge is being requested _before_ proceeding.

(Just my conclusion from the discussion, I don't know the internals of package removal)


Regards
Erwin

Not subscribed to this list.



Reply to: