diff mbox series

[1/6] scripts/oe-setup-builddir: make it known where configurations come from

Message ID 20220729141049.835733-1-alex@linutronix.de
State New
Headers show
Series [1/6] scripts/oe-setup-builddir: make it known where configurations come from | expand

Commit Message

Alexander Kanavin July 29, 2022, 2:10 p.m. UTC
"with some default values" isn't clear; if the user wants to change or
inspect the default values and their history, we should help them find
where they are. This becomes especially important when using template
configs other than poky's.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/oe-setup-builddir | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Peter Kjellerstedt July 29, 2022, 7:55 p.m. UTC | #1
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 29 juli 2022 16:11
> To: openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex@linutronix.de>
> Subject: [OE-core] [PATCH 1/6] scripts/oe-setup-builddir: make it known
> where configurations come from
> 
> "with some default values" isn't clear; if the user wants to change or
> inspect the default values and their history, we should help them find
> where they are. This becomes especially important when using template
> configs other than poky's.
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  scripts/oe-setup-builddir | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> index 54048e62ec..b4fec4d120 100755
> --- a/scripts/oe-setup-builddir
> +++ b/scripts/oe-setup-builddir
> @@ -74,9 +74,9 @@ fi
>  if [ ! -r "$BUILDDIR/conf/local.conf" ]; then
>      cat <<EOM
>  You had no conf/local.conf file. This configuration file has therefore been
> -created for you with some default values. You may wish to edit it to, for
> -example, select a different MACHINE (target hardware). See conf/local.conf
> -for more information as common configuration options are commented.
> +created for you from $OECORELOCALCONF
> +You may wish to edit it to, for example, select a different MACHINE (target hardware).
> +See conf/local.conf for more information as common configuration options are commented.

Please continue to limit the text to within 80 characters (as it was):

You may wish to edit it to, for example, select a different MACHINE (target
hardware). See conf/local.conf for more information as common configuration
options are commented.

or:

You may wish to edit it to, e.g., select a different MACHINE (target hardware).
See conf/local.conf for more information as common configuration options are
commented.

> 
>  EOM
>      cp -f "$OECORELOCALCONF" "$BUILDDIR/conf/local.conf"
> @@ -89,8 +89,9 @@ fi
>  if [ ! -r "$BUILDDIR/conf/bblayers.conf" ]; then
>      cat <<EOM
>  You had no conf/bblayers.conf file. This configuration file has therefore been
> -created for you with some default values. To add additional metadata layers
> -into your configuration please add entries to conf/bblayers.conf.
> +created for you from $OECORELAYERCONF
> +To add additional metadata layers into your configuration please add entries
> +to conf/bblayers.conf.
> 
>  EOM
> 
> --
> 2.30.2

//Peter
Alexander Kanavin July 29, 2022, 8:11 p.m. UTC | #2
On Fri, 29 Jul 2022 at 21:55, Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
> Please continue to limit the text to within 80 characters (as it was):
>
> You may wish to edit it to, for example, select a different MACHINE (target
> hardware). See conf/local.conf for more information as common configuration
> options are commented.
>
> or:
>
> You may wish to edit it to, e.g., select a different MACHINE (target hardware).
> See conf/local.conf for more information as common configuration options are
> commented.

I can do that, but I'm curious about this 80 character limit. Who
cares, in 2022, and why?

Alex
Peter Kjellerstedt July 30, 2022, 9:54 a.m. UTC | #3
> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: den 29 juli 2022 22:12
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: openembedded-core@lists.openembedded.org; Alexander Kanavin
> <alex@linutronix.de>
> Subject: Re: [OE-core] [PATCH 1/6] scripts/oe-setup-builddir: make it
> known where configurations come from
> 
> On Fri, 29 Jul 2022 at 21:55, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> > Please continue to limit the text to within 80 characters (as it was):
> >
> > You may wish to edit it to, for example, select a different MACHINE (target
> > hardware). See conf/local.conf for more information as common configuration
> > options are commented.
> >
> > or:
> >
> > You may wish to edit it to, e.g., select a different MACHINE (target hardware).
> > See conf/local.conf for more information as common configuration options are
> > commented.
> 
> I can do that, but I'm curious about this 80 character limit. Who
> cares, in 2022, and why?
> 
> Alex

Well, I care since all my windows happen to be 80 characters wide (and I have 
a lot of them on my 4K monitor). And since I care and most don't, keeping the 
80 character width should hopefully not be too much of a problem. ;)

//Peter
Alexander Kanavin July 30, 2022, 5:31 p.m. UTC | #4
On Sat, 30 Jul 2022 at 11:55, Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
> Well, I care since all my windows happen to be 80 characters wide (and I have
> a lot of them on my 4K monitor). And since I care and most don't, keeping the
> 80 character width should hopefully not be too much of a problem. ;)

On the other hand, I have a single fullscreen terminal window (with
tabs) which offers 212 char x 53 lines of text. So that I don't need
to be irritated by other people's indentation and line breaking
preferences (or lack of care for them), and everything just fits and
is perfectly readable, always :)

Alex
Chuck Wolber July 30, 2022, 6:15 p.m. UTC | #5
On Fri, Jul 29, 2022 at 13:12 Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

I can do that, but I'm curious about this 80 character limit. Who
> cares, in 2022, and why?


I care :)

Why? It is an expectation built into a lot of tools for one thing.

The git commit log is one notable example. Wrapping commit messages at 72
characters and keeping code width to (generally) 80 characters has
non-trivial benefits that are (hopefully) reasonably obvious to anyone who
has had a lot of windows up at one time.

We also have to have *some* sort of limit and it *should* be consistently
applied. The human ability to mentally “carriage return” drops off as lines
get longer and minds get fatigued.

Finally, looking back at my own learning curve and having mentored new
developers, line length guidelines force developers to write code that is
more readable in the long run.

..Ch:W..


> --
*"Perfection must be reached by degrees; she requires the slow hand of
time." - Voltaire*
diff mbox series

Patch

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 54048e62ec..b4fec4d120 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -74,9 +74,9 @@  fi
 if [ ! -r "$BUILDDIR/conf/local.conf" ]; then
     cat <<EOM
 You had no conf/local.conf file. This configuration file has therefore been
-created for you with some default values. You may wish to edit it to, for
-example, select a different MACHINE (target hardware). See conf/local.conf
-for more information as common configuration options are commented.
+created for you from $OECORELOCALCONF
+You may wish to edit it to, for example, select a different MACHINE (target hardware).
+See conf/local.conf for more information as common configuration options are commented.
 
 EOM
     cp -f "$OECORELOCALCONF" "$BUILDDIR/conf/local.conf"
@@ -89,8 +89,9 @@  fi
 if [ ! -r "$BUILDDIR/conf/bblayers.conf" ]; then
     cat <<EOM
 You had no conf/bblayers.conf file. This configuration file has therefore been
-created for you with some default values. To add additional metadata layers
-into your configuration please add entries to conf/bblayers.conf.
+created for you from $OECORELAYERCONF
+To add additional metadata layers into your configuration please add entries
+to conf/bblayers.conf.
 
 EOM