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 1BCA0158083 for ; Wed, 18 Sep 2024 15:51:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 484FBE299F; Wed, 18 Sep 2024 15:51:33 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 33DA1E299F for ; Wed, 18 Sep 2024 15:51:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 6529C3408DD for ; Wed, 18 Sep 2024 15:51:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9553A1E16 for ; Wed, 18 Sep 2024 15:51:30 +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: <1726674566.e9971cf188e6578ebdd68af6785a59ab5615abbf.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e9971cf188e6578ebdd68af6785a59ab5615abbf X-VCS-Branch: master Date: Wed, 18 Sep 2024 15:51:30 +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: 96347f6b-3cc1-4f2b-bc02-7c2c94c11563 X-Archives-Hash: f1c216eee7ece52c34a3301bf456acca commit: e9971cf188e6578ebdd68af6785a59ab5615abbf Author: Sam James gentoo org> AuthorDate: Wed Sep 18 15:42:39 2024 +0000 Commit: Sam James gentoo org> CommitDate: Wed Sep 18 15:49:26 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9971cf1 toolchain.eclass: make tests opt-in per-ebuild In 1d93a491096f1cc0234fcf44458bfec142c213bb, we kind of introduced a timebomb to all GCC ebuilds. Switch to making it opt-in by setting TOOLCHAIN_HAS_TESTS in ebuilds which want to use validate_failures.py. It hasn't been tested and may not even work with gnat-gpl and kgcc64 so it doesn't make sense to have it by default, especially for gnat-gpl which is now just a bootstrap package anyway. Bug: https://bugs.gentoo.org/934124 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index c03312be43ad..a545f730ada7 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -22,7 +22,9 @@ _TOOLCHAIN_ECLASS=1 DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" -inherit edo flag-o-matic gnuconfig libtool multilib pax-utils python-any-r1 toolchain-funcs prefix +inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix + +[[ -n ${TOOLCHAIN_HAS_TESTS} ]] && inherit python-any-r1 tc_is_live() { [[ ${PV} == *9999* ]] @@ -143,6 +145,12 @@ tc_version_is_between() { # @DESCRIPTION: # Indicate the developer who hosts the patchset for an ebuild. +# @ECLASS_VARIABLE: TOOLCHAIN_HAS_TESTS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Controls whether python-any-r1 is inherited and validate_failures.py +# is used. + # @ECLASS_VARIABLE: GCC_PV # @INTERNAL # @DESCRIPTION: @@ -273,6 +281,7 @@ STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VE LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+" IUSE="test vanilla +nls" RESTRICT="!test? ( test )" +[[ -z ${TOOLCHAIN_HAS_TESTS} ]] && RESTRICT+=" test" TC_FEATURES=() @@ -537,7 +546,8 @@ get_gcc_src_uri() { [[ -n ${MUSL_VER} ]] && \ GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX})" - GCC_SRC_URI+=" test? ( https://gitweb.gentoo.org/proj/gcc-patches.git/plain/scripts/testsuite-management/validate_failures.py?id=${GCC_VALIDATE_FAILURES_VERSION} -> gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py )" + [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && \ + GCC_SRC_URI+=" test? ( https://gitweb.gentoo.org/proj/gcc-patches.git/plain/scripts/testsuite-management/validate_failures.py?id=${GCC_VALIDATE_FAILURES_VERSION} -> gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py )" echo "${GCC_SRC_URI}" } @@ -569,7 +579,7 @@ toolchain_pkg_setup() { # more legible. MAKEOPTS="--output-sync=line ${MAKEOPTS}" - use test && python-any-r1_pkg_setup + [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test && python-any-r1_pkg_setup } #---->> src_unpack <<---- @@ -633,7 +643,7 @@ toolchain_src_prepare() { tc_enable_hardened_gcc fi - if use test ; then + if [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test ; then cp "${DISTDIR}"/gcc-validate-failures-${GCC_VALIDATE_FAILURES_VERSION}.py "${T}"/validate_failures.py || die chmod +x "${T}"/validate_failures.py || die fi @@ -2275,7 +2285,7 @@ toolchain_src_install() { pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1" pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus" - if use test ; then + if [[ -n ${TOOLCHAIN_HAS_TESTS} ]] && use test ; then mkdir "${T}"/test-results || die cd "${WORKDIR}"/build || die find . -name \*.sum -exec cp --parents -v {} "${T}"/test-results \; || die @@ -2434,7 +2444,7 @@ create_revdep_rebuild_entry() { #---->> pkg_pre* <<---- toolchain_pkg_preinst() { - if [[ ${MERGE_TYPE} != binary ]] && use test ; then + if [[ -n ${TOOLCHAIN_HAS_TESTS} && ${MERGE_TYPE} != binary ]] && use test ; then # Install as orphaned to allow comparison across more versions even # after unmerged. Also useful for historical records and tracking # down regressions a while after they first appeared, but were only