Skip to contentSkip to conversation

populate_sdk_ext: Fix to use python3, not python

PATCH In review Richard Purdie 2 participants 2 messages Jun 27, 2020 – Jun 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 populate_sdk_ext: Fix to use python3, not python

We should be using python3 here, it was missed in the conversion. Spotted on autobuilder tests failing on systems with python missing.

---
 meta/classes/populate_sdk_ext.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +1 -1
index 9f26cfc1316..fd0da16e7ea 100644
@@ -676,7 +676,7 @@ sdk_ext_postinst() {
 		# current working directory when first ran, nor will it set $1 when
 		# sourcing a script. That is why this has to look so ugly.
 		LOGFILE="$target_sdk_dir/preparing_build_system.log"
-		sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+		sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python3 $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
 	fi
 	if [ -e $target_sdk_dir/ext-sdk-prepare.py ]; then
 		rm $target_sdk_dir/ext-sdk-prepare.py
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Richard Purdie

We should be using python3 here, it was missed in the conversion. Spotted on
autobuilder tests failing on systems with python missing.

I this this is good for dunfell too

Quoted 37 lines
---
 meta/classes/populate_sdk_ext.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +0 -0
index 9f26cfc1316..fd0da16e7ea 100644
@@ -676,7 +676,7 @@ sdk_ext_postinst() {
                # current working directory when first ran, nor will it

set $1 when

                # sourcing a script. That is why this has to look so ugly.
                LOGFILE="$target_sdk_dir/preparing_build_system.log"
-               sh -c ". buildtools/environment-setup* > $LOGFILE && cd
$target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir
&& . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE
&& python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
'${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully
installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+               sh -c ". buildtools/environment-setup* > $LOGFILE && cd
$target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir
&& . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE
&& python3 $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
'${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully
installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
        fi
        if [ -e $target_sdk_dir/ext-sdk-prepare.py ]; then
                rm $target_sdk_dir/ext-sdk-prepare.py
--
2.25.1