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 ECD37138336 for ; Tue, 26 Mar 2019 08:07:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5397E0864; Tue, 26 Mar 2019 08:07:16 +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 9307FE0864 for ; Tue, 26 Mar 2019 08:07:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 01DD0335CDE for ; Tue, 26 Mar 2019 08:07:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4B2D5520 for ; Tue, 26 Mar 2019 08:07:13 +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: <1553577938.8cee82adefe53c37caaa89ee40b5f716f1575570.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_configkernel.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 8cee82adefe53c37caaa89ee40b5f716f1575570 X-VCS-Branch: master Date: Tue, 26 Mar 2019 08:07:13 +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: 0d7a6216-d26b-40f4-a46c-b032389b6ca4 X-Archives-Hash: f105144a52132629a9f305c272a6aadf commit: 8cee82adefe53c37caaa89ee40b5f716f1575570 Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Mar 25 22:12:06 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Mar 26 05:25:38 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8cee82ad config_kernel(): don't run 'make clean' when we will also run 'make mrproper' Signed-off-by: Thomas Deutschmann gentoo.org> gen_configkernel.sh | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 3b27f6c..b115344 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -38,39 +38,55 @@ config_kernel() { determine_config_file cd "${KERNEL_DIR}" || gen_die 'Could not switch to the kernel directory!' + print_info 1 "kernel: >> Initializing..." + + if isTrue "${CLEAN}" && isTrue "${MRPROPER}" + then + print_info 1 "$(getIndent 1)>> Skipping 'make clean' -- will run 'make mrproper' later" + elif isTrue "${CLEAN}" && ! isTrue "${MRPROPER}" + then + print_info 1 "$(getIndent 1)>> Cleaning..." + compile_generic clean kernel + else + print_info 1 "$(getIndent 1)>> --clean is disabled; not running 'make clean'." + fi + if isTrue "${MRPROPER}" then # Backup current kernel .config if [ -f "${KERNEL_OUTPUTDIR}/.config" ] then # Current .config is different then one we are going to use - if ! diff -q "${KERNEL_OUTPUTDIR}"/.config ${KERNEL_CONFIG} + if ! diff -q "${KERNEL_OUTPUTDIR}"/.config "${KERNEL_CONFIG}" > /dev/null then NOW=`date +--%Y-%m-%d--%H-%M-%S` cp "${KERNEL_OUTPUTDIR}/.config" "${KERNEL_OUTPUTDIR}/.config${NOW}.bak" \ || gen_die "Could not backup kernel config (${KERNEL_OUTPUTDIR}/.config)" - print_info 1 "$(getIndent 1)Previous config backed up to .config${NOW}.bak" + print_info 1 "$(getIndent 1)>> Previous config backed up to .config${NOW}.bak" fi fi - print_info 1 "kernel: Using config from ${KERNEL_CONFIG}" + print_info 1 "$(getIndent 1)>> Running mrproper..." compile_generic mrproper kernel else if [ -f "${KERNEL_OUTPUTDIR}/.config" ] then - print_info 1 "kernel: Using config from ${KERNEL_OUTPUTDIR}/.config" + print_info 1 "$(getIndent 1)>> Using config from ${KERNEL_OUTPUTDIR}/.config" else - print_info 1 "kernel: Using config from ${KERNEL_CONFIG}" + print_info 1 "$(getIndent 1)>> Using config from ${KERNEL_CONFIG}" fi - print_info 1 "kernel: --mrproper is disabled; not running 'make mrproper'." + print_info 1 "$(getIndent 1)>> --mrproper is disabled; not running 'make mrproper'." fi # If we're not cleaning a la mrproper, then we don't want to try to overwrite the configs # or we might remove configurations someone is trying to test. if isTrue "${MRPROPER}" || [ ! -f "${KERNEL_OUTPUTDIR}/.config" ] then + print_info 1 "$(getIndent 1)>> Using config from ${KERNEL_CONFIG}" + local message='Could not copy configuration file!' - if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then + if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]] + then # Support --kernel-config=/proc/config.gz, mainly zcat "${KERNEL_CONFIG}" > "${KERNEL_OUTPUTDIR}/.config" || gen_die "${message}" else @@ -83,14 +99,7 @@ config_kernel() { print_info 1 "$(getIndent 1)>> Running oldconfig..." yes '' 2>/dev/null | compile_generic oldconfig kernel 2>/dev/null else - print_info 1 "$(getIndent 1)--oldconfig is disabled; not running 'make oldconfig'." - fi - if isTrue "${CLEAN}" - then - print_info 1 "$(getIndent 1)>> Cleaning..." - compile_generic clean kernel - else - print_info 1 "$(getIndent 1)--clean is disabled; not running 'make clean'." + print_info 1 "$(getIndent 1)>> --oldconfig is disabled; not running 'make oldconfig'." fi local add_config