Hi, On Sun, 2006-11-05 at 02:55:58 -0800, Michel Lespinasse wrote: > Package: dpkg > Version: 1.13.24 > Severity: normal
> As reported under bug 395140, dpkg/dselect takes a lot of memory and > can easily push low-memory systems to swap. Most of this memory usage > is related to parsing the available file into an in-memory database. > > I mentionned this issue to Matt Zimmerman and he made the following > observation: > > The fact that dpkg pays attention to the available file at all is a bug; > > it should only care about the state of the system and not about external > > repositories. Only higher level package managers like apt and dselect > > should do that. > > I think he's correct, in that dpkg only needs to consider dependencies or > conflicts with the installed packages on the system, and can safely ignore > anything that has not been installed. Any other behaviour is at best > undocumented, and most likely, a bug. The only problem I see with this is that then dpkg will ignore completely any override from the archive, which most of the time is not really important as they affect stuff not used by dpkg for the dependency resolution as you said. The only important information might be the Section and Priority fields, which are usually overriden and used to create roostraps or select what's the base system, etc. But on the other hand I think all programs doing that are using the archive Packages files for that purpose, so I guess it's fine to apply this patch. > In detail, here is what I suggest: > > dpkg --install / --unpack / --configure / --remove / --purge currently read > and write the available file, they need not touch it at all. > > dpkg --get-selections / --set-selections / --clear-selections / --audit / > --yet-to-unpack should not need to touch the available file either, I think. > > dpkg-query should never read or write the available file except for the > --print-avail command. > > > The commands that write to the available file should be limited to: > dpkg --record-avail > dpkg --update-avail / --merge-avail / --clear-avail > (any writes to the available file will be lost at the next dselect update > anyway, but dpkg --update-avail needs to work for dselect update to work). > > The commands that read the available file should be limited to: > dselect select (reads and rewrites today) > dpkg-query --print-avail (already done readonly today) > dpkg --forget-old-unavail (reads and rewrites today) > dpkg --predep-package (already done readonly today) Yeah seems reasonable, will review and merge. thanks, guillem -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

