From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1F149158021 for ; Sat, 29 Oct 2022 15:31:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B5F0C2BC004; Sat, 29 Oct 2022 15:31:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 99913E08FF for ; Sat, 29 Oct 2022 15:31:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B63773411C0 for ; Sat, 29 Oct 2022 15:31:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A6E76FF for ; Sat, 29 Oct 2022 15:31:10 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1667057459.dd389667e008aaab6fd079f8114ae4f3810c35d0.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/kernel-install.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: dd389667e008aaab6fd079f8114ae4f3810c35d0 X-VCS-Branch: master Date: Sat, 29 Oct 2022 15:31:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a338d959-a465-4163-881d-dc181b4bc222 X-Archives-Hash: 0546e7f37259a54d8d3678e686a42bde commit: dd389667e008aaab6fd079f8114ae4f3810c35d0 Author: Michał Górny gentoo org> AuthorDate: Tue Oct 25 16:02:04 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Oct 29 15:30:59 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd389667 kernel-install.eclass: Revert "Add KV_FULL [...]" Reverts: 55a495ad71b0ce1620488f389baddeebc787ee64 Signed-off-by: Michał Górny gentoo.org> eclass/kernel-install.eclass | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index 06260ed61f23..dc77cb514b1a 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -14,13 +14,20 @@ # kinds of Distribution Kernel packages, including both kernels built # from source and distributed as binaries. The eclass relies on the # ebuild installing a subset of built kernel tree into -# /usr/src/linux-${KV_FULL}${KV_LOCALVERSION} containing the kernel -# image in its standard location and System.map. +# /usr/src/linux-${PV} containing the kernel image in its standard +# location and System.map. # # The eclass exports src_test, pkg_postinst and pkg_postrm. # Additionally, the inherited mount-boot eclass exports pkg_pretend. # It also stubs out pkg_preinst and pkg_prerm defined by mount-boot. +# @ECLASS_VARIABLE: KV_LOCALVERSION +# @DEFAULT_UNSET +# @DESCRIPTION: +# A string containing the kernel LOCALVERSION, e.g. '-gentoo'. +# Needs to be set only when installing binary kernels, +# kernel-build.eclass obtains it from kernel config. + if [[ ! ${_KERNEL_INSTALL_ECLASS} ]]; then case ${EAPI} in @@ -30,19 +37,6 @@ esac inherit dist-kernel-utils mount-boot toolchain-funcs -# @ECLASS_VARIABLE: KV_FULL -# @DESCRIPTION: -# The "x.y.z[-rcN]" kernel version. The default is derived from PV -# following upstream kernel versioning rules. -: "${KV_FULL:=$(dist-kernel_PV_to_KV "${PV}")}" - -# @ECLASS_VARIABLE: KV_LOCALVERSION -# @DEFAULT_UNSET -# @DESCRIPTION: -# A string containing the kernel LOCALVERSION, e.g. '-gentoo'. -# Needs to be set only when installing binary kernels, -# kernel-build.eclass obtains it from kernel config. - SLOT="${PV}" IUSE="+initramfs test" RESTRICT+=" @@ -409,18 +403,18 @@ kernel-install_src_test() { kernel-install_pkg_preinst() { debug-print-function ${FUNCNAME} "${@}" - local ver="${KV_FULL}${KV_LOCALVERSION}" + local ver="${PV}${KV_LOCALVERSION}" local kdir="${ED}/usr/src/linux-${ver}" local relfile="${kdir}/include/config/kernel.release" [[ ! -d ${kdir} ]] && die "Kernel directory ${kdir} not installed!" [[ ! -f ${relfile} ]] && die "Release file ${relfile} not installed!" local release="$(<"${relfile}")" - if [[ ${release} != ${KV_FULL}* ]]; then + if [[ ${release} != ${PV}* ]]; then eerror "Kernel release mismatch!" - eerror " expected (KV_FULL): ${KV_FULL}*" - eerror " found: ${release}" + eerror " expected (PV): ${PV}*" + eerror " found: ${release}" eerror "Please verify that you are applying the correct patches." - die "Kernel release mismatch (${release} instead of ${KV_FULL}*)" + die "Kernel release mismatch (${release} instead of ${PV}*)" fi if [[ -L ${EROOT}/lib && ${EROOT}/lib -ef ${EROOT}/usr/lib ]]; then # Adjust symlinks for merged-usr. @@ -482,7 +476,7 @@ kernel-install_install_all() { kernel-install_pkg_postinst() { debug-print-function ${FUNCNAME} "${@}" - local ver="${KV_FULL}${KV_LOCALVERSION}" + local ver="${PV}${KV_LOCALVERSION}" kernel-install_update_symlink "${EROOT}/usr/src/linux" "${ver}" if [[ -z ${ROOT} ]]; then @@ -506,7 +500,7 @@ kernel-install_pkg_postrm() { debug-print-function ${FUNCNAME} "${@}" if [[ -z ${ROOT} ]] && use initramfs; then - local ver="${KV_FULL}${KV_LOCALVERSION}" + local ver="${PV}${KV_LOCALVERSION}" local image_path=$(dist-kernel_get_image_path) ebegin "Removing initramfs" rm -f "${EROOT}/usr/src/linux-${ver}/${image_path%/*}"/initrd{,.uefi} && @@ -521,7 +515,7 @@ kernel-install_pkg_postrm() { kernel-install_pkg_config() { [[ -z ${ROOT} ]] || die "ROOT!=/ not supported currently" - kernel-install_install_all "${KV_FULL}${KV_LOCALVERSION}" + kernel-install_install_all "${PV}${KV_LOCALVERSION}" } _KERNEL_INSTALL_ECLASS=1