From: Peter Kjellerstedt Date: Tue, 6 Sep 2022 14:58:51 +0000 (+0200) Subject: oe-setup-builddir: Correct when validation of the templates dir is run X-Git-Tag: 2022-10~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcca9ee6f06e9eacd6507f57bd0a5012ea343aa9;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git oe-setup-builddir: Correct when validation of the templates dir is run 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index 3c63e38fa9f..daab33ebf8d 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"