Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 515230 | Differences between
and this patch

Collapse All | Expand All

(-)a/pym/_emerge/depgraph.py (-12 / +19 lines)
Lines 8259-8276 class _dep_check_composite_db(dbapi): Link Here
8259
8259
8260
		return ret
8260
		return ret
8261
8261
8262
	def match(self, atom):
8262
	def match_pkgs(self, atom):
8263
		cache_key = (atom, atom.unevaluated_atom)
8263
		cache_key = (atom, atom.unevaluated_atom)
8264
		ret = self._match_cache.get(cache_key)
8264
		ret = self._match_cache.get(cache_key)
8265
		if ret is not None:
8265
		if ret is not None:
8266
			for pkg in ret:
8267
				self._cpv_pkg_map[pkg.cpv] = pkg
8266
			return ret[:]
8268
			return ret[:]
8267
8269
8270
		atom_set = InternalPackageSet(initial_atoms=(atom,))
8268
		ret = []
8271
		ret = []
8269
		pkg, existing = self._depgraph._select_package(self._root, atom)
8272
		pkg, existing = self._depgraph._select_package(self._root, atom)
8270
8273
8271
		if pkg is not None and self._visible(pkg):
8274
		if pkg is not None and self._visible(pkg, atom_set):
8272
			self._cpv_pkg_map[pkg.cpv] = pkg
8275
			ret.append(pkg)
8273
			ret.append(pkg.cpv)
8274
8276
8275
		if pkg is not None and \
8277
		if pkg is not None and \
8276
			atom.slot is None and \
8278
			atom.slot is None and \
Lines 8301-8318 class _dep_check_composite_db(dbapi): Link Here
8301
					self._root, slot_atom)
8303
					self._root, slot_atom)
8302
				if not pkg:
8304
				if not pkg:
8303
					continue
8305
					continue
8304
				if not self._visible(pkg):
8306
				if not self._visible(pkg, atom_set):
8305
					continue
8307
					continue
8306
				self._cpv_pkg_map[pkg.cpv] = pkg
8308
				ret.append(pkg)
8307
				ret.append(pkg.cpv)
8308
8309
8309
			if len(ret) > 1:
8310
			if len(ret) > 1:
8310
				self._cpv_sort_ascending(ret)
8311
				ret.sort()
8311
8312
8312
		self._match_cache[cache_key] = ret
8313
		self._match_cache[cache_key] = ret
8314
		for pkg in ret:
8315
			self._cpv_pkg_map[pkg.cpv] = pkg
8313
		return ret[:]
8316
		return ret[:]
8314
8317
8315
	def _visible(self, pkg):
8318
	def _visible(self, pkg, atom_set):
8316
		if pkg.installed and not self._depgraph._want_installed_pkg(pkg):
8319
		if pkg.installed and not self._depgraph._want_installed_pkg(pkg):
8317
			return False
8320
			return False
8318
		if pkg.installed and \
8321
		if pkg.installed and \
Lines 8350-8355 class _dep_check_composite_db(dbapi): Link Here
8350
		elif in_graph != pkg:
8353
		elif in_graph != pkg:
8351
			# Mask choices for packages that would trigger a slot
8354
			# Mask choices for packages that would trigger a slot
8352
			# conflict with a previously selected package.
8355
			# conflict with a previously selected package.
8356
			if not atom_set.findAtomForPackage(in_graph,
8357
				modified_use=self._depgraph._pkg_use_enabled(in_graph)):
8358
				# Only mask if the graph package matches the given
8359
				# atom (fixes bug #515230).
8360
				return True
8353
			return False
8361
			return False
8354
		return True
8362
		return True
8355
8363
Lines 8357-8364 class _dep_check_composite_db(dbapi): Link Here
8357
		metadata = self._cpv_pkg_map[cpv]._metadata
8365
		metadata = self._cpv_pkg_map[cpv]._metadata
8358
		return [metadata.get(x, "") for x in wants]
8366
		return [metadata.get(x, "") for x in wants]
8359
8367
8360
	def match_pkgs(self, atom):
8368
	def match(self, atom):
8361
		return [self._cpv_pkg_map[cpv] for cpv in self.match(atom)]
8369
		return [pkg.cpv for pkg in self.match_pkgs(atom)]
8362
8370
8363
def ambiguous_package_name(arg, atoms, root_config, spinner, myopts):
8371
def ambiguous_package_name(arg, atoms, root_config, spinner, myopts):
8364
8372
8365
- 

Return to bug 515230