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

Bug#248037: package-versions is extremly slow

Package: bugreporter-udeb
Version: 0.25
Severity: wishlist

When I install d-i on something which is probasbly not the most modern
hardware, but still a usable system, the "Gathering information for
installation report" step takes ages.  I thought it is discover being
run, but I just found out it's package-versions... it takes about 50
seconds on this system... changing the script to use:

grep "^\(Package\|Version\):" /var/lib/dpkg/status | \

bring it down to about 10 seconds.

An even faster variant is:

grep "^\(Package\|Version\):" /var/lib/dpkg/status | sed -e 's/^[^:]+: //' | \
    while read package ; do
        read version
        echo "$package $version"

However, this won't work on a normal system because
/var/lib/dpkg/status may contain information about "Package:", but
not "Version:".  However, I think on d-i we always have Package +
Version because nothing is being removed.

In any case, package-versions is definitely a case where optimization
would help.
Martin Michlmayr

Reply to: