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

Re: dpkg -L (was: Re: conflicts with libcap-dev)

Richard Kettlewell wrote:

> "dpkg -L" lists files in an installed version of a package.  "dpkg -c"
> instead examines a package file.  Hence the difference.

I think I'm beginning to understand.  I thought that -L and -c were
more or less the same, except that one operated on a .deb and one just
reported straight from the dpkg database.  Now I see that there seems to
be a subtle but important difference between "the contents of a package"
(-c) and "the files installed to your system from a package" (-L).  It
seems that given two package A and B that each contain /foo, if only A
is installed, "dpkg -L A" will list /foo.  If B is then installed with
dpkg --force-overwrite, "dpkg -L A" will no longer list /foo because the
actual /foo on the disk has not been installed by A, but by B.  And of
course dpkg -c A.deb or B.deb will never change.

If I'm right then I would urge the dpkg maintainers to revise the man
page, perhaps to something like this:

--- /var/home/bfk/debian/dpkg/dpkg.8	Sat Jan 13 18:26:18 2001
+++ /var/home/bfk/debian/dpkg/dpkg.8.new	Sat Jan 13 18:42:39 2001
@@ -223,8 +223,12 @@
 \fBdpkg -L\fP | \fB--listfiles\fP \fIpackage\fP ...
 List files installed to your system from \fBpackage\fP.
-However, note that files created by package-specific
-installation-scripts are not listed.
+Note that a file installed by one package and then overwritten
+by another (by using \fB--force-overwrite\fP) will no longer be
+listed as installed by the first package since the actual file
+on your system was installed by the second package.  Also note
+that files created by package-specific installation-scripts are
+not listed.
 \fBdpkg -S\fP | \fB--search\fP \fIfilename-search-pattern\fP ...
 Search for a filename from installed packages. All standard shell

Reply to: