diff mbox series

[2/2] oe-setup-builddir: Always update templateconf.cfg

Message ID 20220906164335.2629721-2-pkj@axis.com
State Accepted, archived
Commit 37c122dfdac03a98bf2bf8c8f7676ec25136d402
Headers show
Series [1/2] oe-setup-builddir: Keep templateconf.cfg relative if $TEMPLATECONF is | expand

Commit Message

Peter Kjellerstedt Sept. 6, 2022, 4:43 p.m. UTC
The intent of the templateconf.cfg file is to cache the value of
$TEMPLATECONF. To do this, it needs to be updated in case TEMPLATECONF
is manually specified.

Before, the following commands:

  TEMPLATECONF=foo . oe-init-build-env
  TEMPLATECONF=bar . oe-init-build-env
  . oe-init-build-env

would cause the templates in foo to be used for the last source of
oe-init-build-env, while afterwards, bar is used as expected.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

Of course, re-sourcing oe-init-build-env with different values for
TEMPLATECONF only has a real effect if any of the generated files have
been removed, but that is a different story.

 scripts/oe-setup-builddir | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 201cea30bf..72113c37b8 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -133,6 +133,4 @@  fi
 [ ! -r "$OECORENOTESCONF" ] || cat "$OECORENOTESCONF"
 unset OECORENOTESCONF
 
-if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then
-    echo "$ORG_TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg"
-fi
+echo "$ORG_TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg"