Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 42402 Details for
Bug 68510
Patch: virtual option for equery
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds a virtual option to equery
equery-virtual.patch (text/plain), 2.16 KB, created by
Michael Kohl (RETIRED)
on 2004-10-22 01:09:57 UTC
(
hide
)
Description:
Adds a virtual option to equery
Filename:
MIME Type:
Creator:
Michael Kohl (RETIRED)
Created:
2004-10-22 01:09:57 UTC
Size:
2.16 KB
patch
obsolete
>--- /usr/bin/equery 2004-10-04 14:22:04.000000000 +0200 >+++ ./equery 2004-10-04 15:03:20.244341760 +0200 >@@ -97,7 +97,7 @@ > Must be overridden in the subclass.""" > pass > >- >+ > class CmdListFiles(Command): > """List files owned by a particular package""" > def __init__(self): >@@ -1270,6 +1270,45 @@ > " " + pp.localoption("-p, --portage-tree") + " - also search in portage tree (" + gentoolkit.settings["PORTDIR"] + ")\n" + \ > " " + pp.localoption("-o, --overlay-tree") + " - also search in overlay tree (" + gentoolkit.settings["PORTDIR_OVERLAY"] + ")\n" > >+class CmdShowVirtual(Command): >+ """Show package that satisfies a given virtual""" >+ def __init__(self): >+ self.default_options = {} >+ >+ def parseArgs(self,args): >+ query = "" >+ need_help = 0 >+ opts = self.default_options >+ for x in args: >+ if x in ["-h", "--help"]: >+ need_help = 1 >+ else: >+ query = x >+ >+ if need_help or query == "": >+ print_info(0, self.longHelp()) >+ sys.exit(-1) >+ >+ return (query, opts) >+ >+ def perform(self, args): >+ >+ (query, opts) = self.parseArgs(args) >+ >+ try: >+ virtual = portage.settings.virtuals['virtual/'+query][0] >+ except: >+ die(2, "There doesn't seem to be a virtual called " + pp.pkgquery(query)) >+ print virtual >+ >+ def shortHelp(self): >+ return pp.pkgquery("virtual") + " - print package that satisfies " + pp.pkgquery("virtual") >+ def longHelp(self): >+ return "Show which package satisfies a given virtual" + \ >+ "\n" + \ >+ "Syntax:\n" + \ >+ " " + pp.command("virtual ") + pp.pkgquery("virtual") >+ > # > # Command line tokens to commands mapping > # >@@ -1287,7 +1326,8 @@ > "check" : CmdCheckIntegrity(), > "stats" : CmdDisplayStatistics(), > "glsa" : CmdListGLSAs(), >- "which": CmdWhich() >+ "which": CmdWhich(), >+ "virtual": CmdShowVirtual() > } > > # Short command line tokens >@@ -1305,6 +1345,7 @@ > "s" : "size", > "t" : "stats", > "u" : "uses", >+ "v" : "virtual", > "w" : "which" > } >
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 68510
: 42402