Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently ran dpkg-query -L $package on the same package a couple of times and got different results. The difference is that one file, the one we'll refer to as $file, is missing.

In between the two commands I did some mucking around with that package, running both dpkg-reconfigure $package and aptitude reinstall $package, and also deleting the $file.

The package version (as shown by aptitude show $package) is still the same as it was when I did the first dpkg-query -L.

I'm a bit confused as to how dpkg-query -L generates its list; I thought that it was showing the actual contents of the package itself, but this data seems to imply that its results are related to the actual system state.

Restoring the file does not change the output of dpkg-query -L $package.

How does dpkg-query -L generate its list of files?

share|improve this question

1 Answer 1

dpkg-query -L $package (as well as dpkg -L $package) get the list of installed files from /var/lib/dpkg/info/$package.list file.

Most likely the /var/lib/dpkg/info/$package.config script (or whatever else is executed by dpkg-reconfigure) for that package creates a file and adds it to the list.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.