summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Pagano <mpagano@gentoo.org>2015-02-27 23:44:41 +0000
committerMike Pagano <mpagano@gentoo.org>2015-02-27 23:44:41 +0000
commit890bdf6c399b0daa9f846daa5eea4c80c7beb264 (patch)
treec11a6719a2c08d9a4e4c2e36237eb4fdc70e3b95 /eclass
parentVersion bump (diff)
downloadgentoo-2-890bdf6c399b0daa9f846daa5eea4c80c7beb264.tar.gz
gentoo-2-890bdf6c399b0daa9f846daa5eea4c80c7beb264.tar.bz2
gentoo-2-890bdf6c399b0daa9f846daa5eea4c80c7beb264.zip
Cleanup how we determine base linux tarball.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/kernel-2.eclass27
2 files changed, 12 insertions, 20 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 8edd56adaacd..3977ec350181 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1556 2015/02/26 20:41:10 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1557 2015/02/27 23:44:41 mpagano Exp $
+
+ 27 Feb 2015; Mike Pagano <mpagano@gentoo.org> kernel-2.eclass:
+ Cleanup how we determine base linux tarball.
26 Feb 2015; Ian Stakenvicius (_AxS_) <axs@gentoo.org>
mozconfig-v5.31.eclass, +mozconfig-v5.36.eclass:
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index e0bd195efbdb..4a0e0a6d0b6e 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.299 2015/02/23 12:42:40 mpagano Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.300 2015/02/27 23:44:41 mpagano Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -371,15 +371,12 @@ detect_version() {
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.xz"
fi
else
+ KV_PATCH_ARR=(${KV_PATCH//\./ })
+
+ # the different majorminor versions have different patch start versions
+ OKV_DICT=(["2"]="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" ["3"]="2.6.39" ["4"]="3.19")
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
- if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
- OKV="2.6.39"
- elif [[ ${KV_MAJOR}${KV_PATCH} -eq 40 ]]; then
- OKV="3.19"
- else
- KV_PATCH_ARR=(${KV_PATCH//\./ })
- OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
- fi
+ OKV=${OKV_DICT["${KV_MAJOR}"]}
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz"
@@ -392,14 +389,7 @@ detect_version() {
fi
if [[ ${RELEASETYPE} == -rc-git ]]; then
- if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
- OKV="2.6.39"
- elif [[ ${KV_MAJOR}${KV_PATCH} -eq 40 ]]; then
- OKV="2.19"
- else
- KV_PATCH_ARR=(${KV_PATCH//\./ })
- OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
- fi
+ OKV=${OKV_DICT["${KV_MAJOR}"]}
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz
${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
@@ -409,8 +399,7 @@ detect_version() {
fi
-
-
+
debug-print-kernel2-variables
handle_genpatches