Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 520856
Collapse All | Expand All

(-)a/pym/_emerge/depgraph.py (-5 / +31 lines)
Lines 1567-1580 class depgraph(object): Link Here
1567
		selective = "selective" in self._dynamic_config.myparams
1567
		selective = "selective" in self._dynamic_config.myparams
1568
		want_downgrade = None
1568
		want_downgrade = None
1569
1569
1570
		def check_reverse_dependencies(existing_pkg, candidate_pkg):
1570
		def check_reverse_dependencies(existing_pkg, candidate_pkg,
1571
			replacement_parent=None):
1571
			"""
1572
			"""
1572
			Check if candidate_pkg satisfies all of existing_pkg's non-
1573
			Check if candidate_pkg satisfies all of existing_pkg's non-
1573
			slot operator parents.
1574
			slot operator parents.
1574
			"""
1575
			"""
1576
			built_slot_operator_parents = set()
1575
			for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
1577
			for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
1576
				if atom.slot_operator == "=" and getattr(parent, "built", False):
1578
				if atom.slot_operator_built:
1577
					continue
1579
					built_slot_operator_parents.add(parent)
1580
1581
			for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
1582
				if isinstance(parent, Package):
1583
					if parent in built_slot_operator_parents:
1584
						# This parent may need to be rebuilt, so its
1585
						# dependencies aren't necessarily relevant.
1586
						continue
1587
1588
					if replacement_parent is not None and \
1589
						(replacement_parent.slot_atom == parent.slot_atom
1590
						or replacement_parent.cpv == parent.cpv):
1591
						# This parent is irrelevant because we intend to
1592
						# replace it with replacement_parent.
1593
						continue
1594
1595
					if any(pkg is not parent and
1596
						(pkg.slot_atom == parent.slot_atom or
1597
						pkg.cpv == parent.cpv) for pkg in
1598
						self._dynamic_config._package_tracker.match(
1599
						parent.root, Atom(parent.cp))):
1600
						# This parent may need to be eliminated due to a
1601
						# slot conflict,  so its dependencies aren't
1602
						# necessarily relevant.
1603
						continue
1578
1604
1579
				atom_set = InternalPackageSet(initial_atoms=(atom,),
1605
				atom_set = InternalPackageSet(initial_atoms=(atom,),
1580
					allow_repo=True)
1606
					allow_repo=True)
Lines 1693-1699 class depgraph(object): Link Here
1693
							continue
1719
							continue
1694
1720
1695
					if not insignificant and \
1721
					if not insignificant and \
1696
						check_reverse_dependencies(dep.child, pkg):
1722
						check_reverse_dependencies(dep.child, pkg,
1723
							replacement_parent=replacement_parent):
1697
1724
1698
						candidate_pkg_atoms.append((pkg, unevaluated_atom))
1725
						candidate_pkg_atoms.append((pkg, unevaluated_atom))
1699
						candidate_pkgs.append(pkg)
1726
						candidate_pkgs.append(pkg)
1700
- 

Return to bug 520856