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

Re: Find which package has installed some file under /etc



Vincent Lefevre wrote:
> However there are still packages for which neither dpkg -S, nor ucfq
> gives information about the package:
> 
> xvii:~> ll /etc/default/ntfs-3g
> -rw-r--r-- 1 root root 48 2011-12-08 00:21:36 /etc/default/ntfs-3g
> xvii:~> dpkg -S /etc/default/ntfs-3g
> dpkg-query: no path found matching pattern /etc/default/ntfs-3g.
> xvii:~> ucfq /etc/default/ntfs-3g
> Configuration file                            Package             Exists Changed
> /etc/default/ntfs-3g                                              Yes

Files in /etc/default/ are often expected to be under the control of
the local admin.  Often if they exist at all then they are created not
by a package but by the local admin.  In those cases there wouldn't
ever be a database listing them.

I would grep through /etc/init.d/* for references to those files.
Since those files are (mostly) included by boot time init.d scripts
that is where you will see them included.

  $ grep ntfs-3g /etc/init.d/*

Sometimes I see people file bugs to the BTS against a package asking
for the package to provide a /etc/default/ file as part of the
package.  When I see those I usually counter with a request that it
not be made part of the package.  If the file is part of a package
there there will always need to be handling of modifications to it.
That is why there is default dpkg behavior and why there is additional
helpers like ucf to help manage those changes.  But if the file is not
part of the package at all then things are simple and no management is
required.  Simple is better.  I prefer not to see /etc/default/ files
as part of the package.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: