From 068669eb1bc72cb3a4dcb589dc37739e04e174a9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 26 Jan 2020 19:29:54 +0000 Subject: toolchain.eclass: don't override release vesion, assert it instead Closes: https://bugs.gentoo.org/706240 Signed-off-by: Sergei Trofimovich --- eclass/toolchain.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'eclass/toolchain.eclass') diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a535707f7ece..97c9e585723e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -568,8 +568,10 @@ toolchain_src_prepare() { gcc_version_patch if tc_version_is_at_least 4.1 ; then - if [[ -n ${SNAPSHOT} ]] || tc_is_live ; then - echo "${GCC_CONFIG_VER}" > "${S}"/gcc/BASE-VER + local actual_version=$(< "${S}"/gcc/BASE-VER) + if [[ "${GCC_RELEASE_VER}" != "${actual_version}" ]] ; then + eerror "'${S}/gcc/BASE-VER' contains '${actual_version}', expected '${GCC_RELEASE_VER}'" + die "Please rename ebuild to '${PN}-${actual_version}...'" fi fi @@ -799,7 +801,7 @@ gcc_version_patch() { # gcc-4.3+ has configure flags (whoo!) tc_version_is_at_least 4.3 && return 0 - local version_string=${GCC_CONFIG_VER} + local version_string=${GCC_RELEASE_VER} einfo "patching gcc version: ${version_string} (${BRANDING_GCC_PKGVERSION})" -- cgit v1.2.3-65-gdbad