_emerge.depgraph.depgraph._compute_abi_rebuild_info(): Simplify some code.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Thu, 28 Nov 2013 03:04:32 +0000 (04:04 +0100)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Thu, 28 Nov 2013 03:04:32 +0000 (04:04 +0100)
pym/_emerge/depgraph.py

index da2e60422f8e086fb9e6e3d475093f089c3eddff..66344052f24508c478144e6c42f1717a771d7fc4 100644 (file)
@@ -659,15 +659,13 @@ class depgraph(object):
 
                                # Make sure the child's slot/subslot has changed. If it hasn't,
                                # then another child has forced this rebuild.
-                               installed_pkg, _ = self._select_pkg_from_installed(root, dep.child.slot_atom)
+                               installed_pkg = self._select_pkg_from_installed(root, dep.child.slot_atom)[0]
                                if installed_pkg and installed_pkg.slot == dep.child.slot and \
                                        installed_pkg.sub_slot == dep.child.sub_slot:
                                        continue
 
                                # The child has forced a rebuild of the parent
-                               forced_rebuilds.setdefault(root, {})
-                               forced_rebuilds[root].setdefault(dep.child, set())
-                               forced_rebuilds[root][dep.child].add(dep.parent)
+                               forced_rebuilds.setdefault(root, {}).setdefault(dep.child, set()).add(dep.parent)
 
                if debug:
                        writemsg_level("slot operator dependencies:\n",