-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 06/11/12 09:09 AM, Alexis Ballier wrote:
> On Tue, 06 Nov 2012 08:57:05 -0500 Ian Stakenvicius
> <[email protected]> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>>
>> On 06/11/12 08:30 AM, Alexis Ballier wrote:
>>> On Tue, 06 Nov 2012 08:11:44 -0500 Ian Stakenvicius
>>> <[email protected]> wrote: [...]
>>>> Sure -- note, though, that if $type == "kern" and $KV is
>>>> unset, then this function does *NOT* return valid values.
>>>
>>> only if you hit the case where its needed [...] rather move the
>>> warning down to the cases where KV is needed
>>
>>
>> Yeah sure, I can do that instead:
>>
>>
>> - --- toolchain-funcs.eclass 2012-09-28 11:07:30.000000000 -0400
>> +++ toolchain-funcs.eclass.new 2012-11-06 08:55:33.000000000
>> -0500 @@ -358,8 +358,7 @@ [[ -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" + local
>> kvewarn="QA: Kernel version could not be determined, please
>> inherit kernel-2 or linux-info"
>>
>> case ${host} in aarch64*) ninj aarch64 arm;; @@ -376,6 +375,7 @@
>> if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt
>> $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then echo i386
>> else + [[ ${type} == "kern" ]] && [[ -z ${KV} ]] && ewarn
>> "${kvewarn}" echo x86
>
> if you're sure you'll be in the else branch when KV is unset then
> this (and the other hunks) sounds good to me. we could also
> separate the *freebsd* hosts from this case if this doesnt work.
>
I'm not sure. Would the version below be more acceptable?
> btw, dont we have eqawarn for such warnings ?
>
eqawarn requires EAPI=5 (4?) or eutils, and I didn't feel comfortable
inheriting eutils for this. If vapier wants to, sure we can convert
to eqawarn
Try2 -- separate i?86*freebsd* into its own test, same as is done for
x86_64*freebsd*:
- --- toolchain-funcs.eclass 2012-09-28 11:07:30.000000000 -0400
+++ toolchain-funcs.eclass.new 2012-11-06 09:52:42.000000000 -0500
@@ -358,8 +358,7 @@
[[ -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"
+ local kvewarn="QA: Kernel version could not be determined, please
inherit kernel-2 or linux-info"
case ${host} in
aarch64*) ninj aarch64 arm;;
@@ -369,11 +368,13 @@
bfin*) ninj blackfin bfin;;
cris*) echo cris;;
hppa*) ninj parisc hppa;;
+ i?86*freebsd*) echo i386;;
i?86*)
+ [[ ${type} == "kern" ]] && [[ -z ${KV} ]] && ewarn "${kvewarn}"
+
# 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" ]] && [[ $(KV_to_int ${KV}) -lt
$(KV_to_int 2.6.24) ]] ; then
echo i386
else
echo x86
@@ -385,6 +386,8 @@
nios2*) echo nios2;;
nios*) echo nios;;
powerpc*)
+ [[ ${type} == "kern" ]] && [[ -z ${KV} ]] && ewarn "${kvewarn}"
+
# 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
@@ -417,6 +420,7 @@
x86_64*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
# trees have been unified into 'x86'.
+ [[ ${type} == "kern" ]] && [[ -z ${KV} ]] && ewarn "${kvewarn}"
if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge
$(KV_to_int 2.6.24) ]] ; then
echo x86
else
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iF4EAREIAAYFAlCZJHgACgkQ2ugaI38ACPBFNwEAh73iFsFCpaLyw0O5V9gI4HjC
K4bWGNHQiC1mwdTt5o8BALQX0p4PxBgWNtIERyzjCjDxq/tpjqrOqfVfKhBJErzN
=1Y/D
-----END PGP SIGNATURE-----