diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-24 06:55:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-24 06:55:34 +0000 |
commit | cccca42d0470d9a2a972e8130418d82e97aa89b9 (patch) | |
tree | 2c45e45ab95b2ab8e7eb3b793ffee6a69638bd1b /pym/_emerge/help.py | |
parent | 40dd1f931f49b543229be30df8df303de987b8d8 (diff) | |
download | portage-cccca42d0470d9a2a972e8130418d82e97aa89b9.tar.gz portage-cccca42d0470d9a2a972e8130418d82e97aa89b9.tar.bz2 portage-cccca42d0470d9a2a972e8130418d82e97aa89b9.zip |
Bug #134466 - Add a --ask-enter-invalid option. When used together with the
--ask option, interpret a single "Enter" key press as invalid input. This
helps prevent accidental acceptance of the first choice.
svn path=/main/trunk/; revision=14710
Diffstat (limited to 'pym/_emerge/help.py')
-rw-r--r-- | pym/_emerge/help.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 0a5e94084..9d036f05f 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -255,16 +255,29 @@ def help(myopts, havecolor=1): print(" be displayed as USE=\"-bar dar -foo\"") print() print(" "+green("--ask")+" ("+green("-a")+" short option)") - print(" before performing the merge, display what ebuilds and tbz2s will") - print(" be installed, in the same format as when using --pretend; then") - print(" ask whether to continue with the merge or abort. Using --ask is") - print(" more efficient than using --pretend and then executing the same") - print(" command without --pretend, as dependencies will only need to be") - print(" calculated once. WARNING: If the \"Enter\" key is pressed at the") - print(" prompt (with no other input), it is interpreted as acceptance of") - print(" the first choice. Note that the input buffer is not cleared prior") - print(" to the prompt, so an accidental press of the \"Enter\" key at any") - print(" time prior to the prompt will be interpreted as a choice!") + desc = "Before performing the action, display what will take place (server info for " + \ + "--sync, --pretend output for merge, and so forth), then ask " + \ + "whether to proceed with the action or abort. Using --ask is more " + \ + "efficient than using --pretend and then executing the same command " + \ + "without --pretend, as dependencies will only need to be calculated once. " + \ + "WARNING: If the \"Enter\" key is pressed at the prompt (with no other input), " + \ + "it is interpreted as acceptance of the first choice. Note that the input " + \ + "buffer is not cleared prior to the prompt, so an accidental press of the " + \ + "\"Enter\" key at any time prior to the prompt will be interpreted as a choice! " + \ + "Use the --ask-enter-invalid option if you want a single \"Enter\" key " + \ + "press to be interpreted as invalid input." + for line in wrap(desc, desc_width): + print(desc_indent + line) + print() + print(" " + green("--ask-enter-invalid")) + desc = "When used together with the --ask option, " + \ + "interpret a single \"Enter\" key press as " + \ + "invalid input. This helps prevent accidental " + \ + "acceptance of the first choice. This option is " + \ + "intended to be set in the make.conf(5) " + \ + "EMERGE_DEFAULT_OPTS variable." + for line in wrap(desc, desc_width): + print(desc_indent + line) print() print(" " + green("--binpkg-respect-use") + \ " < " + turquoise("y") + " | " + turquoise("n") + " >") |