From d4e33f7a4c03966333f981c8e6003456332fa61c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 19 Jan 2026 11:56:42 +0100 Subject: [PATCH] overlay profiles: Ease into Python bump with transitional profile We only allow one version of Python in the SDK and generic images, but this creates a friction during the SDK build where the seed still has an old version of Python and the stage1 is supposed to have the new one, and thus we end up with slot conflicts for python packages - I don't really understand what is going on (there are python packages in the seed image that are built for old Python and emerge wants to install the same packages in the seed but built for the new Python and it can't work its way around it.) Allowing both versions of Python to coexist in stage1 seems to be moving things forward. Stage3 image (stage2 is skipped) will contain only the new version of Python. Signed-off-by: Krzesimir Nowak --- .../coreos-overlay/profiles/coreos/base/make.defaults | 6 +++--- .../coreos-overlay/profiles/coreos/base/package.mask | 2 +- .../profiles/coreos/targets/generic/make.defaults | 4 ---- .../profiles/coreos/targets/generic/package.mask | 8 -------- .../profiles/coreos/targets/sdk/transition/make.defaults | 9 +++++++++ .../coreos/targets/sdk/transition/package.unmask | 1 + 6 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults create mode 100644 sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index 1b87ebc6b1..cf5b8e5ba3 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -10,13 +10,13 @@ USE_EXPAND="${USE_EXPAND} GO_VERSION" USE="${USE} -cracklib -cups -tcpd -berkdb" -# Use Python 3.12 as the default version, allow python 3.11 for a transition. +# Use Python 3.12 as the default version. PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" -PYTHON_TARGETS="-pypy3_11 python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" # Same as above, but for bootstrapping. BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_pypy3_11 -python_single_target_python3_11 python_single_target_python3_12 -python_single_target_python3_13 -python_single_target_python3_14 -python_single_target_python3_13t -python_single_target_python3_14t" -BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 -python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" # Never install cron or cron jobs diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask index 69b5d00fdc..85b9fe1f52 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask @@ -17,5 +17,5 @@ # Do not install python versions that were "disabled" in # PYTHON_TARGETS. For some reason emerge still insists on installing # those as a dependency for some packages. -=dev-lang/python-3.13 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index f2e02104ba..41c51cf110 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -3,10 +3,6 @@ FLATCAR_TYPE=generic -# Use Python 3.12 as the default version. -PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" -PYTHON_TARGETS="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" - USE="acpi usb cryptsetup policykit" USE="${USE} -cros_host -expat -cairo -X -man" USE="${USE} -acl -gpm -python" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask deleted file mode 100644 index 290a00bc4f..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.mask +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2026 The Flatcar Maintainers. -# Distributed under the terms of the GNU General Public License v2 - -# Do not install python versions that were "disabled" in -# PYTHON_TARGETS. For some reason emerge still insists on installing -# those as a dependency for some packages. -=dev-lang/python-3.13 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults new file mode 100644 index 0000000000..540cbb1ae7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/make.defaults @@ -0,0 +1,9 @@ +# Override python settings + +# Use Python 3.12 as the default version, allow python 3.11 for a transition. +PYTHON_SINGLE_TARGET="-pypy3_11 -python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" +PYTHON_TARGETS="-pypy3_11 python3_11 python3_12 -python3_13 -python3_14 -python3_13t -python3_14t" + +# Same as above, but for bootstrapping. +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_single_target_pypy3_11 -python_single_target_python3_11 python_single_target_python3_12 -python_single_target_python3_13 -python_single_target_python3_14 -python_single_target_python3_13t -python_single_target_python3_14t" +BOOTSTRAP_USE="${BOOTSTRAP_USE} -python_targets_pypy3_11 python_targets_python3_11 python_targets_python3_12 -python_targets_python3_13 -python_targets_python3_14 -python_targets_python3_13t -python_targets_python3_14t" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask new file mode 100644 index 0000000000..0873f9ab03 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/sdk/transition/package.unmask @@ -0,0 +1 @@ +=dev-lang/python-3.11*