public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/
Date: Mon, 27 Jun 2016 05:58:23 +0000 (UTC)	[thread overview]
Message-ID: <1467007094.81c226e451be564a545696f93fc5880ebc160812.mgorny@gentoo> (raw)

commit:     81c226e451be564a545696f93fc5880ebc160812
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 05:52:14 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 05:58:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81c226e4

toolchain-funcs.eclass: tc-ninja_magic_to_arch, remove old KV support

Remove the support for old kernel versions that are no longer used
in Gentoo, and rely on KV_to_int() function. This functions is provided
by Portage but not listed in PMS. Furthermore, for a long time Portage
replaced it with 'return 1' in global scope, so they did not really work
as expected anyway.

 eclass/tests/toolchain-funcs.sh |  7 -------
 eclass/toolchain-funcs.eclass   | 16 +++-------------
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index e6a1538..bfbe26f 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -25,13 +25,6 @@ test-tc-arch-kernel() {
 	done
 	return ${ret}
 }
-tbegin "tc-arch-kernel() (KV=2.6.0)"
-test-tc-arch-kernel 2.6.0 \
-	alpha arm{,eb}:arm avr32 bfin:blackfin cris hppa:parisc \
-	i{3..6}86:i386 ia64 m68k mips{,eb}:mips nios2 powerpc:ppc powerpc64:ppc64 \
-	s390{,x}:s390 sh{1..4}{,eb}:sh sparc{,64} vax x86_64 \
-	i{3..6}86-gentoo-freebsd:i386
-tend $?
 tbegin "tc-arch-kernel() (KV=2.6.30)"
 test-tc-arch-kernel 2.6.30 \
 	i{3..6}86:x86 x86_64:x86 \

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index d3abfb5..2652e0e 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -460,10 +460,6 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
 	local host=$2
 	[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
 
-	local KV=${KV:-${KV_FULL}}
-	[[ ${type} == "kern" ]] && [[ -z ${KV} ]] && \
-	ewarn "QA: Kernel version could not be determined, please inherit kernel-2 or linux-info"
-
 	case ${host} in
 		aarch64*)	echo arm64;;
 		alpha*)		echo alpha;;
@@ -479,7 +475,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
 			# Starting with linux-2.6.24, the 'x86_64' and 'i386'
 			# trees have been unified into 'x86'.
 			# FreeBSD still uses i386
-			if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then
+			if [[ ${type} == "kern" && ${host} == *freebsd* ]] ; then
 				echo i386
 			else
 				echo x86
@@ -497,14 +493,8 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
 			# Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
 			# have been unified into simply 'powerpc', but until 2.6.16,
 			# ppc32 is still using ARCH="ppc" as default
-			if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] ; then
+			if [[ ${type} == "kern" ]] ; then
 				echo powerpc
-			elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then
-				if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
-					echo powerpc
-				else
-					echo ppc
-				fi
 			elif [[ ${host} == powerpc64* ]] ; then
 				echo ppc64
 			elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
@@ -529,7 +519,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
 		x86_64*)
 			# Starting with linux-2.6.24, the 'x86_64' and 'i386'
 			# trees have been unified into 'x86'.
-			if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.24) ]] ; then
+			if [[ ${type} == "kern" ]] ; then
 				echo x86
 			else
 				ninj x86_64 amd64


             reply	other threads:[~2016-06-27  5:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  5:58 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-03 19:27 [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/ Sam James
2024-10-08 15:29 Ulrich Müller
2024-02-10 10:47 Michał Górny
2024-02-10 10:47 Michał Górny
2023-09-14  5:30 Michał Górny
2023-07-02 15:21 Michał Górny
2023-06-18 14:57 Michał Górny
2023-06-18 14:57 Michał Górny
2023-06-07  9:03 Ulrich Müller
2022-11-15 16:34 Michał Górny
2022-10-10 20:52 Michał Górny
2022-09-28 20:55 Michał Górny
2022-05-01  7:30 Michał Górny
2022-02-09  9:39 Michał Górny
2022-01-09  8:09 Michał Górny
2021-06-23 21:44 Michał Górny
2021-01-15 17:05 Michał Górny
2021-01-05 23:01 Sergei Trofimovich
2020-05-25  6:12 Michał Górny
2020-03-28 19:54 Sergei Trofimovich
2020-03-26  7:51 Sergei Trofimovich
2020-01-11 23:53 Sergei Trofimovich
2019-12-30 12:59 Michał Górny
2019-12-30 12:59 Michał Górny
2019-12-24 11:01 Sergei Trofimovich
2018-04-18 18:13 Mike Gilbert
2018-01-04 21:56 Michał Górny
2017-09-26 18:46 Ulrich Müller
2017-09-19 11:08 Michał Górny
2017-08-25 13:53 Michał Górny
2017-08-11 14:35 Michał Górny
2017-08-08 19:42 Michał Górny
2017-03-18  7:33 Michał Górny
2017-02-09 18:16 Mike Frysinger
2016-12-18 13:46 Michał Górny
2016-06-26 15:36 Michał Górny
2016-01-08  5:14 Michał Górny
2016-01-08  5:14 Michał Górny
2015-12-09 20:42 Michał Górny
2015-11-24 17:03 Mike Frysinger
2015-11-11 10:27 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467007094.81c226e451be564a545696f93fc5880ebc160812.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox