diff --git a/simplesat/sat/minisat.py b/simplesat/sat/minisat.py index ee442e6..2d0f8b6 100644 --- a/simplesat/sat/minisat.py +++ b/simplesat/sat/minisat.py @@ -114,7 +114,7 @@ def get_neighbors(clause): # If there aren't two end points then none of this makes any sense. # Just return what we have. if len(end_clauses) < 2: - return end_clauses + return (end_clauses,) ends = OrderedDict.fromkeys(end_clauses) ends = tuple(ends.keys()) diff --git a/simplesat/tests/broken_metadata_self_conflict.yaml b/simplesat/tests/broken_metadata_self_conflict.yaml new file mode 100644 index 0000000..44a9e43 --- /dev/null +++ b/simplesat/tests/broken_metadata_self_conflict.yaml @@ -0,0 +1,15 @@ +packages: + - A 10.2-1 + - B 10.3-1; conflicts (A) + - C 1.7.1-1; depends (A, B) + +request: + - operation: "install" + requirement: "C" + +failure: + requirements: ['C'] + raw: | + Conflicting requirements: + Requirements: 'C' + Install command rule (+C-1.7.1-1) diff --git a/simplesat/tests/test_scenarios_policy.py b/simplesat/tests/test_scenarios_policy.py index 97c82cc..8a11d3b 100644 --- a/simplesat/tests/test_scenarios_policy.py +++ b/simplesat/tests/test_scenarios_policy.py @@ -151,6 +151,9 @@ def test_no_candidate(self): def test_three_way_conflict(self): self._check_solution("three_way_conflict.yaml") + def test_conflicting_single_package_dependencies(self): + self._check_solution("broken_metadata_self_conflict.yaml") + class TestInstallSet(ScenarioTestAssistant, TestCase):