I'll be unable to work on this during the next week, and haven't managed to make substantial progress so far.
Here's what needs to be done: /var/lib/dpkg/status needs to be read twice, once to gather the installed package versions (this a new pass), and another time to do the dependency extraction (the current pass). During depedency extraction, version information in Depends/Recommends/Suggests needs to be parsed (new code) and compared to the installed versions (comparison code needs to be copied from dpkg or apt, preferably the latter). A conditional dependency which cannot be fulfilled by the currently installed package version should be dropped. Ideally, this should be moved into the actual package pruning process, but this would require changing the data structures, turning package names/references into package/version pairs. This change is rather invasive, that's why I want to avoid it. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]