public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCHv2 1/3] oe-setup-builddir: Correct when validation of the templates dir is run
@ 2022-09-06 14:58 Peter Kjellerstedt
  2022-09-06 14:58 ` [PATCHv2 2/3] oe-setup-builddir: Simplify error handling Peter Kjellerstedt
  2022-09-06 14:58 ` [PATCHv2 3/3] oe-setup-builddir: Avoid shellcheck warnings Peter Kjellerstedt
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2022-09-06 14:58 UTC (permalink / raw)
  To: openembedded-core

The validation of the templates directory is supposed to be run as long
as $TEMPLATECONF is defined, but it was only done if the directory did
not exist.

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

PATCHv2: Added a commit description.

 scripts/oe-setup-builddir | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index d3c7f943e7..70f2245b16 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -63,11 +63,11 @@ if [ -n "$TEMPLATECONF" ]; then
             echo >&2 "Error: TEMPLATECONF value points to nonexistent directory '$TEMPLATECONF'"
             exit 1
         fi
-        templatesdir=$(python3 -c "import sys; print(sys.argv[1].strip('/').split('/')[-2])" $TEMPLATECONF)
-        if [ ! -f "$TEMPLATECONF/../../layer.conf" -o $templatesdir != "templates" ]; then
-            echo >&2 "Error: TEMPLATECONF value (which is $TEMPLATECONF) must point to meta-some-layer/conf/templates/template-name"
-            exit 1
-        fi
+    fi
+    templatesdir=$(python3 -c "import sys; print(sys.argv[1].strip('/').split('/')[-2])" $TEMPLATECONF)
+    if [ ! -f "$TEMPLATECONF/../../layer.conf" -o $templatesdir != "templates" ]; then
+        echo >&2 "Error: TEMPLATECONF value (which is $TEMPLATECONF) must point to meta-some-layer/conf/templates/template-name"
+        exit 1
     fi
     OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
     OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCHv2 1/3] oe-setup-builddir: Correct when validation of the templates dir is run
@ 2022-09-09  8:42 Konrad Weihmann
  0 siblings, 0 replies; 4+ messages in thread
From: Konrad Weihmann @ 2022-09-09  8:42 UTC (permalink / raw)
  To: openembedded-core

A general remark from my side about this patch is that this limitation 
isn't mentioned in the documentation at all [1].
I would have been in favor of just dropping this piece of code, esp as 
the check wasn't run for years now - but here we are with another 
undocumented and breaking change (at least for me, as the template confs 
in my projects weren't located under templates, until everything fell 
apart in CI over night)

[1] 
https://docs.yoctoproject.org/ref-manual/structure.html?highlight=templateconf#oe-init-build-env


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-09  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 14:58 [PATCHv2 1/3] oe-setup-builddir: Correct when validation of the templates dir is run Peter Kjellerstedt
2022-09-06 14:58 ` [PATCHv2 2/3] oe-setup-builddir: Simplify error handling Peter Kjellerstedt
2022-09-06 14:58 ` [PATCHv2 3/3] oe-setup-builddir: Avoid shellcheck warnings Peter Kjellerstedt
  -- strict thread matches above, loose matches on Subject: below --
2022-09-09  8:42 [PATCHv2 1/3] oe-setup-builddir: Correct when validation of the templates dir is run Konrad Weihmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox