Re: purging: what should be deleted ? (fwd)
On 18-Apr-99, 22:16 (CDT), John Hasler <email@example.com> wrote:
> Steve Greenland writes:
> > Well, conceptually, as far as dpkg is concerned, packages don't own
> > directories in the same way they own files. That's just the list of
> > packages that put files in /etc.
> Can dpkg tell the difference between the package that creates a directory
> and one that merely puts a file in it?
I don't think so. In addition to the order problem, consider that file
ownership is determined by the contents of /var/lib/dpkg/info/*.list (I
*think*. I admit to not being a dpkg hacker). Since every package that
contains any files under /usr will list '/usr' in its package.list file,
it seems unlikely that dpkg could distinguish.
If by "puts a file" you mean to distinguish between a package that
includes /var/lib/foo/bar and a package that contains a program that
sometime during its life creates the file /var/lib/foo/blit (something
like catman, perhaps), dpkg should be able to distinguish, because one
will exist in package.list file, and the other won't. I'm not sure the
ability is useful: there are files that are conceptually part of the
package (configuration files created by scripts, like the mail config
stuff) but aren't listed in dpkg's database. Until packages can add to
the list files dynamically (something I'm not sure is a good idea), I
don't think this is a problem that is solvable via dpkg.
My suspicion is that "what do I purge?" question is best handled on a
package by package basis with guidelines, rather than detailed policy.
The basic guideline is probably "be extremely conservative about
destroying user data".