Patchwork [fsl-community-bsp-base] setup-environment: return if no conf/local.conf generated

login
register
mail settings
Submitter Ting Liu
Date July 9, 2014, 3:38 a.m.
Message ID <1404877106-40340-1-git-send-email-ting.liu@freescale.com>
Download mbox | patch
Permalink /patch/75207/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Ting Liu - July 9, 2014, 3:38 a.m.
From: Ting Liu <ting.liu@freescale.com>

there will be no conf/local.conf generated if python version check
in poky/scripts/oe-buildenv-internal failed. In this case, no need
to go further.

Signed-off-by: Ting Liu <ting.liu@freescale.com>
---
 setup-environment | 5 +++++
 1 file changed, 5 insertions(+)
Daiane Angolini - July 11, 2014, 1:12 p.m.
On Wed, Jul 9, 2014 at 12:38 AM,  <ting.liu@freescale.com> wrote:
> From: Ting Liu <ting.liu@freescale.com>
>
> there will be no conf/local.conf generated if python version check
> in poky/scripts/oe-buildenv-internal failed. In this case, no need
> to go further.

This patch is OK to me. I donĀ“t see any problem.

ACK

Daiane
>
> Signed-off-by: Ting Liu <ting.liu@freescale.com>
> ---
>  setup-environment | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/setup-environment b/setup-environment
> index 5931e2b..a19aa13 100755
> --- a/setup-environment
> +++ b/setup-environment
> @@ -132,6 +132,11 @@ cd $OEROOT
>
>  . ./oe-init-build-env $CWD/$1 > /dev/null
>
> +# if conf/local.conf not generated, no need to go further
> +if [ ! -e conf/local.conf ]; then
> +    clean_up && return 1
> +fi
> +
>  # Clean up PATH, because if it includes tokens to current directories somehow,
>  # wrong binaries can be used instead of the expected ones during task execution
>  export PATH="`echo $PATH | sed 's/\(:.\|:\)*:/:/g;s/^.\?://;s/:.\?$//'`"
> --
> 1.8.3.2
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale

Patch

diff --git a/setup-environment b/setup-environment
index 5931e2b..a19aa13 100755
--- a/setup-environment
+++ b/setup-environment
@@ -132,6 +132,11 @@  cd $OEROOT
 
 . ./oe-init-build-env $CWD/$1 > /dev/null
 
+# if conf/local.conf not generated, no need to go further
+if [ ! -e conf/local.conf ]; then
+    clean_up && return 1
+fi
+
 # Clean up PATH, because if it includes tokens to current directories somehow,
 # wrong binaries can be used instead of the expected ones during task execution
 export PATH="`echo $PATH | sed 's/\(:.\|:\)*:/:/g;s/^.\?://;s/:.\?$//'`"