Re: [poky] [PATCH] scripts/oe-setup-builddir: Add option to force TEMPLATECONF on existing configs
Alexander Kanavin <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <CANNYZj_HQA2SM+a8wZRBQs204RLV2srX5gBaB2W3=FyoNu2hgQ@mail.gmail.com> |
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 <[email protected]> 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 <[email protected]> > --- > 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: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=- >