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

Collapse All | Expand All

(-)pym/_emerge/actions.py (-12 / +18 lines)
Lines 1189-1199 Link Here
1189
	expanded_atoms = set(atoms)
1189
	expanded_atoms = set(atoms)
1190
	from portage.dep import Atom
1190
	from portage.dep import Atom
1191
	for atom in atoms:
1191
	for atom in atoms:
1192
		for cpv in vardb.match(atom):
1192
		if not atom.startswith(SETPREFIX):
1193
			slot, = vardb.aux_get(cpv, ['SLOT'])
1193
			for cpv in vardb.match(atom):
1194
			if not slot:
1194
				slot, = vardb.aux_get(cpv, ['SLOT'])
1195
				slot = '0'
1195
				if not slot:
1196
			expanded_atoms.add(Atom('%s:%s' % (portage.cpv_getkey(cpv), slot)))
1196
					slot = '0'
1197
				expanded_atoms.add(Atom('%s:%s' % (portage.cpv_getkey(cpv), slot)))
1197
1198
1198
	pretend = '--pretend' in opts
1199
	pretend = '--pretend' in opts
1199
	locked = False
1200
	locked = False
Lines 1204-1217 Link Here
1204
		discard_atoms = set()
1205
		discard_atoms = set()
1205
		world_set.load()
1206
		world_set.load()
1206
		for atom in world_set:
1207
		for atom in world_set:
1207
			if not isinstance(atom, Atom):
1208
				# nested set
1209
				continue
1210
			for arg_atom in expanded_atoms:
1208
			for arg_atom in expanded_atoms:
1211
				if arg_atom.intersects(atom) and \
1209
				if arg_atom.startswith(SETPREFIX):
1212
					not (arg_atom.slot and not atom.slot):
1210
					if arg_atom == atom:
1213
					discard_atoms.add(atom)
1211
						discard_atoms.add(atom)
1214
					break
1212
						break
1213
				else:
1214
					if arg_atom.intersects(atom) and \
1215
						not (arg_atom.slot and not atom.slot):
1216
						discard_atoms.add(atom)
1217
						break
1215
		if discard_atoms:
1218
		if discard_atoms:
1216
			for atom in sorted(discard_atoms):
1219
			for atom in sorted(discard_atoms):
1217
				print ">>> Removing %s from \"world\" favorites file..." % \
1220
				print ">>> Removing %s from \"world\" favorites file..." % \
Lines 2260-2265 Link Here
2260
			# multiple files in a single iter_owners() call.
2263
			# multiple files in a single iter_owners() call.
2261
			lookup_owners.append(x)
2264
			lookup_owners.append(x)
2262
2265
2266
		elif x.startswith(SETPREFIX) and action == "deselect":
2267
			valid_atoms.append(x)
2268
2263
		else:
2269
		else:
2264
			msg = []
2270
			msg = []
2265
			msg.append("'%s' is not a valid package atom." % (x,))
2271
			msg.append("'%s' is not a valid package atom." % (x,))
(-)man/emerge.1 (-1 / +1 lines)
Lines 131-137 Link Here
131
dependencies.
131
dependencies.
132
.TP
132
.TP
133
.BR "\-\-deselect[=n]"
133
.BR "\-\-deselect[=n]"
134
Remove atoms from the world file. This action is implied
134
Remove atoms and/or sets from the world file. This action is implied
135
by uninstall actions, including \fB-\-depclean\fR,
135
by uninstall actions, including \fB-\-depclean\fR,
136
\fB-\-prune\fR and \fB-\-unmerge\fR. Use \fB-\-deselect=n\fR
136
\fB-\-prune\fR and \fB-\-unmerge\fR. Use \fB-\-deselect=n\fR
137
in order to prevent uninstall actions from removing
137
in order to prevent uninstall actions from removing

Return to bug 268798