Fixed error solving with optional dependencies
commitc956cdd79a3a41b0675cd410945ca6556a9900d9
authorThomas Leonard <talex5@gmail.com>
Thu, 5 Apr 2012 16:48:11 +0000 (5 17:48 +0100)
committerThomas Leonard <talex5@gmail.com>
Thu, 5 Apr 2012 16:48:11 +0000 (5 17:48 +0100)
treef880be01a38b98ce36f26a1fec99fe2ebe9e4d38
parent69a27ed01175d6a07afd9a367502ab7e3ffe41d5
Fixed error solving with optional dependencies

If the dependency contained no implementations and we needed to choose the
next variable to try, the result was:

File ".../zeroinstall/injector/solver.py", line 571, in find_undecided
   group = group_clause_for[uri]
KeyError: u'...'

This could easily happen if the feed for the dependency wasn't cached yet.

Reported by Tim Cuthbertson.
tests/OptionalMissing.xml [new file with mode: 0644]
tests/testsolver.py
zeroinstall/injector/solver.py