dev-util/catalyst: use python3 in chroot-functions for portage dbg output

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
This commit is contained in:
Thilo Fromm 2021-03-02 13:49:53 +01:00
parent e9a822fd0a
commit aa4355cdb5
2 changed files with 21 additions and 0 deletions

View File

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