Message ID | 20251001164409.805431-1-paulg@kernel.org |
---|---|
State | New |
Headers | show |
Series | bitbake-setup: clarify that default answer to prompts is no | expand |
Thanks, applied. There was some discussion as to whether this should be Y/n (e.g. hit Enter to proceed). I'd rather err on the cautious side here, as people nowadays have muscle memory to agree and accept with anything and everything, and proceed as quickly as possible, they would do it here too, without reading what the tool is going to do, and only then realize it's not what they wanted. Alex On Wed, 1 Oct 2025 at 18:44, Paul Gortmaker via lists.openembedded.org <paulg=kernel.org@lists.openembedded.org> wrote: > > From: Paul Gortmaker <paulg@kernel.org> > > It is common practice to put the default choice in upper case for > yes/no interactive prompts, so that when people just hit enter, they > know what they are getting. An example that linux users are probably > familiar with is "sensors-detect" from the "lm-sensors" package. > > Unify all the prompts to be the same and indicate that the default > answer from hitting enter is a no with an upper case N. No functional > changes. > > Signed-off-by: Paul Gortmaker <paulg@kernel.org> > --- > bin/bitbake-setup | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/bin/bitbake-setup b/bin/bitbake-setup > index 1fbb6549..0655ed6f 100755 > --- a/bin/bitbake-setup > +++ b/bin/bitbake-setup > @@ -403,7 +403,7 @@ def init_config(settings, args, d): > > print("Initializing a build in\n {}".format(builddir)) > if not args.non_interactive: > - y_or_n = input('Continue? y/n: ') > + y_or_n = input('Continue? (y/N): ') > if y_or_n != 'y': > exit() > print() > @@ -608,7 +608,7 @@ def write_settings(top_dir, force_replace, non_interactive=True): > print('A new settings file will be created in\n {}\n'.format(settings_path)) > print('A common site.conf file will be created, please edit or replace before running builds\n {}\n'.format(siteconfpath)) > if not non_interactive: > - y_or_n = input('Bitbake-setup will be configured with the above settings in {}, y/n: '.format(top_dir)) > + y_or_n = input('Bitbake-setup will be configured with the above settings in {}, (y/N): '.format(top_dir)) > if y_or_n != 'y': > print("\nYou can run 'bitbake-setup install-settings' to edit them before setting up builds") > exit() > @@ -654,7 +654,7 @@ def write_global_settings(settings_path, force_replace, non_interactive=True): > print('Top directory prefix (where all top level directories are created) set to\n {}\n'.format(settings['default']['top-dir-prefix'])) > print('Top directory name (this is added to the top directory prefix to form a top directory where builds are set up) set to\n {}\n'.format(settings['default']['top-dir-name'])) > if not non_interactive: > - y_or_n = input('Write out the global settings as specified above (y/n)? ') > + y_or_n = input('Write out the global settings as specified above (y/N)? ') > if y_or_n != 'y': > print("\nYou can run 'bitbake-setup install-global-settings' to edit them before setting up builds") > exit() > -- > 2.17.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#18112): https://lists.openembedded.org/g/bitbake-devel/message/18112 > Mute This Topic: https://lists.openembedded.org/mt/115537146/1686489 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 1fbb6549..0655ed6f 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -403,7 +403,7 @@ def init_config(settings, args, d): print("Initializing a build in\n {}".format(builddir)) if not args.non_interactive: - y_or_n = input('Continue? y/n: ') + y_or_n = input('Continue? (y/N): ') if y_or_n != 'y': exit() print() @@ -608,7 +608,7 @@ def write_settings(top_dir, force_replace, non_interactive=True): print('A new settings file will be created in\n {}\n'.format(settings_path)) print('A common site.conf file will be created, please edit or replace before running builds\n {}\n'.format(siteconfpath)) if not non_interactive: - y_or_n = input('Bitbake-setup will be configured with the above settings in {}, y/n: '.format(top_dir)) + y_or_n = input('Bitbake-setup will be configured with the above settings in {}, (y/N): '.format(top_dir)) if y_or_n != 'y': print("\nYou can run 'bitbake-setup install-settings' to edit them before setting up builds") exit() @@ -654,7 +654,7 @@ def write_global_settings(settings_path, force_replace, non_interactive=True): print('Top directory prefix (where all top level directories are created) set to\n {}\n'.format(settings['default']['top-dir-prefix'])) print('Top directory name (this is added to the top directory prefix to form a top directory where builds are set up) set to\n {}\n'.format(settings['default']['top-dir-name'])) if not non_interactive: - y_or_n = input('Write out the global settings as specified above (y/n)? ') + y_or_n = input('Write out the global settings as specified above (y/N)? ') if y_or_n != 'y': print("\nYou can run 'bitbake-setup install-global-settings' to edit them before setting up builds") exit()