summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-29 19:57:51 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-29 19:57:51 +0000
commitae9d7e035924ec219fb0c9b7508bae399bfd2a85 (patch)
treeed4495dd53b248512e152a501d9c8bf9dd778763 /eclass
parentAdd ~mips keyword (diff)
downloadgentoo-2-ae9d7e035924ec219fb0c9b7508bae399bfd2a85.tar.gz
gentoo-2-ae9d7e035924ec219fb0c9b7508bae399bfd2a85.tar.bz2
gentoo-2-ae9d7e035924ec219fb0c9b7508bae399bfd2a85.zip
Fix build with stable release kernels when sources are not available.
Without this change, it will keep the '.y' value appended to KV_PATCH causing kernel_is function to fail. Closes bug #293395.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-info.eclass7
1 files changed, 3 insertions, 4 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index e9aca249f1cd..1bc376fb7f2f 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.87 2011/01/04 17:53:13 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.88 2011/03/29 19:57:51 flameeyes Exp $
#
# Original author: John Mylchreest <johnm@gentoo.org>
# Maintainer: kernel-misc@gentoo.org
@@ -598,10 +598,9 @@ get_running_version() {
else
KV_MAJOR=$(get_version_component_range 1 ${KV_FULL})
KV_MINOR=$(get_version_component_range 2 ${KV_FULL})
- KV_PATCH=$(get_version_component_range 3- ${KV_FULL})
+ KV_PATCH=$(get_version_component_range 3 ${KV_FULL})
KV_PATCH=${KV_PATCH//-*}
- [[ -n ${KV_FULL#*-} ]] && [[ -n ${KV_FULL//${KV_FULL#*-}} ]] \
- && KV_EXTRA="-${KV_FULL#*-}"
+ KV_EXTRA="${KV_FULL#${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}}"
fi
return 0
}