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

Collapse All | Expand All

(-)gentoolkit/src/equery/equery (-3 / +6 lines)
Lines 1023-1029 Link Here
1023
						depscache[catname] = [(pkg,x)]
1023
						depscache[catname] = [(pkg,x)]
1024
			print "done"
1024
			print "done"
1025
 
1025
 
1026
		for pkg in packages:
1026
		for x in packages:
1027
			pkg = gentoolkit.Package(x)
1027
			try:
1028
			try:
1028
				deps = pkg.get_runtime_deps()
1029
				deps = pkg.get_runtime_deps()
1029
			except KeyError, e:
1030
			except KeyError, e:
Lines 1209-1215 Link Here
1209
		pfxmodes = [ "---", "I--", "-P-", "--O" ]
1210
		pfxmodes = [ "---", "I--", "-P-", "--O" ]
1210
		maskmodes = [ "  ", " ~", " -", "M ", "M~", "M-" ]
1211
		maskmodes = [ "  ", " ~", " -", "M ", "M~", "M-" ]
1211
1212
1212
		for pkg in matches:
1213
		for x in matches:
1214
			pkg = gentoolkit.Package(x)
1213
			if exclude(pkg):
1215
			if exclude(pkg):
1214
				continue
1216
				continue
1215
1217
Lines 1343-1349 Link Here
1343
		rx = re.compile(cat + "/" + name + "-" + ver + "(-" + rev + ")?")
1345
		rx = re.compile(cat + "/" + name + "-" + ver + "(-" + rev + ")?")
1344
		pfxmodes = [ "---", "I--", "-P-", "--O" ]
1346
		pfxmodes = [ "---", "I--", "-P-", "--O" ]
1345
		maskmodes = [ "  ", " ~", " -", "M ", "M~", "M-" ]
1347
		maskmodes = [ "  ", " ~", " -", "M ", "M~", "M-" ]
1346
		for pkg in matches:
1348
		for x in matches:
1349
			pkg = gentoolkit.Package(x)
1347
			status = 0
1350
			status = 0
1348
			if pkg.is_installed():
1351
			if pkg.is_installed():
1349
				status = 1
1352
				status = 1
(-)gentoolkit/src/etcat/etcat (-4 / +2 lines)
Lines 257-264 Link Here
257
	
257
	
258
	last_cp = ""
258
	last_cp = ""
259
259
260
	for x in matches:
260
	for pkg in matches:
261
		pkg = gentoolkit.Package(x)
262
		new_cp = pkg.get_category()+"/"+pkg.get_name()
261
		new_cp = pkg.get_category()+"/"+pkg.get_name()
263
		if last_cp != new_cp:
262
		if last_cp != new_cp:
264
			print green("*") + "  " + white(new_cp) + " :"
263
			print green("*") + "  " + white(new_cp) + " :"
Lines 503-510 Link Here
503
502
504
	rx = re.compile(item)
503
	rx = re.compile(item)
505
504
506
	for x in matches:
505
	for pkg in matches:
507
		pkg = gentoolkit.Package(x)
508
		if pkg.get_contents():
506
		if pkg.get_contents():
509
			for fn in pkg.get_contents().keys():
507
			for fn in pkg.get_contents().keys():
510
				if rx.search(fn):
508
				if rx.search(fn):
(-)gentoolkit/src/gentoolkit/helpers.py (-6 / +6 lines)
Lines 92-112 Link Here
92
	return (resolved,unresolved)
92
	return (resolved,unresolved)
93
93
94
def find_all_installed_packages(prefilter=None):
94
def find_all_installed_packages(prefilter=None):
95
	"""Returns a list of all installed packages, after applying the prefilter
95
	"""Returns a list of all installed package names, after applying the prefilter
96
	function"""
96
	function"""
97
	t = vartree.dbapi.cpv_all()
97
	t = vartree.dbapi.cpv_all()
98
	if prefilter:
98
	if prefilter:
99
		t = filter(prefilter,t)
99
		t = filter(prefilter,t)
100
	return [Package(x) for x in t]
100
	return t
101
101
102
def find_all_uninstalled_packages(prefilter=None):
102
def find_all_uninstalled_packages(prefilter=None):
103
	"""Returns a list of all uninstalled packages, after applying the prefilter
103
	"""Returns a list of all uninstalled packages names, after applying the prefilter
104
	function"""
104
	function"""
105
	alist = find_all_packages(prefilter)
105
	alist = find_all_packages(prefilter)
106
	return [x for x in alist if not x.is_installed()]
106
	return [x for x in alist if not Package(x).is_installed()]
107
107
108
def find_all_packages(prefilter=None):
108
def find_all_packages(prefilter=None):
109
	"""Returns a list of all known packages, installed or not, after applying
109
	"""Returns a list of all known package names installed or not, after applying
110
	the prefilter function"""
110
	the prefilter function"""
111
	t = portage.portdb.cp_all()
111
	t = portage.portdb.cp_all()
112
	if prefilter:
112
	if prefilter:
Lines 114-120 Link Here
114
	t2 = []
114
	t2 = []
115
	for x in t:
115
	for x in t:
116
		t2 += portage.portdb.cp_list(x)
116
		t2 += portage.portdb.cp_list(x)
117
	return [Package(x) for x in t2]
117
	return t2
118
118
119
def split_package_name(name):
119
def split_package_name(name):
120
	"""Returns a list on the form [category, name, version, revision]. Revision will
120
	"""Returns a list on the form [category, name, version, revision]. Revision will

Return to bug 90680