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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B15BE138334 for ; Thu, 28 Mar 2019 23:43:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 79520E0AD3; Thu, 28 Mar 2019 23:43:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39348E0AD3 for ; Thu, 28 Mar 2019 23:43:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 02985335D13 for ; Thu, 28 Mar 2019 23:43:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1B31589 for ; Thu, 28 Mar 2019 23:43:12 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1553805437.3abb33bf0e12e38f453e262392572b0c6d47ea7c.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: genkernel X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 3abb33bf0e12e38f453e262392572b0c6d47ea7c X-VCS-Branch: master Date: Thu, 28 Mar 2019 23:43:12 +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: e0cfb103-e114-4eef-ba86-f48102a7aebb X-Archives-Hash: d1cdcef179a7d8b5f52497755b3c0ebf commit: 3abb33bf0e12e38f453e262392572b0c6d47ea7c Author: Thomas Deutschmann gentoo org> AuthorDate: Thu Mar 28 20:37:17 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Thu Mar 28 20:37:17 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3abb33bf genkernel: tell user that shown kernel version is subject to change When you start with fresh (unused) kernel sources, we will get Kernel Version from KERNEL_DIR. If you already have compiled that KV, genkernel maybe use your existing configuration from /etc/kernels (depends on other settings like --mrproper). Once your new kernel was built and you are saving configs (--save-config), we will save the used configuration in /etc/kernels/kernel-config-${ARCH}-${KV}. If you used --menuconfig during genkernel run to change kernel options like CONFIG_LOCALVERSION or CONFIG_LOCALVERSION_AUTO or have modified kernel's Makefile manually to change version, KV is subject to change once genkernel has called 'make prepare'. With this change we will tell user when KV has changed to end confusion like shown in bug 521778. Closes: https://bugs.gentoo.org/521778 Closes: https://bugs.gentoo.org/352787 Closes: https://bugs.gentoo.org/263927 Signed-off-by: Thomas Deutschmann gentoo.org> genkernel | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/genkernel b/genkernel index 44c34ba..65b7820 100755 --- a/genkernel +++ b/genkernel @@ -158,9 +158,23 @@ check_distfiles dump_debugcache +KERNCACHE_IS_VALID="no" +if [ "${KERNCACHE}" != "" ] +then + gen_kerncache_is_valid +fi + NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." print_info 1 ".. with config file ${KERNEL_CONFIG}" +if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}" +then + print_info 1 "" + print_info 1 "Note: The version above is subject to change (depends on config and status of kernel sources)." + print_info 1 "" +fi + + # Check if BOOTDIR is mounted if ! isTrue "${CMD_INSTALL}" then @@ -203,12 +217,6 @@ else fi fi -KERNCACHE_IS_VALID="no" -if [ "${KERNCACHE}" != "" ] -then - gen_kerncache_is_valid -fi - if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}" then # Configure kernel @@ -224,6 +232,14 @@ then # KV may have changed due to the configuration get_KV + if [ -f "${TEMP}/.old_kv" ] + then + old_KV=$(cat "${TEMP}/.old_kv") + print_info 1 "Kernel version has changed (probably due to config change) since genkernel start:" + print_info 1 "We are now building Linux kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..." + else + print_info 2 "Kernel version has not changed since genkernel start." + fi compile_kernel