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

Dpkg .list files far from complete?



Doing as Raphael suggests...  Anyone know of a reliable way to get a complete list of the files related to a package, even the derived files (like those generated by .config, .postinst, or preprocessing of .py files)?


> Hello Philip, 
> 
> you might want to ask on debian-dpkg@lists.debian.org as I'm no longer
> involved in dpkg development.
> 
> But you are partly reinventing "dpkg -V"...
> 
> Cheers,
> 
> On Tue, 29 Sep 2015, Philip Prindeville wrote:
>> 
>> 
>> On 05/01/2015 06:51 AM, Raphael Hertzog wrote:
>>> Hi,
>>> 
>>> On Thu, 30 Apr 2015, Philip Prindeville wrote:
>>>> But then I need to read either /var/lib/dpkg/info/<package>.list for a
>>>> list of installed files, or else
>>>> /var/lib/dpkg/info/<package>:<arch>.list ... and I can't figure out what
>>>> the rule is for knowing when it's the latter.
>>> When the package is "Multi-Arch: same" but you should not really access
>>> those files directly, instead you should rely on dpkg-query -L to access
>>> those list of files.
>>> 
>>>> Oh, almost forgot. Is there a tutorial to using the Dpkg::* classes?
>>> Not that I know. There are the manual pages, that's all.
>>> 
>>> Cheers,
>> 
>> 
>> Might add a few extra classes for some convenience functions, like reading
>> the .list and .md5sums files... since I'm trying to avoid spawning hundreds
>> of sub-processes by the tool, which would be orders of magnitude slower than
>> reading them in-process.
>> 
>> Also had a question about how certain files, like those created in .postinst
>> or .conffiles scripts, aren't included in the pkg.list file?  For instance,
>> any of the python library packages generate .pyc files from the .py files,
>> but the former aren't included in the bill-of-materials (i.e. the .list
>> file).
>> 
>> I'm writing a script that runs on a system and finds all
>> deleted/added/modified files on that system per the Dpkg information.
>> 
>> For instance, if you had:
>> 
>> /etc/libvirt/qemu/networks/backbone.xml
>> 
>> that would show up as an "added" file, related to the libvirt-daemon-system
>> package.
>> 
>> If you modified (i.e. md5sum mismatch with the .md5sums file) the file:
>> 
>> /usr/share/misc/pci.ids
>> 
>> that would show up as a "modified" file, belonging to the pciutils
>> bill-of-materials.
>> 
>> But I'm seeing about 13,000 files on my system that look like they are
>> related to packages, but don't appear in the .list files for the installed
>> packages (like all the .pyc files).
>> 
>> Is there a way to relate those files to their packages that I'm not figuring
>> out?
>> 
>> I know that in the RPM 4.0 packaging, ALL files related to a package
>> (including socket files in /var/run, or synthesized config files like
>> sendmail.cf), must be explicitly called out.
>> 
>> What am I missing here?
>> 
>> Thanks,
>> 
>> -Philip
>> 
> 
> -- 
> Raphaël Hertzog ◈ Debian Developer
> 
> Support Debian LTS: http://www.freexian.com/services/debian-lts.html
> Learn to master Debian: http://debian-handbook.info/get/


Reply to: