diff options
author | Jonathan Callen <jcallen@gentoo.org> | 2010-06-17 23:46:25 +0000 |
---|---|---|
committer | Jonathan Callen <jcallen@gentoo.org> | 2010-06-17 23:46:25 +0000 |
commit | 8827fafb1ef6acc3c736f1e37d1b85357678ba30 (patch) | |
tree | c44bcb1809a8de308609d4381c239eb1582ed5ff /eclass | |
parent | The ACPI battery test must not be fatal if kernel sources are not present to ... (diff) | |
download | historical-8827fafb1ef6acc3c736f1e37d1b85357678ba30.tar.gz historical-8827fafb1ef6acc3c736f1e37d1b85357678ba30.tar.bz2 historical-8827fafb1ef6acc3c736f1e37d1b85357678ba30.zip |
Add better support for finding out-of-tree builds when searching in /lib/modules
Diffstat (limited to '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 |