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

Collapse All | Expand All

(-)a/bin/portageq (+26 lines)
Lines 43-48 except ImportError: Link Here
43
del pym_path
43
del pym_path
44
44
45
from portage import os
45
from portage import os
46
from portage.dbapi._expand_new_virt import expand_new_virt
46
from portage.util import writemsg, writemsg_stdout
47
from portage.util import writemsg, writemsg_stdout
47
48
48
def eval_atom_use(atom):
49
def eval_atom_use(atom):
Lines 492-497 def match(argv): Link Here
492
		print(cpv)
493
		print(cpv)
493
match.uses_root = True
494
match.uses_root = True
494
495
496
def expand_virtual(argv):
497
	"""<root> <atom>
498
	Returns a \\n separated list of atoms expanded from a
499
	given virtual atom, excluding blocker atoms. Satisfied
500
	virtual atoms are not included in the output, since
501
	they are expanded to real atoms which are displayed.
502
	Unsatisfied virtual atoms are displayed without
503
	any expansion. The "match" command can be used to
504
	resolve the returned atoms to specific installed
505
	packages.
506
	"""
507
	if len(argv) != 2:
508
		print("ERROR: expected 2 parameters, got %d!" % len(argv))
509
		sys.exit(2)
510
	root, atom = argv
511
	if atom_validate_strict and not portage.isvalidatom(atom):
512
		portage.writemsg("ERROR: Invalid atom: '%s'\n" % atom,
513
			noiselevel=-1)
514
		return 2
515
	results = list(expand_new_virt(portage.db[root]["vartree"].dbapi, atom))
516
	results.sort()
517
	for x in results:
518
		if not x.blocker:
519
			print(x)
520
expand_virtual.uses_root = True
495
521
496
def vdb_path(argv):
522
def vdb_path(argv):
497
	"""
523
	"""

Return to bug 157357