[Aptitude-devel] safe-upgrade should get even faster now.

Daniel Burrows dburrows at debian.org
Sun Mar 8 19:47:23 UTC 2009

  Actually, the normal resolver might benefit too.

  So, as I've been going over the resolver code and rewriting it to
support a tiered search, I occasionally come across odd design choices
that I made three and a half years ago.  Some of them are not just odd
but breathtakingly dumb.  Others might have been a good idea at one
point, but some assumptions that they clearly make have been violated.
Take, for instance, how aptitude checks whether a solution violates a
constraint that "the user" introduced.

  Every time that aptitude goes to enqueue a search node, it reads off
the list of constraints imposed by "the user" and checks each one
against the contents of the node.  I think I did things this way
because it was slightly more straightforward to code than the reverse
(checking each entry in the search node against the existing
constraints).  And at the time, constraints were only produced when
the user selected a solution action and pressed "r" or "a".  It took
real determination to create more than one or two dozen of them, so
it wasn't clear whether it was better to iterate over constraints or
over the search node (after all, most of the time the search node was
larger than the constraint set!).

  Fast forward to today...in the setup phase, "safe-upgrade" creates
a constraint for *every single package in the archive*, and in some
cases it creates more than one.  See a problem there?  So do I.
Fixing it now.


More information about the Aptitude-devel mailing list