Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/
Date: Mon, 27 Jun 2016 05:58:31
Message-Id: 1467007094.81c226e451be564a545696f93fc5880ebc160812.mgorny@gentoo
1 commit: 81c226e451be564a545696f93fc5880ebc160812
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 27 05:52:14 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 27 05:58:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81c226e4
7
8 toolchain-funcs.eclass: tc-ninja_magic_to_arch, remove old KV support
9
10 Remove the support for old kernel versions that are no longer used
11 in Gentoo, and rely on KV_to_int() function. This functions is provided
12 by Portage but not listed in PMS. Furthermore, for a long time Portage
13 replaced it with 'return 1' in global scope, so they did not really work
14 as expected anyway.
15
16 eclass/tests/toolchain-funcs.sh | 7 -------
17 eclass/toolchain-funcs.eclass | 16 +++-------------
18 2 files changed, 3 insertions(+), 20 deletions(-)
19
20 diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
21 index e6a1538..bfbe26f 100755
22 --- a/eclass/tests/toolchain-funcs.sh
23 +++ b/eclass/tests/toolchain-funcs.sh
24 @@ -25,13 +25,6 @@ test-tc-arch-kernel() {
25 done
26 return ${ret}
27 }
28 -tbegin "tc-arch-kernel() (KV=2.6.0)"
29 -test-tc-arch-kernel 2.6.0 \
30 - alpha arm{,eb}:arm avr32 bfin:blackfin cris hppa:parisc \
31 - i{3..6}86:i386 ia64 m68k mips{,eb}:mips nios2 powerpc:ppc powerpc64:ppc64 \
32 - s390{,x}:s390 sh{1..4}{,eb}:sh sparc{,64} vax x86_64 \
33 - i{3..6}86-gentoo-freebsd:i386
34 -tend $?
35 tbegin "tc-arch-kernel() (KV=2.6.30)"
36 test-tc-arch-kernel 2.6.30 \
37 i{3..6}86:x86 x86_64:x86 \
38
39 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
40 index d3abfb5..2652e0e 100644
41 --- a/eclass/toolchain-funcs.eclass
42 +++ b/eclass/toolchain-funcs.eclass
43 @@ -460,10 +460,6 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
44 local host=$2
45 [[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
46
47 - local KV=${KV:-${KV_FULL}}
48 - [[ ${type} == "kern" ]] && [[ -z ${KV} ]] && \
49 - ewarn "QA: Kernel version could not be determined, please inherit kernel-2 or linux-info"
50 -
51 case ${host} in
52 aarch64*) echo arm64;;
53 alpha*) echo alpha;;
54 @@ -479,7 +475,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
55 # Starting with linux-2.6.24, the 'x86_64' and 'i386'
56 # trees have been unified into 'x86'.
57 # FreeBSD still uses i386
58 - if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then
59 + if [[ ${type} == "kern" && ${host} == *freebsd* ]] ; then
60 echo i386
61 else
62 echo x86
63 @@ -497,14 +493,8 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
64 # Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
65 # have been unified into simply 'powerpc', but until 2.6.16,
66 # ppc32 is still using ARCH="ppc" as default
67 - if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] ; then
68 + if [[ ${type} == "kern" ]] ; then
69 echo powerpc
70 - elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then
71 - if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
72 - echo powerpc
73 - else
74 - echo ppc
75 - fi
76 elif [[ ${host} == powerpc64* ]] ; then
77 echo ppc64
78 elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
79 @@ -529,7 +519,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
80 x86_64*)
81 # Starting with linux-2.6.24, the 'x86_64' and 'i386'
82 # trees have been unified into 'x86'.
83 - if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.24) ]] ; then
84 + if [[ ${type} == "kern" ]] ; then
85 echo x86
86 else
87 ninj x86_64 amd64