poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Talel BELHADJ SALEM <bhstalel@gmail.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: poky@lists.yoctoproject.org
Subject: Re: [poky] [PATCH] scripts/oe-setup-builddir: Add option to force TEMPLATECONF on existing configs
Date: Sun, 24 Sep 2023 16:14:33 +0100	[thread overview]
Message-ID: <CAOgG7m0Fg++aG43D1SjtX55h-PH6MUe5AmhJ1UJaARRfcyogsw@mail.gmail.com> (raw)
In-Reply-To: <CANNYZj_HQA2SM+a8wZRBQs204RLV2srX5gBaB2W3=FyoNu2hgQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3575 bytes --]

I, totally agree with you, I did thought about adding the variable to the
documentation page, but I forgot that developers can easily forget about it
since they do not dig into the documentation well, but if you forget to set
the variable, the script will behave the same way, hince [ -n ] option.

So, only who knows about the variable will use it correctly and explicitly.
This is maybe the last argument that I have for introducing this new
variable.

What do you think?

Kind regards
Talel

On Sun, Sep 24, 2023 at 2:06 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> But is it really that difficult to remove the files? Adding variables
> needs documentation, and tests, and adds complexity, and this one in
> particular can be easily avoided.
>
> Alex
>
> On Sun, 24 Sept 2023 at 14:24, BELHADJ SALEM Talel <bhstalel@gmail.com>
> wrote:
> >
> > Since we cannot force overriding of the config samples created based on
> TEMPALTECONF variable,
> > and that's because it may remove any custom configuration done on
> local.conf or bblayers.conf,
> > and that's also because TEMPALTECONF is, usually, used to create new
> builds.
> >
> > But, when the developer wants to recreate the build after changing the
> sample files, the developer
> > must remove the files manually.
> >
> > I think introducing another variable FORCE_TEMPLATECONF can help when
> override is wanted.
> >
> > Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
> > ---
> >  scripts/oe-setup-builddir | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
> > index 678aeac4be..3bd3df0930 100755
> > --- a/scripts/oe-setup-builddir
> > +++ b/scripts/oe-setup-builddir
> > @@ -64,7 +64,7 @@ unset SHOWYPDOC
> >  if [ -z "$OECORELOCALCONF" ]; then
> >
> OECORELOCALCONF="$OEROOT/meta/conf/templates/default/local.conf.sample"
> >  fi
> > -if [ ! -r "$BUILDDIR/conf/local.conf" ]; then
> > +if [ ! -r "$BUILDDIR/conf/local.conf" ] || [ -n "$FORCE_TEMPLATECONF"
> ]; then
> >      cat <<EOM
> >  You had no conf/local.conf file. This configuration file has therefore
> been
> >  created for you from $OECORELOCALCONF
> > @@ -79,7 +79,7 @@ fi
> >  if [ -z "$OECORELAYERCONF" ]; then
> >
> OECORELAYERCONF="$OEROOT/meta/conf/templates/default/bblayers.conf.sample"
> >  fi
> > -if [ ! -r "$BUILDDIR/conf/bblayers.conf" ]; then
> > +if [ ! -r "$BUILDDIR/conf/bblayers.conf" ] || [ -n
> "$FORCE_TEMPLATECONF" ]; then
> >      cat <<EOM
> >  You had no conf/bblayers.conf file. This configuration file has
> therefore been
> >  created for you from $OECORELAYERCONF
> > @@ -101,7 +101,7 @@ fi
> >  if [ -z "$OECORENOTESCONF" ]; then
> >      OECORENOTESCONF="$OEROOT/meta/conf/templates/default/conf-notes.txt"
> >  fi
> > -if [ ! -r "$BUILDDIR/conf/conf-notes.txt" ]; then
> > +if [ ! -r "$BUILDDIR/conf/conf-notes.txt" ] || [ -n
> "$FORCE_TEMPLATECONF" ]; then
> >      [ ! -r "$OECORENOTESCONF" ] || cp "$OECORENOTESCONF"
> "$BUILDDIR/conf/conf-notes.txt"
> >  fi
> >
> > --
> > 2.25.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#13162):
> https://lists.yoctoproject.org/g/poky/message/13162
> > Mute This Topic: https://lists.yoctoproject.org/mt/101554603/1686489
> > Group Owner: poky+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [
> alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>

[-- Attachment #2: Type: text/html, Size: 4966 bytes --]

      reply	other threads:[~2023-09-24 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 12:22 [PATCH] scripts/oe-setup-builddir: Add option to force TEMPLATECONF on existing configs Talel BELHAJSALEM
2023-09-24 13:05 ` [poky] " Richard Purdie
2023-09-24 13:05 ` Alexander Kanavin
2023-09-24 15:14   ` Talel BELHADJ SALEM [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOgG7m0Fg++aG43D1SjtX55h-PH6MUe5AmhJ1UJaARRfcyogsw@mail.gmail.com \
    --to=bhstalel@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).