diff options
author | Alexander Kanavin <alex@linutronix.de> | 2022-09-28 10:56:35 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-29 21:13:36 +0100 |
commit | bcfaeb8ed503ce1a5add3ec882f0e0c3bccfd3d2 (patch) | |
tree | fe0987e96d16995115be907cc561cdf42b718c61 /scripts | |
parent | 95fc819fca11115623d0f1f7f0c11e9c46195b21 (diff) | |
download | openembedded-core-bcfaeb8ed503ce1a5add3ec882f0e0c3bccfd3d2.tar.gz |
scripts/oe-setup-builddir: do not read TEMPLATECONF from templateconf.cfg
Also, write to it only if it does not already exist.
As discussed here[1], reading from templateconf.cfg serves no purpose:
it exists only if the build directory has already been initialized, and so
the scripts will not change anything in the build directory anyway.
My adjustment is to keep the file however; it is useful as a pointer
to the original template, which can be utilized by config management
tools in the future.
[1] https://lists.openembedded.org/g/openembedded-architecture/topic/template_handling_in_oe_core/93968540
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-setup-builddir | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index 225919be92..89ae30f609 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir @@ -34,16 +34,6 @@ chmod -st "$BUILDDIR/conf" 2>/dev/null || echo "WARNING: unable to chmod $BUILDD cd "$BUILDDIR" || die "Failed to change directory to $BUILDDIR!" -if [ -z "$TEMPLATECONF" ] && [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then - TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg") - # The following two are no longer valid; unsetting them will automatically get them replaced - # with correct ones. - if [ "$TEMPLATECONF" = meta/conf ] || [ "$TEMPLATECONF" = meta-poky/conf ]; then - unset TEMPLATECONF - rm "$BUILDDIR/conf/templateconf.cfg" - fi -fi - . "$OEROOT/.templateconf" # Keep the original TEMPLATECONF before possibly prefixing it with $OEROOT below. @@ -132,4 +122,6 @@ fi [ ! -r "$OECORENOTESCONF" ] || cat "$OECORENOTESCONF" unset OECORENOTESCONF -echo "$ORG_TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg" +if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then + echo "$ORG_TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg" +fi |