Hi all, Just to let you know I have replaced the remaining calls to dpkg in modules/dpkg.sh with cat/sed. This changes have decreased (on my box) the total runtime from more than half an hour to six minutes and a half!
Strictly speaking, this way of getting package info is not portable, since there is an option for dpkg, "--root", that can move the /var/lib/dpkg directory to any other place in the filesystem. I think (and hope) this option is very rarely used. In fact, I do not think there is any system in which the base installation is not recorded in /var/lib/dpkg. Anyway, this could be detected with a small initialization routine that would look for var/lib/dpkg. Mathieu, would it be possible to add to the modules (or at least to the dpkg module) a small initialization routine that would guess values for certain variables like this? There is however another problem I currently do not know any solution for: dpkg has an option "--admindir" that changes "/var/lib/dpkg" into any value. I wonder however if anyone has used this strange option, apart from people experimenting with chroot environments and thinks like that. Bye!
