kernel-2.eclass: Support new location and file type for git sources >= 4.12
authorMike Pagano <mpagano@gentoo.org>
Thu, 18 May 2017 21:58:24 +0000 (17:58 -0400)
committerMike Pagano <mpagano@gentoo.org>
Thu, 18 May 2017 21:59:18 +0000 (17:59 -0400)
eclass/kernel-2.eclass

index db4a3bf7204810344866a03cc6928cc0912d4de1..c6ce28d45a57e177ea2fe1391ad5897156e55f39 100644 (file)
@@ -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