diff options
author | Jonathan Callen <abcd@gentoo.org> | 2010-06-17 23:46:25 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2010-06-17 23:46:25 +0000 |
commit | e6d926e8701f427ccab411f1079305896a5450a1 (patch) | |
tree | 0526339d72a617eac7eb21f827a297428049b34d /eclass/linux-info.eclass | |
parent | The ACPI battery test must not be fatal if kernel sources are not present to ... (diff) | |
download | gentoo-2-e6d926e8701f427ccab411f1079305896a5450a1.tar.gz gentoo-2-e6d926e8701f427ccab411f1079305896a5450a1.tar.bz2 gentoo-2-e6d926e8701f427ccab411f1079305896a5450a1.zip |
Add better support for finding out-of-tree builds when searching in /lib/modules
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r-- | eclass/linux-info.eclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index 8733addd0698..8e0e8ab41be9 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.83 2010/01/17 21:46:55 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.84 2010/06/17 23:46:25 abcd Exp $ # # Original author: John Mylchreest <johnm@gentoo.org> # Maintainer: kernel-misc@gentoo.org @@ -568,7 +568,13 @@ get_version() { get_running_version() { KV_FULL=$(uname -r) - if [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile ]]; then + if [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile && -f ${ROOT}/lib/modules/${KV_FULL}/build/Makefile ]]; then + KERNEL_DIR=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/source) + KBUILD_OUTPUT=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/build) + unset KV_FULL + get_version + return $? + elif [[ -f ${ROOT}/lib/modules/${KV_FULL}/source/Makefile ]]; then KERNEL_DIR=$(readlink -f ${ROOT}/lib/modules/${KV_FULL}/source) unset KV_FULL get_version |