Optimize out a common element for an early return.
authorBrian Dolbec <dolsen@gentoo.org>
Sun, 1 Dec 2013 09:58:50 +0000 (01:58 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Sun, 1 Dec 2013 09:58:50 +0000 (01:58 -0800)
pym/_emerge/depgraph.py

index 622d288415342a774e9436b83d39e4c185cb2974..343cc032ad017f8bc6a94cfcbf2e0e3852e89dcf 100644 (file)
@@ -2276,10 +2276,11 @@ class depgraph(object):
                Don't ignore dependencies if pkg has a slot operator dependency on the child
                and the child has changed slot/sub_slot.
                """
+               if not mypriority.satisfied:
+                       return False
                slot_operator_rebuild = False
                if atom.slot_operator == '=' and \
                        (pkg.root, pkg.slot_atom) in self._dynamic_config._slot_operator_replace_installed and \
-                       mypriority.satisfied and \
                        mypriority.satisfied is not child and \
                        mypriority.satisfied.installed and \
                        not child.installed and \
@@ -2288,7 +2289,6 @@ class depgraph(object):
 
                return not atom.blocker and \
                        not recurse_satisfied and \
-                       mypriority.satisfied and \
                        mypriority.satisfied.visible and \
                        dep.child is not None and \
                        not dep.child.installed and \