depgraph: no multislot tweak for built slot op
authorZac Medico <zmedico@gentoo.org>
Fri, 26 Oct 2012 04:57:01 +0000 (21:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 26 Oct 2012 04:57:01 +0000 (21:57 -0700)
The multislot tweak from bug #220341 (see commit
65a421ae35acd5639ad1258e220754a85e55de6e) triggered erroneous matches
for built slot-operator deps, causing the depgraph to treat unsatisfied
built slot-operator deps as if they were satisfied (one of the issues
uncovered in bug #439694).

pym/_emerge/depgraph.py
pym/portage/tests/resolver/test_slot_operator_unsatisfied.py

index 0722fac7837051ae2147d6b93cdede1c67f75650..41bdc8ecd21823015a30d54bb9d2dc5b4f174d9a 100644 (file)
@@ -3804,7 +3804,8 @@ class depgraph(object):
                # the newly built package still won't have the expected slot.
                # Therefore, assume that such SLOT dependencies are already
                # satisfied rather than forcing a rebuild.
-               if not matched_something and installed and atom.slot is not None:
+               if not matched_something and installed and \
+                       atom.slot is not None and not atom.slot_operator_built:
 
                        if "remove" in self._dynamic_config.myparams:
                                # We need to search the portdbapi, which is not in our
index fe8893fa602691bb0ab4869d78960e47859247c5..14631eb4eeab9139415ea71e8e0b647dead92e54 100644 (file)
@@ -43,12 +43,12 @@ class SlotOperatorUnsatisfiedTestCase(TestCase):
                test_cases = (
 
                        # Demonstrate bug #439694, where a broken slot-operator
-                       # sub-slot dependency fails to be recognized.
+                       # sub-slot dependency fails to trigger rebuild.
                        ResolverPlaygroundTestCase(
                                ["@world"],
                                options = {"--update": True, "--deep": True},
                                success = True,
-                               mergelist = []),
+                               mergelist = ["app-misc/A-1"]),
 
                        ResolverPlaygroundTestCase(
                                ["app-misc/A"],