commit:     020282b76c3d1aa3c203eb5fe3a77c102f03761a
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu May 18 21:58:24 2017 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu May 18 21:59:18 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=020282b7

kernel-2.eclass: Support new location and file type for git sources >= 4.12

 eclass/kernel-2.eclass | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index db4a3bf7204..c6ce28d45a5 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -506,10 +506,20 @@ detect_version() {
                OKV_DICT=(["2"]="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" 
["3"]="2.6.39" ["4"]="3.19")
 
                if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; 
then
+
                        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"
+
+                       # as of 12/5/2017, the rc patch is no longer offered as 
a compressed
+                       # file, and no longer is it mirrored on kernel.org
+                       if [[ ${KV_MAJOR} -ge 4 ]] && [[ ${KV_PATCH} -ge 12 ]]; 
then
+                               
KERNEL_URI="https://git.kernel.org/torvalds/p/v4.12-rc1/v4.11 -> patch-4.12-rc1
+                                                       
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
+                               
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}"
+                       else
+                               
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz
+                                                       
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
+                               
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz"
+                       fi
                fi
 
                if [[ ${RELEASETYPE} == -git ]]; then

Reply via email to