From e59bc5af19d1af2c4ae2f7ba73594e8defeacaa1 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 24 Aug 2017 18:52:14 -0700 Subject: [PATCH] eclass: fixes for kernel -rc releases Gentoo versioning requires a version like 4.13_rc6, but coreos-sources unpacks to a directory named 4.13-rc6-coreos. Fix up source directory and defconfig searches. --- .../third_party/coreos-overlay/eclass/coreos-kernel.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass index a6d5542081..2703345e0c 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass @@ -8,7 +8,7 @@ : ${COREOS_SOURCE_REVISION:=} COREOS_SOURCE_VERSION="${PV}${COREOS_SOURCE_REVISION}" -COREOS_SOURCE_NAME="linux-${PV}-coreos${COREOS_SOURCE_REVISION}" +COREOS_SOURCE_NAME="linux-${PV/_rc/-rc}-coreos${COREOS_SOURCE_REVISION}" [[ ${EAPI} != "5" ]] && die "Only EAPI=5 is supported" @@ -40,11 +40,12 @@ KERNEL_DIR="${SYSROOT}/usr/src/${COREOS_SOURCE_NAME}" # - amd64_defconfig-3.12.4 # - amd64_defconfig-3.12 # - amd64_defconfig +# and similarly for _rcN releases. # The first matching config is used, die otherwise. find_config() { local base_path="${FILESDIR}/${1}" local try_suffix try_path - for try_suffix in "-${PVR}" "-${PV}" "-${PV%.*}" ""; do + for try_suffix in "-${PVR}" "-${PV}" "-${PV%[._]*}" ""; do try_path="${base_path}${try_suffix}" if [[ -f "${try_path}" ]]; then echo "${try_path}"