Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 243175 Details for
Bug 332969
improve portageq help output
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The name does a good enough job ;)
0001-Add-ability-for-portageq-help-to-print-valid-metadat.patch (text/plain), 2.02 KB, created by
Alec Warner
on 2010-08-16 09:41:56 UTC
(
hide
)
Description:
The name does a good enough job ;)
Filename:
MIME Type:
Creator:
Alec Warner
Created:
2010-08-16 09:41:56 UTC
Size:
2.02 KB
patch
obsolete
>From 89255bf6f9541cbda5f266c1351b96055ac5335c Mon Sep 17 00:00:00 2001 >From: Alec Warner <antarus@scriptkitty.com> >Date: Sun, 15 Aug 2010 19:38:42 -0700 >Subject: [PATCH] Add ability for portageq help to print valid metadata keys. > >--- > bin/portageq | 20 ++++++++++++-------- > 1 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/bin/portageq b/bin/portageq >index ce72df0..a8ed3db 100755 >--- a/bin/portageq >+++ b/bin/portageq >@@ -20,6 +20,7 @@ try: > except KeyboardInterrupt: > sys.exit(1) > >+import formatter > import os > > import types >@@ -148,9 +149,6 @@ def mass_best_version(argv): > mass_best_version.uses_root = True > > def metadata(argv): >- """<root> <pkgtype> <category/package> [<key>]+ >- Returns metadata values for the specified package. >- """ > if (len(argv) < 4): > print("ERROR: insufficient parameters!", file=sys.stderr) > sys.exit(2) >@@ -175,6 +173,12 @@ def metadata(argv): > print("Package not found: '%s'" % pkgspec, file=sys.stderr) > sys.exit(1) > >+metadata.__doc__ = """ >+<root> <pkgtype> <category/package> [<key>]+ >+Returns metadata values for the specified package. >+Available keys: %s >+""" % ','.join(portage.auxdbkeys) >+ > metadata.uses_root = True > > def contents(argv): >@@ -587,25 +591,25 @@ def usage(argv): > # Show our commands -- we do this by scanning the functions in this > # file, and formatting each functions documentation. > # >- >+ help_mode = '--help' in sys.argv > for name in commands: > # Drop non-functions > obj = globals()[name] > > doc = obj.__doc__ > if (doc == None): >- print(" "+name) >+ print(" " + name) > print(" MISSING DOCUMENTATION!") > print("") > continue > > lines = doc.split("\n") >- print(" "+name+" "+lines[0].strip()) >+ print(" " + name + " " + lines[0].strip()) > if (len(sys.argv) > 1): >- if ("--help" not in sys.argv): >+ if (not help_mode): > lines = lines[:-1] > for line in lines[1:]: >- print(" "+line.strip()) >+ print(" " + line.strip()) > if (len(sys.argv) == 1): > print("\nRun portageq with --help for info") > >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 332969
: 243175