From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A0D0F158088 for ; Mon, 31 Jan 2022 02:06:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE6812BC007; Mon, 31 Jan 2022 02:06:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 49B762BC007 for ; Mon, 31 Jan 2022 02:06:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA91434270B for ; Mon, 31 Jan 2022 02:06:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 01F232B3 for ; Mon, 31 Jan 2022 02:06:09 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1643594763.65364fa2fa675ed05152f8fe5e4665cf262ed4b7.sam@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 65364fa2fa675ed05152f8fe5e4665cf262ed4b7 X-VCS-Branch: master Date: Mon, 31 Jan 2022 02:06:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fc797ced-efbe-42a4-9f9f-516f31306f11 X-Archives-Hash: d8bca116f2b7330ecefed102db41ec1f commit: 65364fa2fa675ed05152f8fe5e4665cf262ed4b7 Author: Sam James gentoo org> AuthorDate: Mon Jan 31 02:02:36 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jan 31 02:06:03 2022 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=65364fa2 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 gentoo.org> crossdev | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/crossdev b/crossdev index 806a66c..287fd53 100755 --- a/crossdev +++ b/crossdev @@ -1194,9 +1194,26 @@ set_links() { fi for s in ${ovl} ${SEARCH_OVERLAYS} ; do if [[ -d ${s}/${cat}/${pkg} ]] ; then - srcdir=${s} - einfo "getting ${cat}/${pkg} from ${srcdir}" - break + # Versions in an additional non-crossdev overlay may not have the right keywords. + # e.g. suppose we have sys-devel/gcc in an overlay with just ~arch keywords. + # (Or not be keyworded for our target arch at all!) + local search_kw_string= + + case "${LVER}" in + "[stable]") + search_kw_string="^[~]${TARCH}" + ;; + *) + search_kw_string="${TARCH}" + ;; + esac + + if grep -qre "KEYWORDS=.*${search_kw_string}" "${s}/${cat}/${pkg}" ; then + # ... so only skip if we found one which is at least stable. + srcdir=${s} + einfo "getting ${cat}/${pkg} from ${srcdir}" + break + fi fi done ln -s "${srcdir}"/${cat}/${pkg} "${d}"