Merge pull request #874 from kinvolk/t-lo/fix-sdk-bootstrap

fix sdk bootstrap: use python3 in catalyst chroot-functions, set cros_host USE when bootstrapping
This commit is contained in:
Thilo Fromm 2021-03-15 15:05:51 +01:00 committed by GitHub
commit af26169c04
3 changed files with 25 additions and 0 deletions

View File

@ -58,6 +58,7 @@ PATCHES=(
"${FILESDIR}/0002-catalyst-Remove-Maintained-by-sections.patch"
"${FILESDIR}/0003-catalyst-Remove-unnecessary-future-imports.patch"
"${FILESDIR}/0004-catalyst-Use-python3-shebangs.patch"
"${FILESDIR}/0005-chroot-funcs-use-python3-for-debug-output.patch"
)
python_prepare_all() {

View File

@ -0,0 +1,20 @@
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index f3727d0..e1c82c1 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -285,13 +285,13 @@ run_merge() {
}
show_debug() {
- if [ "${clst_DEBUG}" = "1" ]
+ if [ -n "${clst_DEBUG}" ]
then
unset PACKAGES
echo "DEBUG:"
echo "Profile/target info:"
echo "Profile inheritance:"
- python -c 'import portage; print(portage.settings.profiles)'
+ python3 -c 'import portage; print(portage.settings.profiles)'
echo
# TODO: make this work on non-portage
emerge --info

View File

@ -1,3 +1,7 @@
# Enable optimizations for common x86_64 CPUs
CFLAGS="-O2 -pipe -mtune=generic"
CXXFLAGS="${CFLAGS}"
# add cros_host to bootstrapping USE flags so SDK / toolchains bootstrapping
# will use vim's vimrc instead of baselayouts',
BOOTSTRAP_USE="$BOOTSTRAP_USE cros_host"