Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian dpkg (http://www.linux-archive.org/debian-dpkg/)
-   -   popularity-contest: popcon tries to access dpkg internal files and fails with multiarch: same packageso (http://www.linux-archive.org/debian-dpkg/516573-popularity-contest-popcon-tries-access-dpkg-internal-files-fails-multiarch-same-packageso.html)

Jonathan Nieder 04-20-2011 09:10 PM

popularity-contest: popcon tries to access dpkg internal files and fails with multiarch: same packageso
 
Hi,

Bill Allombert wrote:

> This is not possible: forking dpkg for all installed packages would be way to slow and
> resource intensive. We need a better option.

It seems that what popularity-contest currently does is something like

for each installed package:
for each file in its files list which is under /bin, /sbin,
/usr/bin, /usr/sbin, a subdirectory of /lib,
or /usr/games, or is a .a, .h, .pm, .php,
/boot/System.map- file, or is currently
in use by a process:
stat it;
check its atime and ctime and store corresponding results.

In an ideal world on seeky disk drives, it would be better to read
.list files in the order stored on the file system. Being lazy, I'll
just ask: does dpkg have an interface that could learn to do that in
the future? That is, I'm imagining a command that will give a dump
like this:

Package: foo
Files:
file1
file2
file3
...

Package: bar
Files:
file1
file2
file3
....

Bonus points if this interface has an option to point to the file on
disk rather than asking the caller to take care of tracking down
diversions.

Of course alternative methods might be possible; I ask the above
because I am worried about the memory usage from
"dpkg-query -L $(list-all-packages)".


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110420211044.GB9190@elie">http://lists.debian.org/20110420211044.GB9190@elie


All times are GMT. The time now is 12:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.