Having a misspell suggestion is nice, but the cost is too high in my opinion:
$ emerge -pv malestrom These are the packages that would be merged, in order: Calculating dependencies... done! emerge: there are no ebuilds to satisfy "malestrom". emerge: searching for similar names... emerge: Maybe you meant any of these: games-action/maelstrom, dev-util/metro, app-misc/metromap?
Note
According to Wiktionary, “Maelstrom” was from obsolete Dutch maelstrom (modern Dutch maalstroom), meaning a large and violent whirpool, or any violent or turbulent situation. Even this word has been adopted more than a century—at least since 1841, I am not a native English speaker, that’s my excuse of spelling it wrong.
This takes 35 seconds have heavy disk I/O—by the sound of the harddrive—to complete the suggestions list, it just isn’t worth it especially I know I have misspelt the package name.
According to emerge(1), it can be disabled by using --misspell-suggestions n:
- --misspell-suggestions < y | n >
- Enable or disable misspell suggestions. By default, emerge will show a list of packages with similar names when a package doesn’t exist. The EMERGE_DEFAULT_OPTS variable may be used to disable this option by default.
Once the suggestions is diabled, it would be just like the old emerge. No this suggestion probably only around for a couple of years, I couldn’t remember when I got this new feature at which stable version of Portage. Anyway, either it finds the package or quits like how I love:
$ emerge -pv --misspell-suggestions n malestrom These are the packages that would be merged, in order: Calculating dependencies... done! emerge: there are no ebuilds to satisfy "malestrom".
To make it easier, without needing to append that switch every single time, EMERGE_DEFAULT_OPTS is the way to go, according to make.conf(5):
- EMERGE_DEFAULT_OPTS
- Options to append to the end of the emerge(1) command line on every invocation. These options will not be appended to the command line if --ignore-default-opts is specified.
You just append this line to make.conf, that does the trick:
EMERGE_DEFAULT_OPTS="--misspell-suggestions n"
If you need to turn it back on temporarily, using --ignore-default-opts does what it suggests.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.