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

(-)equery (-2 / +25 lines)
Lines 455-461 Link Here
455
	"""Advanced report of a package's USE flags"""
455
	"""Advanced report of a package's USE flags"""
456
	def __init__(self):
456
	def __init__(self):
457
		self.default_opts = {
457
		self.default_opts = {
458
			"allPackages" : False
458
			"allPackages" : False,
459
			"includeOverlayTree" : False
459
			}
460
			}
460
	def parseArgs(self, args):
461
	def parseArgs(self, args):
461
462
Lines 476-481 Link Here
476
				break
477
				break
477
			elif x in ["-a", "--all"]:
478
			elif x in ["-a", "--all"]:
478
				opts["allPackages"] = True
479
				opts["allPackages"] = True
480
			elif x in ["-o", "--overlay-tree"]:
481
				opts["includeOverlayTree"] = True
479
			elif x[0] == "-":
482
			elif x[0] == "-":
480
				print_warn("unknown local option %s, ignoring" % x)
483
				print_warn("unknown local option %s, ignoring" % x)
481
			else:
484
			else:
Lines 542-547 Link Here
542
		except IOError:
545
		except IOError:
543
				print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.local.desc"))
546
				print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.local.desc"))
544
547
548
		if opts["includeOverlayTree"]:
549
			portdirs = gentoolkit.settings["PORTDIR_OVERLAY"].split()
550
			for portdir in portdirs:
551
				try:
552
					fd = open(portdir + "/profiles/use.local.desc")
553
					for line in fd.readlines():
554
						if line[0] == "#":
555
							continue
556
						fields = line.split(" - ", 1)
557
						if len(fields) == 2:
558
							catpkguse = re.search("(.*):(.*)", fields[0])
559
							if catpkguse:
560
								if not uselocaldesc.has_key(catpkguse.group(1).strip()):
561
									uselocaldesc[catpkguse.group(1).strip()] = {catpkguse.group(2).strip() : fields[1].strip()}
562
								else:
563
									uselocaldesc[catpkguse.group(1).strip()][catpkguse.group(2).strip()] = fields[1].strip()
564
				except IOError:
565
					print_warn("Could not load USE flag descriptions from " + portdir + "/profiles/use.local.desc")
566
545
		if not Config["piping"] and Config["verbosityLevel"] >= 3: 
567
		if not Config["piping"] and Config["verbosityLevel"] >= 3: 
546
			print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]")
568
			print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]")
547
			print_info(3, "[ Legend : Left column  (U) - USE flags from make.conf              ]")
569
			print_info(3, "[ Legend : Left column  (U) - USE flags from make.conf              ]")
Lines 640-646 Link Here
640
			   "  " + pp.command("uses") + pp.localoption(" <local-opts> ") + pp.pkgquery("pkgspec") + \
662
			   "  " + pp.command("uses") + pp.localoption(" <local-opts> ") + pp.pkgquery("pkgspec") + \
641
			   "\n" + \
663
			   "\n" + \
642
			   pp.localoption("<local-opts>") + " is: \n" + \
664
			   pp.localoption("<local-opts>") + " is: \n" + \
643
			   "  " + pp.localoption("-a, --all") + " - include all package versions\n"
665
			   "  " + pp.localoption("-a, --all") + " - include all package versions\n" + \
666
			   "  " + pp.localoption("-o, --overlay-tree") + " - include overlay\n"
644
667
645
668
646
class CmdDisplayDepGraph(Command):
669
class CmdDisplayDepGraph(Command):

Return to bug 138622