Message ID | 20220906135010.2610775-1-pkj@axis.com |
---|---|
State | Accepted, archived |
Commit | dcca9ee6f06e9eacd6507f57bd0a5012ea343aa9 |
Headers | show |
Series | [1/3] oe-setup-builddir: Correct when validation of the templates dir is run | expand |
The patch context doesn’t show the nested conditions, so it would be good to add a description of what is being corrected. Alex On Tue 6. Sep 2022 at 15.50, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote: > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> > --- > 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" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#170354): > https://lists.openembedded.org/g/openembedded-core/message/170354 > Mute This Topic: https://lists.openembedded.org/mt/93500975/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
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"
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- scripts/oe-setup-builddir | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)