From: Mike Pagano Date: Thu, 18 May 2017 21:58:24 +0000 (-0400) Subject: kernel-2.eclass: Support new location and file type for git sources >= 4.12 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=020282b76c3d1aa3c203eb5fe3a77c102f03761a;p=gentoo.git kernel-2.eclass: Support new location and file type for git sources >= 4.12 --- diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index db4a3bf72048..c6ce28d45a57 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