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 F2B2D138335 for ; Thu, 28 Mar 2019 23:43:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 072C6E0AA7; Thu, 28 Mar 2019 23:43:16 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 D086CE097A for ; Thu, 28 Mar 2019 23:43:15 +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 104D4335CED for ; Thu, 28 Mar 2019 23:43:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F3E957D 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: <1553802058.b3520bca9d33183c173a402af0bd3040a7240959.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: b3520bca9d33183c173a402af0bd3040a7240959 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: a44dd67f-6cfd-4347-88dc-6eecbe8cd294 X-Archives-Hash: 7f54767269e28b91d7cb180927e2774f commit: b3520bca9d33183c173a402af0bd3040a7240959 Author: Thomas Deutschmann gentoo org> AuthorDate: Thu Mar 28 19:40:58 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Thu Mar 28 19:40:58 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=b3520bca determine_config_file(): add some verbose output ...to understand what is happening and why. Signed-off-by: Thomas Deutschmann gentoo.org> gen_configkernel.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 582d71f..b7fa63e 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -3,6 +3,7 @@ # Fills variable KERNEL_CONFIG determine_config_file() { + print_info 2 "Checking for suitable kernel configuration..." for f in \ "${CMD_KERNEL_CONFIG}" \ "/etc/kernels/kernel-config-${ARCH}-${KV}" \ @@ -10,19 +11,26 @@ determine_config_file() { "${GK_SHARE}/arch/${ARCH}/kernel-config-${VER}.${PAT}" \ "${GK_SHARE}/arch/${ARCH}/generated-config" \ "${GK_SHARE}/arch/${ARCH}/kernel-config" \ - "${DEFAULT_KERNEL_CONFIG}" \ - ; do - if [ -n "${f}" -a -f "${f}" ] + "${DEFAULT_KERNEL_CONFIG}" + do + [ -z "${f}" ] && continue + + if [ -f "${f}" ] then - if ! grep -sq THIS_CONFIG_IS_BROKEN "$f" + if grep -sq THIS_CONFIG_IS_BROKEN "$f" then + print_info 2 "$(getIndent 1)- '${f}' is marked as broken; Skipping..." + else KERNEL_CONFIG="$f" && break fi + else + print_info 2 "$(getIndent 1)- '${f}' not found; Skipping..." fi done + if [ -z "${KERNEL_CONFIG}" ] then - gen_die 'Error: No kernel .config specified, or file not found!' + gen_die 'No kernel .config specified, or file not found!' fi KERNEL_CONFIG="$(readlink -f "${KERNEL_CONFIG}")" @@ -30,7 +38,7 @@ determine_config_file() { # Validate the symlink result if any if [ ! -f "${KERNEL_CONFIG}" ] then - gen_die "Error: No kernel .config: symlinked file not found! ($KERNEL_CONFIG)" + gen_die "No kernel .config: symlinked file '$KERNEL_CONFIG' not found!" fi }