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

Collapse All | Expand All

(-)pym/portage/__init__.py (-5 / +21 lines)
Lines 7134-7143 Link Here
7134
			atoms = [dep]
7134
			atoms = [dep]
7135
		if not vardb:
7135
		if not vardb:
7136
			# called by repoman
7136
			# called by repoman
7137
			other.append((atoms, None, False))
7137
			other.append((atoms, None, True, True))
7138
			continue
7138
			continue
7139
7139
7140
		all_available = True
7140
		all_available = True
7141
		all_use_satisfied = True
7141
		versions = {}
7142
		versions = {}
7142
		for atom in atoms:
7143
		for atom in atoms:
7143
			if atom[:1] == "!":
7144
			if atom[:1] == "!":
Lines 7153-7161 Link Here
7153
				all_available = False
7154
				all_available = False
7154
				break
7155
				break
7155
7156
7157
			if atom.use:
7158
				avail_pkg_use = mydbapi.match(atom)
7159
				if not avail_pkg_use:
7160
					all_use_satisfied = False
7161
				else:
7162
					# highest (ascending order)
7163
					avail_pkg_use = avail_pkg_use[-1]
7164
					if avail_pkg_use != avail_pkg:
7165
						avail_pkg = avail_pkg_use
7166
						avail_slot = "%s:%s" % (dep_getkey(atom),
7167
							mydbapi.aux_get(avail_pkg, ["SLOT"])[0])
7168
7156
			versions[avail_slot] = avail_pkg
7169
			versions[avail_slot] = avail_pkg
7157
7170
7158
		this_choice = (atoms, versions, all_available)
7171
		this_choice = (atoms, versions, all_available, all_use_satisfied)
7159
		if all_available:
7172
		if all_available:
7160
			# The "all installed" criterion is not version or slot specific.
7173
			# The "all installed" criterion is not version or slot specific.
7161
			# If any version of a package is already in the graph then we
7174
			# If any version of a package is already in the graph then we
Lines 7229-7237 Link Here
7229
		preferred_any_slot + preferred_non_installed + other
7242
		preferred_any_slot + preferred_non_installed + other
7230
7243
7231
	for allow_masked in (False, True):
7244
	for allow_masked in (False, True):
7232
		for atoms, versions, all_available in preferred:
7245
		for allow_unsatisfied_use in (False, True):
7233
			if all_available or allow_masked:
7246
			for atoms, versions, all_available, all_use_satisfied in preferred:
7234
				return atoms
7247
				if all_use_satisfied or \
7248
					(all_available and allow_unsatisfied_use) \
7249
					or allow_masked:
7250
					return atoms
7235
7251
7236
	assert(False) # This point should not be reachable
7252
	assert(False) # This point should not be reachable
7237
7253

Return to bug 278729