Add kernel-2 env var K_BASE_VER as different versions of git sources use different...
authorMike Pagano <mpagano@gentoo.org>
Wed, 29 Apr 2015 00:07:30 +0000 (00:07 +0000)
committerMike Pagano <mpagano@gentoo.org>
Wed, 29 Apr 2015 00:07:30 +0000 (00:07 +0000)
eclass/ChangeLog
eclass/kernel-2.eclass

index 94703d61c79943b04d932813cc36158656bc70cf..5175d5a09d065e36bb92bf3130d40af5a8552a1d 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1597 2015/04/28 20:35:40 chewi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1598 2015/04/29 00:07:30 mpagano Exp $
+
+  29 Apr 2015; Mike Pagano <mpagano@gentoo.org> kernel-2.eclass:
+  Add kernel-2 env var K_BASE_VER as different versions of git sources use
+  different base versions.
 
   28 Apr 2015; James Le Cuirot <chewi@gentoo.org> java-pkg-2.eclass,
   java-utils-2.eclass, ant-tasks.eclass:
index 7901a29d829af6136fc77bd4d282c1a40991e10b..10df8cd01710f4fa8438a1d8b2430ad7967a66a1 100644 (file)
@@ -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.302 2015/04/27 18:59:42 mpagano Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.303 2015/04/29 00:07:30 mpagano Exp $
 
 # Description: kernel.eclass rewrite for a clean base regarding the 2.6
 #              series of kernel with back-compatibility for 2.4
@@ -37,6 +37,8 @@
 # K_EXTRAEWARN                 - same as K_EXTRAEINFO except using ewarn instead of einfo
 # K_SYMLINK                            - if this is set, then forcably create symlink anyway
 #
+# K_BASE_VER                   - for git-sources, declare the base version this patch is 
+#                                                based off of.
 # K_DEFCONFIG                  - Allow specifying a different defconfig target.
 #                                                If length zero, defaults to "defconfig".
 # K_WANT_GENPATCHES            - Apply genpatches to kernel source. Provide any
@@ -363,14 +365,10 @@ detect_version() {
                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" ["41"] = "4.0")
+               OKV_DICT=(["2"]="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" ["3"]="2.6.39" ["4"]="3.19")
+
                if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
-                       OKV=${OKV_DICT["${KV_MAJOR}"]}
-                       if [[ ${KV_MAJOR} -ge 4 ]]  && [[ ${KV_PATCH_ARR} -ge 1 ]]; then
-                               OKV=${OKV_DICT["${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"]}
-                       else
-                               OKV=${OKV_DICT["${KV_MAJOR}"]}
-                       fi
+                       OKV=${K_BASE_VER:-$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"
@@ -383,7 +381,7 @@ detect_version() {
                fi
 
                if [[ ${RELEASETYPE} == -rc-git ]]; then
-                       OKV=${OKV_DICT["${KV_MAJOR}"]}
+                       OKV=${K_BASE_VER:-$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"