[OE-core] [dylan, master][PATCH] populate_sdk_base: Fix relocate_sdk.py execution on Arch

Richard Purdie richard.purdie at linuxfoundation.org
Fri Oct 4 11:33:36 UTC 2013


On Wed, 2013-10-02 at 18:18 -0500, Richard Tollerton wrote:
> relocate_sdk.py is #!/usr/bin/env python, but is not python3-compatible.
> The PEP 394 alias `python2` is sadly not universally supported, so
> instead of modifying relocate_sdk.py directly, change the `exec` in
> relocate_sdk.sh to use it if it exists.
> 
> Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
> ---
>  meta/classes/populate_sdk_base.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Wasn't the script fixed in master to avoid this problem?

Cheers,

Richard

> diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
> index e5bc0b4..e67d8b6 100644
> --- a/meta/classes/populate_sdk_base.bbclass
> +++ b/meta/classes/populate_sdk_base.bbclass
> @@ -256,8 +256,9 @@ if [ x$tdir = x ] ; then
>     echo "SDK relocate failed, could not create a temporary directory"
>     exit 1
>  fi
> +python_bin="$(command -v python2 2>/dev/null)" || python_bin=python
>  echo "#!/bin/bash" > $tdir/relocate_sdk.sh
> -echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
> +echo exec $python_bin ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
>  $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
>  $SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
>  rm -rf $tdir





More information about the Openembedded-core mailing list