~javier.collado/checkbox/bug990075

Viewing all changes in revision 1377.

  • Committer: Javier Collado
  • Date: 2012-05-07 23:52:11 UTC
  • Revision ID: javier.collado@canonical.com-20120507235211-2odhcyd9kqbvtkkp
Implemented new algorithm to order jobs

The new algorithm no longer uses a standard topological ordering algorithm
because of the lack of information available in job descriptions. For example,
most of the jobs are expected to be executed before suspend/suspend_advanced,
but they are not listed as a dependency for this job. Instead, just the jobs
that are expected to be executed after suspend depend on
suspend/suspend_advanced.

To address this problem, it's assumed that the whitelist is already almost
fine, but there are just a few test cases that are out of order (if this is not
the case, the final ordering will probably not be valid). After that, a list of
dependencies and reverse dependencies is created and an attempt to order all
the messages in the whitelist one by one is made. If the order in the whitelist
is fine, then the messsage is added to the list of sorted jobs, if that's not
the case, the message is cached and added as soon as the missing dependencies
have been added as well.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: