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

(-)bin/portageq.orig (+20 lines)
Lines 61-66 Link Here
61
	except KeyError:
61
	except KeyError:
62
		sys.exit(1)
62
		sys.exit(1)
63
63
64
def have_flags(argv):
65
	"""<root> <category/package> [<use_flag>]+
66
	Returns 0 if all the matching packages have the requested USE flags, 0 otherwise.
67
	"""
68
	if (len(argv) < 3):
69
		print "ERROR: insufficient parameters!"
70
		sys.exit(2)
71
	myflaglist=argv[2:]
72
	myvdbapi=portage.db[argv[0]]["vartree"].dbapi
73
	try:
74
		mypkglist=myvdbapi.match(argv[1])
75
		for mypkg in mypkglist:
76
			mypkgflags=string.split(myvdbapi.aux_get(mypkg,['USE'])[0])
77
			for myflag in myflaglist:
78
				if not (myflag in mypkgflags):
79
					sys.exit(1)
80
		sys.exit(0)
81
	except KeyError:
82
		sys.exit(1)
83
64
84
65
def mass_best_version(argv):
85
def mass_best_version(argv):
66
	"""<root> [<category/package>]+
86
	"""<root> [<category/package>]+
(-)bin/ebuild.sh.orig (+10 lines)
Lines 202-207 Link Here
202
	fi
202
	fi
203
}
203
}
204
204
205
have_flags() {
206
	# return shell-true/shell-false if all matching pkgs have the requested flags.
207
	# Takes a single depend-type atoms and a USE flag list.
208
	if /usr/lib/portage/bin/portageq 'have_flags' "${ROOT}" "$@"; then
209
		return 0
210
	else
211
		return 1
212
	fi
213
}
214
205
best_version() {
215
best_version() {
206
	# returns the best/most-current match.
216
	# returns the best/most-current match.
207
	# Takes single depend-type atoms.
217
	# Takes single depend-type atoms.

Return to bug 2272