Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 269979 Details for
Bug 363137
[option=--misspell-suggestion] >=sys-portage/portage-2.1.9.42
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
emerge: --mispell-suggestion option
0001-emerge-Added-misspell-suggestion-as-an-option-rather.patch (text/plain), 4.68 KB, created by
Samuel Bauer
on 2011-04-14 18:24:50 UTC
(
hide
)
Description:
emerge: --mispell-suggestion option
Filename:
MIME Type:
Creator:
Samuel Bauer
Created:
2011-04-14 18:24:50 UTC
Size:
4.68 KB
patch
obsolete
>From 07cf1b91569e1be7e2dfd61b4c4c59648a8ec8d1 Mon Sep 17 00:00:00 2001 >From: Samuel BAUER <samuel.bauer@yahoo.fr> >Date: Thu, 14 Apr 2011 15:23:07 +0700 >Subject: [PATCH] emerge: Added --misspell-suggestion as an option (rather than a feature) > >--- > man/emerge.1 | 5 +++++ > pym/_emerge/depgraph.py | 3 ++- > pym/_emerge/help.py | 16 +++++++++++++--- > pym/_emerge/main.py | 6 ++++++ > 4 files changed, 26 insertions(+), 4 deletions(-) > >diff --git a/man/emerge.1 b/man/emerge.1 >index 2693b67..3ec1f10 100644 >--- a/man/emerge.1 >+++ b/man/emerge.1 >@@ -437,6 +437,11 @@ This option is recommended for use in combination with \fB\-\-jobs\fR in > order to avoid excess load. See \fBmake\fR(1) for information about > analogous options that should be configured via \fBMAKEOPTS\fR in > \fBmake.conf\fR(5). >+ .TP >++.BR "\-\-misspell-suggestions < y | n >" >+Enable or disable misspell suggestions. By default emerge will return a >+list of packages with similar name, when a package given in argument >+doesn't exist. > .TP > .BR "\-\-newuse " (\fB\-N\fR) > Tells emerge to include installed packages where USE >diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py >index 391c845..1bc1ee6 100644 >--- a/pym/_emerge/depgraph.py >+++ b/pym/_emerge/depgraph.py >@@ -2741,7 +2741,8 @@ class depgraph(object): > mask_docs = True > else: > writemsg_stdout("\nemerge: there are no ebuilds to satisfy "+green(xinfo)+".\n", noiselevel=-1) >- if isinstance(myparent, AtomArg): >+ if self._frozen_config.myopts.get('--misspell-suggestions', 'y') == 'y' and \ >+ isinstance(myparent, AtomArg): > cp = myparent.atom.cp.lower() > cat, pkg = portage.catsplit(cp) > if cat == "null": >diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py >index a120f54..61ede2e 100644 >--- a/pym/_emerge/help.py >+++ b/pym/_emerge/help.py >@@ -17,11 +17,11 @@ def shorthelp(): > print(bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhjkKlnNoOpPqrsStuvV")+"]") > print(" [ " + green("--color")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ] [ "+green("--columns")+" ]") > print(" [ "+green("--complete-graph")+" ] [ "+green("--deep")+" ]") >- print(" [ "+green("--jobs") + " " + turquoise("JOBS")+" ] [ "+green("--keep-going")+" ] [ " + green("--load-average")+" " + turquoise("LOAD") + " ]") >+ print(" [ "+green("--jobs") + " " + turquoise("JOBS")+" ] [ "+green("--keep-going")+" ] [ " + green("--load-average")+" " + turquoise("LOAD") + " ]") > print(" [ "+green("--newuse")+" ] [ "+green("--noconfmem")+" ] [ "+green("--nospinner")+" ]") >- print(" [ "+green("--oneshot")+" ] [ "+green("--onlydeps")+" ]") >+ print(" [ "+green("--oneshot")+" ] [ "+green("--onlydeps")+" ] [ " + green("--misspell-suggestions")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ]") > print(" [ "+green("--reinstall ")+turquoise("changed-use")+" ] [ " + green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" > ]") >- print(bold("Actions:")+" [ "+green("--depclean")+" | "+green("--list-sets")+" | "+green("--search")+" | "+green("--sync")+" | "+green("--version")+" ]") >+ print(bold("Actions:")+" [ "+green("--depclean")+" | "+green("--list-sets")+" | "+green("--search")+" | "+green("--sync")+" | "+green("--version")+" ]") > > def help(myopts, havecolor=1): > # TODO: Implement a wrap() that accounts for console color escape codes. >@@ -522,6 +522,16 @@ def help(myopts, havecolor=1): > for line in wrap(desc, desc_width): > print(desc_indent + line) > print() >+ print(" " + green("--misspell-suggestions") + " [ %s | %s ]" % \ >+ (turquoise("y"), turquoise("n"))) >+ desc = "Enable or disable misspell suggestions. By default " + \ >+ "emerge will return a list of packages with similar " + \ >+ "name, when a package given in argument doesn't exist. " + \ >+ "PORTAGE_DEFAULT_OPT=\"--misspell-suggestions=n\" in " + \ >+ "make.conf disable this behavior" >+ for line in wrap(desc, desc_width): >+ print(desc_indent + line) >+ print() > print(" "+green("--noconfmem")) > print(" Portage keeps track of files that have been placed into") > print(" CONFIG_PROTECT directories, and normally it will not merge the") >diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py >index 96fee89..a349ed7 100644 >--- a/pym/_emerge/main.py >+++ b/pym/_emerge/main.py >@@ -778,6 +778,12 @@ def parse_opts(tmpcmdline, silent=False): > "choices" : true_y_or_n > }, > >+ "--misspell-suggestions": { >+ "help" : "enable package name suggestions when not existing", >+ "type" : "choice", >+ "choices" : true_y_or_n >+ }, >+ > } > > if _ENABLE_DYN_LINK_MAP: >-- >1.7.3.4 >
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 363137
:
269685
|
269691
|
269699
|
269729
|
269911
|
269917
|
269957
| 269979