From: Thomas L. <ta...@gm...> - 2008-01-29 08:31:42
|
The next part of the refactoring work is now done. I've created a Solver class with just the logic for picking versions. Originally, this is what Policy was for, but it ended up handling all kinds of other things (e.g. it would start a download if a feed was missing or stale). The new solver also takes in the architecture and iface_cache objects explicitly rather than finding the singletons itself, so you can (for example) ask it what packages you'd need to run if you were on a PPC machine. The changes are on the "master" branch: git://repo.or.cz/zeroinstall.git master The Policy object now uses Solver internally to keep the old behaviour, i.e. 1) solve 2) check each of the feeds used by the solver, downloading any that are missing or out-of-date 3) run solve again as each one arrives This should also make it easier to plug in new solvers. -- Dr Thomas Leonard http://rox.sourceforge.net GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 |