Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 58264 Details for
Bug 91757
Gentoolkit features: equery basedir and equery which --exclude-masked
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
combined --exclude-masked and --base-directory patch for 'equery which'
gentoolkit-which--exclude-masked-and--base-directory.patch (text/plain), 2.60 KB, created by
ferret
on 2005-05-07 03:09:19 UTC
(
hide
)
Description:
combined --exclude-masked and --base-directory patch for 'equery which'
Filename:
MIME Type:
Creator:
ferret
Created:
2005-05-07 03:09:19 UTC
Size:
2.60 KB
patch
obsolete
>--- /usr/bin/equery 2005-05-05 06:11:52.000000000 +0000 >+++ bin/equery-edit 2005-05-07 11:09:29.000000000 +0000 >@@ -872,7 +872,10 @@ > """Display the filename of the ebuild for a given package > that would be used by Portage with the current configuration.""" > def __init__(self): >- self.default_opts = {} >+ self.default_opts = { >+ "includeMasked": True, >+ "baseDirectory": False >+ } > > def parseArgs(self, args): > >@@ -891,6 +894,10 @@ > if x in ["-h","--help"]: > need_help = 1 > break >+ elif x in ["-m","--exclude-masked"]: >+ opts["includeMasked"] = False >+ elif x in ["-b","--base-directory"]: >+ opts["baseDirectory"] = True > else: > query = x > >@@ -903,21 +910,41 @@ > def perform(self, args): > (query, opts) = self.parseArgs(args) > >- matches = gentoolkit.find_packages(query, True) >+ matches = gentoolkit.find_packages(query, opts["includeMasked"]) > matches = gentoolkit.sort_package_list(matches) > > if matches: >- print_info(0, os.path.normpath(matches[-1].get_ebuild_path())) >+ if opts["baseDirectory"]: >+ non_overlay_found = False >+ >+ for pkg in matches: >+ if not pkg.is_overlay(): >+ print_info(0, os.path.normpath(pkg.get_package_path())) >+ non_overlay_found = True >+ break >+ >+ if not non_overlay_found: >+ # Package is only in an overlay. Print the path of one of them >+ print_info(0, os.path.normpath(matches[0].get_package_path())) >+ else: >+ print_info(0, os.path.normpath(matches[-1].get_ebuild_path())) > else: >- print_error("No masked or unmasked packages found for " + pp.pkgquery(query)) >+ if opts["includeMasked"]: >+ print_error("No masked or unmasked packages found for " + pp.pkgquery(query)) >+ else: >+ print_error("No unmasked packages found for " + pp.pkgquery(query)) > > def shortHelp(self): >- return pp.pkgquery("pkgspec") + " - print full path to ebuild for package " + pp.pkgquery("pkgspec") >+ return pp.localoption("<local-opts> ") + pp.pkgquery("pkgspec") + " - print full path to ebuild for package " + pp.pkgquery("pkgspec") > def longHelp(self): > return "Print full path to ebuild for a given package" + \ > "\n" + \ > "Syntax:\n" + \ >- " " + pp.command("which ") + pp.pkgquery("pkgspec") >+ " " + pp.command("which") + pp.localoption(" <local-opts> ") + pp.pkgquery("pkgspec") + \ >+ "\n" + \ >+ pp.localoption("<local-opts>") + " is either of: \n" + \ >+ " " + pp.localoption("-m, --nomasked") + " - exclude masked packages\n" + \ >+ " " + pp.localoption("-b, --base-directory") + " - print base directory instead of path to ebuild\n" > > class CmdListGLSAs(Command): > """List outstanding GLSAs."""
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 91757
:
58232
|
58233
| 58264