diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2023-04-11 11:03:47 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-04 12:46:14 +0100 |
commit | d5d0b3f785146cb41b10b5f30c7051f5b22a8a00 (patch) | |
tree | 8550af45cbe2429e86f06ca16c2b4675c9a792e1 /meta/classes-recipe | |
parent | 928609318f52fdc8deefcb4bc4d388b6af8b62f9 (diff) | |
download | poky-d5d0b3f785146cb41b10b5f30c7051f5b22a8a00.tar.gz |
populate_sdk_ext.bbclass: redirect stderr to stdout so that both end in LOGFILE
* this in the end doesn't help much, I was debugging warning (about base-files.do_install
signature being different than expected) from:
python3 $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'
this shows the warning on console, but it doesn't end in $LOGFILE, because it
writes only contents of cooker log into the $LOGFILE with:
with open(logfile, 'a') as logf:
logf.write('Preparing SDK for %s...\n' % ', '.join(sdk_targets))
ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets))
if not ret:
ret = run_command_interruptible('bitbake --quiet build-sysroots')
lastlog = get_last_consolelog()
if lastlog:
with open(lastlog, 'r') as f:
for line in f:
logf.write(line)
if ret:
print('ERROR: SDK preparation failed: error log written to %s' % logfile)
return ret
maybe we could remove whole support for $LOGFILE parameter and just redirect
the output like other commands on this line
(From OE-Core rev: 719f22df160ebde303274ccfc04049cffdb51577)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/populate_sdk_ext.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass index 476876e03d..fe656ed824 100644 --- a/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/meta/classes-recipe/populate_sdk_ext.bbclass | |||
@@ -733,7 +733,7 @@ sdk_ext_postinst() { | |||
733 | # current working directory when first ran, nor will it set $1 when | 733 | # current working directory when first ran, nor will it set $1 when |
734 | # sourcing a script. That is why this has to look so ugly. | 734 | # sourcing a script. That is why this has to look so ugly. |
735 | LOGFILE="$target_sdk_dir/preparing_build_system.log" | 735 | LOGFILE="$target_sdk_dir/preparing_build_system.log" |
736 | 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 ; } | 736 | sh -c ". buildtools/environment-setup* > $LOGFILE 2>&1 && 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 2>&1 && 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 ; } |
737 | fi | 737 | fi |
738 | if [ -e $target_sdk_dir/ext-sdk-prepare.py ]; then | 738 | if [ -e $target_sdk_dir/ext-sdk-prepare.py ]; then |
739 | rm $target_sdk_dir/ext-sdk-prepare.py | 739 | rm $target_sdk_dir/ext-sdk-prepare.py |