Comment 3 for bug 487009

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I've tried the thought that I mentioned above - extracting the different behaviors into separate classes and then delegating to those classes from Builder and it works really well. It means that the call-sites don't need to know about the different types of builder behaviors (which means the current soyuz code that uses Builder shouldn't need changing - outside of refactoring cleanups), and neither does Builder need to know about the different behaviors.

A diff showing the initial change is here - without any modifications to current tests:

http://pastebin.ubuntu.com/329392/

Running `bin/test -vvt doc/buildd-dispatching.txt` still passes fine.

So unless anyone sees any problems with this approach (I'll be asking BjornT for his thoughts - there are also a few comments in the diff requiring attention), I'll write tests for the new functionality above and then continue pulling out the rest of the soyuz specific stuff from IBuilder into the BinaryPackageBuildBehavior class.

The branch is available at:

lp:~michael.nelson/launchpad/487009-db-generalise-ibuilder-1b