public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 1/2] scripts/oe-setup-builddir: make environment variable the highest priority source for TEMPLATECONF
Date: Fri,  2 Sep 2022 14:02:01 +0200	[thread overview]
Message-ID: <20220902120202.487119-1-alex@linutronix.de> (raw)

This sets the following order:

1. TEMPLATECONF set in the unix environment (for example as a
prefix to '. oe-init-build-env').

2. If empty then $BUILDDIR/conf/templateconf.cfg

3. If absent then $OEROOT/.templateconf (oe-init-build-env sets OEROOT
to where it is, which is poky or oe-core).

I believe this is more logical and consistent with common practice;
it also avoids situations where the user is stuck with cryptic
errors because templateconf.cfg contains something invalid and
that something cannot be overridden from command line.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/oe-setup-builddir | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index 32bc6580eb..8e95f0d94e 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -38,7 +38,7 @@ chmod -st "$BUILDDIR/conf" 2>/dev/null || echo "WARNING: unable to chmod $BUILDD
 
 cd "$BUILDDIR"
 
-if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then
+if [ -f "$BUILDDIR/conf/templateconf.cfg" -a -z "$TEMPLATECONF" ]; then
     TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg")
     # The following two are no longer valid; unsetting them will automatically get them replaced
     # with correct ones.
-- 
2.30.2



             reply	other threads:[~2022-09-02 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 12:02 Alexander Kanavin [this message]
2022-09-02 12:02 ` [PATCH 2/2] scripts/oe-setup-builddir: write to conf/templateconf.cfg after the build is set up Alexander Kanavin

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=20220902120202.487119-1-alex@linutronix.de \
    --to=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.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