Re: dpkg / apt equivalent to 'rpm -qf'?
John Hasler writes:
> Just off the top of my head I see no reason why these files could not be
> included in the package empty and filled in by the scripts. This would
> identify the files as belonging to the package and also allow dpkg to
> remove them, eliminating the need for the postrm to do so.
I think the canonical answer is that some programs will behave
differently if a config file exists (even if empty) than if it doesn't
exist. E.g., /etc/nologin -- you wouldn't want to ship that :-)
Then there are some files that it's questionable who they would belong
to. For instance, /etc/ld.so.conf needs to be modified by several
packages; if it was owned by some package, it would be a Policy
violation for any other package to touch it. Then someone would have to
write an update-ld.so.conf script, which just seems like overkill.
I agree that the vast majority of postinst-created files in /etc don't
meet either of these criteria, so the suggestion makes sense there. My
understanding is that there is long-term work planned on dpkg to allow
registering a list of related files on package installation, even if
they aren't actually in the package.
--
Kevin B. McCarty <kmccarty@princeton.edu> Physics Department
WWW: http://www.princeton.edu/~kmccarty/ Princeton University
GPG public key ID: 4F83C751 Princeton, NJ 08544
Reply to: