From 1bc16717ffb9819d1f5f03c1fe413be04d378246 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 30 Sep 2024 06:54:07 +0100 Subject: [PATCH] toolchain.eclass: tweak Ada, D deps Without this, we can end up with something like: ``` [ebuild NS ] sys-devel/gcc-11.5.0:11::gentoo [13.3.1_p20240614:13::gentoo] USE="(ada*) cet (cxx) (d*) [...]" [ebuild R ] sys-devel/gcc-13.3.1_p20240614:13::gentoo USE="(ada*) cet (cxx) (d*) [...]" Total: 2 packages (1 in new slot, 1 reinstall), Size of downloads: 0 KiB * Error: circular dependencies: (sys-devel/gcc-13.3.1_p20240614:13/13::gentoo, ebuild scheduled for merge) depends on (sys-devel/gcc-11.5.0:11/11::gentoo, ebuild scheduled for merge) (buildtime) (sys-devel/gcc-13.3.1_p20240614:13/13::gentoo, ebuild scheduled for merge) (buildtime) ``` Portage sees sys-devel/gcc[ada] is queued and tries to use it to satisfy the dep for 11, which pulls in 13, which pulls in 11 for D. We can workaround this by depending on older GCC for whatever slot we're in. This matches upstream documentation and also reality as you usually need an older version anyway. See also 370253f008a8922c9aebe8099ab9c34bd6947f66 in binhost.git. Bug: https://bugs.gentoo.org/880825 Signed-off-by: Sam James --- eclass/toolchain.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d29d070805820..939c681131889 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -402,7 +402,7 @@ if tc_has_feature valgrind ; then fi if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then - BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )" + BDEPEND+=" ada? ( || ( sys-devel/gcc:${SLOT}[ada]