reassign 658222 dlocate
thanks

On Wed, 01 Feb 2012, Craig Sanders wrote:
> it makes perfect sense. a useful function provided by dpkg for the
> last 15+ years is being taken away. that's a bug.  If dpkg can no
> longer provide access to the raw files (and I still don't have a clear
> understanding of why that's going to be the case, or why multiarch
> is inevitably going to cause that) then it should provide equivalent
> functionality.

The existence of the .list file is not part of the public API of dpkg.
Thus you should not rely on it.

The files will still be there but some of them will have different names
as I said (e.g. libc6:i386.list instead of libc6.list).

> > So you can certainly concatenate the output of "dpkg -L <package>"
> > executed on all packages ?
> 
> not exactly. the script that does the job uses perl readdir to loop
> through all the *.list files and (for each file) outputs each line
> prefixed by the package name and a ':'.

The various sets of files are separated by an empty line, so you can still
map each file to the corresponding package.

> I don't know for sure how long looping around 'dpkg -L' will take but it
> will be at least 25 minutes. on a fast system with an SSD.

Wrong, we did the measurement already for popcon:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622322#105

So it's not 25 minutes but less than 10s if you batch 50 packages in each
call.

This is surely acceptable for a nightly cron job.

> > For better performances you can give multiple parameters to "dpkg -L".
> 
> not if i want a line output format that's useful to me, like
> "package:filename". since dpkg doesn't provide that format, I'd have to
> do it myself, by running dpkg -L on each package.

while (we have packages left) {
    @packages = the next 50 packages
    $index = 0
    call dpkg -L @packages
    while (read_line on the output of dpkg -L) {
        if (/^$/) {
            $index++;
            continue;
        }
        print $packages[$index] . ": $_";
    }
}

> so there's the fix. if dpkg -L (or dpkg-query -L, or anything else) can
> provide that output format in a reasonable time (seconds rather than
> minutes or 10s of minutes) then the problem goes away.

Deal. Reassigning back to dlocate.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to