I am going to bed and will read this long email in more detail tomorrow,
but it occured to me that pkg-order doesn't have to worry about
Consider - you arrange packages so that dpkg will always unpack them
correctly, dpkg itself performs the configuration ordering on the result.
I am doing -BOTH- and that is why there must be two stages. Also remember
I am looking at this from the view of the output of a simulator, I know
exactly when the rules are broken, how many breaks are generated and so
Maybe we should just implement your routine exactly as is.. I was never
too comfortable working from that short synopsis of a possible algorithm..