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

Collapse All | Expand All

(-)depends.py (-8 / +6 lines)
Lines 33-42 Link Here
33
	"includePortTree": False,
33
	"includePortTree": False,
34
	"includeOverlayTree": False,
34
	"includeOverlayTree": False,
35
	"isRegex": False,
35
	"isRegex": False,
36
	"onlyDirect": True,
36
	"onlyDirect": True,
37
	"onlyInstalled": True,
38
	"indentLevel": 0,
37
	"indentLevel": 0,
39
	"depth": -1
38
	"depth": -1
40
}
39
}
Lines 77-88 Link Here
77
	"""Ensure that the package cache is set."""
75
	"""Ensure that the package cache is set."""
78
76
79
	if not pkg_cache:
77
	if not pkg_cache:
80
		if QUERY_OPTS["onlyInstalled"]:
78
		if QUERY_OPTS['includePortTree']:
81
			# TODO: move away from using strings here
79
			packages = [Package(x) for x in get_cpvs()]
82
			packages = get_installed_cpvs()
83
		else:
80
		else:
84
			packages = get_cpvs()
81
			packages = [Package(x) for x in get_installed_cpvs()]
85
		packages.sort(compare_package_strings)
82
		packages.sort()
86
		pkg_cache = packages
83
		pkg_cache = packages
87
	else:
84
	else:
88
		packages = pkg_cache
85
		packages = pkg_cache
Lines 134-140 Link Here
134
	@param queries: packages to find the dependencies for
131
	@param queries: packages to find the dependencies for
135
	"""
132
	"""
136
133
137
	for pkg in [Package(x) for x in cache_package_list(pkg_cache)]:
134
	for pkg in cache_package_list(pkg_cache):
138
		if not pkg.cpv in PKGDEPS:
135
		if not pkg.cpv in PKGDEPS:
139
			try:
136
			try:
140
				deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps()
137
				deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps()
Lines 192-202 Link Here
192
			print_help()
189
			print_help()
193
			sys.exit(0)
190
			sys.exit(0)
194
		elif opt in ('-a', '--all-packages'):
191
		elif opt in ('-a', '--all-packages'):
195
			QUERY_OPTS["onlyInstalled"] = False
192
			QUERY_OPTS['includePortTree'] = True
196
		elif opt in ('-d', '--direct'):
193
		elif opt in ('-d', '--direct'):
197
			continue
194
			continue
198
		elif opt in ('-D', '--indirect'):
195
		elif opt in ('-D', '--indirect'):
199
		elif opt in ('--depth'):
196
		elif opt in ('--depth'):
200
			if posarg.isdigit():
197
			if posarg.isdigit():
201
				depth = int(posarg)
198
				depth = int(posarg)

Return to bug 270407