-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hey all -- it's been a month since 432390 was filed; and this bug is keeping lirc-0.9.0-r2 from going stable. If nobody objects within the next 24h or so, I'm going to apply the following patch to toolchain-funcs.eclass to fix the bug.
The patch does not revert existing behaviour and only allows the
function to work properly (or fail gracefully) when used outside of
kernel-2.eclass.
The patch changes tc-ninja_magic_to_arch() as follows:
1 - changes the use of $KV to the local $kv in all checks
2 - assigns kv=${KV:-$KV_FULL}
(so that if called from kernel-2.eclass it will work as-is, but if
not then it will use the value of KV_FULL from linux-info, the way its
supposed to)
3 - dies, instead of returning an invalid value, when no kernel
version is available.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iF4EAREIAAYFAlBkkxcACgkQ2ugaI38ACPDAzwD+KJCvblZlCjw3ELum8JK1zg0c
ZDCGuRb7bbpFuCjfKK8BALMBDyDamB7zvrgu1vOi3LuEPHLTY2yB8YColruW9Q4v
=Husj
-----END PGP SIGNATURE-----
--- toolchain-funcs.eclass 2012-09-15 12:16:53.000000000 -0400
+++ toolchain-funcs.eclass 2012-09-14 12:33:55.000000000 -0400
@@ -357,6 +359,9 @@
local host=$2
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
+ local kv=${KV:-$KV_FULL}
+ [[ -z ${kv} ]] && die "toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info"
+
case ${host} in
aarch64*) ninj aarch64 arm;;
alpha*) echo alpha;;
@@ -369,7 +374,7 @@
# 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) || ${host} == *freebsd* ]] ; then
echo i386
else
echo x86
@@ -384,9 +389,9 @@
# 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" ]] && [[ $(KV_to_int ${kv}) -ge $(KV_to_int 2.6.16) ]] ; then
echo powerpc
- elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then
+ 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
@@ -413,7 +418,7 @@
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" ]] && [[ $(KV_to_int ${kv}) -ge $(KV_to_int 2.6.24) ]] ; then
echo x86
else
ninj x86_64 amd64
toolchain-funcs-fix.patch.sig
Description: PGP signature
