From: Sebastian Luther <sebastianlut...@gmx.de> The dependency in the ebuild was changed from slot operator to no slot operator. The vdb contained the slot operator and emerge would refuse to rebuild, causing a missed update. --- pym/_emerge/depgraph.py | 3 +- .../tests/resolver/test_slot_conflict_rebuild.py | 55 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 033057b..da2e604 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1301,8 +1301,7 @@ class depgraph(object): selected_atoms = None for atom in replacement_parent.validated_atoms: - if not atom.slot_operator == "=" or \ - atom.blocker or \ + if atom.blocker or \ atom.cp != dep.atom.cp: continue diff --git a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py index 0fe8f5d..f39508c 100644 --- a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py +++ b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py @@ -180,3 +180,58 @@ class SlotConflictRebuildTestCase(TestCase): self.assertEqual(test_case.test_success, True, test_case.fail_msg) finally: playground.cleanup() + + def testSlotConflictDepChange(self): + """ + Bug 490362 + The dependency in the ebuild was changed form slot operator to + no slot operator. The vdb contained the slot operator and emerge + would refuse to rebuild. + """ + ebuilds = { + "app-misc/A-1" : { + "EAPI": "5", + "DEPEND": "app-misc/B", + "RDEPEND": "app-misc/B" + }, + + "app-misc/B-1" : { + "EAPI": "5", + "SLOT": "0/1" + }, + + "app-misc/B-2" : { + "EAPI": "5", + "SLOT": "0/2" + }, + } + + installed = { + "app-misc/A-1" : { + "EAPI": "5", + "DEPEND": "app-misc/B:0/1=", + "RDEPEND": "app-misc/B:0/1=" + }, + "app-misc/B-1" : { + "EAPI": "5", + "SLOT": "0/1" + }, + } + + test_cases = ( + ResolverPlaygroundTestCase( + ["app-misc/B"], + success = True, + mergelist = ['app-misc/B-2', 'app-misc/A-1']), + ) + + world = ["app-misc/A"] + + playground = ResolverPlayground(ebuilds=ebuilds, + installed=installed, world=world, debug=False) + try: + for test_case in test_cases: + playground.run_TestCase(test_case) + self.assertEqual(test_case.test_success, True, test_case.fail_msg) + finally: + playground.cleanup() -- 1.8.1.5