summaryrefslogtreecommitdiff
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
commitdb63f213e20ba6927b40d8cdad35adf40983a05c (patch)
treeafd48800fbbd873cc8860711a7900af461ef9386 /eclass/linux-info.eclass
parentAdd ~mips keyword (diff)
downloadhistorical-db63f213e20ba6927b40d8cdad35adf40983a05c.tar.gz
historical-db63f213e20ba6927b40d8cdad35adf40983a05c.tar.bz2
historical-db63f213e20ba6927b40d8cdad35adf40983a05c.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/linux-info.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
}