Hello. I want to create aarch64 crossdev environment today. I need gcc-4.9 from toolchain overlay and binutils-9999 from core gentoo overlay. 1. if I will add toolchain overlay to PORTDIR_OVERLAY: * getting sys-devel/binutils from /var/lib/layman/toolchain * getting sys-devel/gcc from /var/lib/layman/toolchain * getting sys-libs/glibc from /var/lib/layman/toolchain * getting sys-devel/gdb from /var/lib/layman/toolchain but there are no binutils-9999 in toolchain overlay. 2. if I will not add toolchain overlay to PORTDIR_OVERLAY - there are no gcc-4.9 in core gentoo overlay The problem is the part of "set_links" function: for s in ${ovl} ${SEARCH_OVERLAYS} ; do if [[ -d ${s}/${cat}/${pkg} ]] ; then srcdir=${s} einfo "getting ${cat}/${pkg} from ${srcdir}" break fi done This code do not care about package's version. Please consider attached patch. Reproducible: Always
Created attachment 375200 [details, diff] crossdev patch
Crossdev is not part of portage, but is its own package. Re-assigning to the maintainer.
Comment on attachment 375200 [details, diff] crossdev patch this doesn't work with version strings like ~4.8.1 or =4.9*
*** Bug 565054 has been marked as a duplicate of this bug. ***
This got a bit better with the following (although I don't think it's perfect): commit 65364fa2fa675ed05152f8fe5e4665cf262ed4b7 Author: Sam James <sam@gentoo.org> Date: Mon Jan 31 02:02:36 2022 +0000 crossdev: don't pick ebuild version from overlay if unmatching KEYWORDS We don't want to e.g. pick a GCC from an overlay if it doesn't have KEYWORDS for our target, which then leads to an early crossdev failure as it obviously can't then emerge GCC. Signed-off-by: Sam James <sam@gentoo.org> commit b15c1d5f590a309d6015ae6f225fc1b4611ff427 Author: Mikk Margus Möll <mikk.margus.moll@eesti.ee> Date: Tue Apr 19 21:01:54 2022 +0300 crossdev: add quotes to set_keywords variable Signed-off-by: Mikk Margus Möll <mikk.margus.moll@eesti.ee> Closes: https://github.com/gentoo/crossdev/pull/1 Signed-off-by: Sam James <sam@gentoo.org> commit 951e3f54dae6c815fbd89c16004c99b5c4c391ae Author: Krzesimir Nowak <knowak@microsoft.com> Date: Thu Jul 7 14:58:55 2022 +0200 crossdev: Take gdb variables into account When restoring user settings and when figuring out the list of repos. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Signed-off-by: Sam James <sam@gentoo.org> commit e4acb756ed5c898e4b244807fa5d3d14464765ea Author: Krzesimir Nowak <knowak@microsoft.com> Date: Thu Jul 7 14:56:57 2022 +0200 crossdev: Fall back to default version for gdb too Passing `--stable` didn't affect the version of built GDB, thus we needed to pass `--gdb '[stable]'` on our own. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Signed-off-by: Sam James <sam@gentoo.org> commit 718184e68a99cad05475854c136ab4664da12dee (tag: 20220709) Author: Krzesimir Nowak <knowak@microsoft.com> Date: Wed Jul 6 21:44:21 2022 +0200 crossdev: Fix matching of stable keywords Not sure how this worked before - in our case emerge couldn't find a matching ebuild any more when requesting stable versions. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/crossdev/pull/3 Signed-off-by: Sam James <sam@gentoo.org> commit dd89e2ff97e249a0800660cd6d135ff161e30ed0 Author: Sam James <sam@gentoo.org> Date: Sat Jan 14 17:58:08 2023 +0000 crossdev: add TODO re picking versions from overlays & best version Signed-off-by: Sam James <sam@gentoo.org>