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 02DB8139085 for ; Mon, 2 Jan 2017 23:08:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B3EDE0C6E; Mon, 2 Jan 2017 23:08:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2708CE0C6E for ; Mon, 2 Jan 2017 23:08:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 21C5A341016 for ; Mon, 2 Jan 2017 23:08:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 81AF62521 for ; Mon, 2 Jan 2017 23:08:50 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1483398509.8de563ba9df1c81c23a8daccc7c69f45b31cb518.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_cmdline.sh gen_configkernel.sh gen_determineargs.sh genkernel.conf X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 8de563ba9df1c81c23a8daccc7c69f45b31cb518 X-VCS-Branch: master Date: Mon, 2 Jan 2017 23:08:50 +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-Archives-Salt: af724173-79c4-47b0-86a1-b14f8f732d58 X-Archives-Hash: 29294466863e7c3298990e4f51b1dde4 commit: 8de563ba9df1c81c23a8daccc7c69f45b31cb518 Author: Vadim A. Misbakh-Soloviov (mva) mva name> AuthorDate: Mon Jan 2 23:08:07 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon Jan 2 23:08:29 2017 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8de563ba Implement kernel nconfig just like menuconfig. Signed-off-by: Robin H. Johnson gentoo.org> gen_cmdline.sh | 19 +++++++++++++++++++ gen_configkernel.sh | 5 +++++ gen_determineargs.sh | 1 + genkernel.conf | 6 ++++++ 4 files changed, 31 insertions(+) diff --git a/gen_cmdline.sh b/gen_cmdline.sh index f4392f9..0e1e7ef 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -27,6 +27,8 @@ longusage() { echo " Kernel Configuration settings" echo " --menuconfig Run menuconfig after oldconfig" echo " --no-menuconfig Do not run menuconfig after oldconfig" + echo " --nconfig Run nconfig after oldconfig" + echo " --no-nconfig Do not run nconfig after oldconfig" echo " --gconfig Run gconfig after oldconfig" echo " --no-gconfig Don't run gconfig after oldconfig" echo " --xconfig Run xconfig after oldconfig" @@ -185,6 +187,7 @@ usage() { echo echo 'Some useful options:' echo ' --menuconfig Run menuconfig after oldconfig' + echo ' --nconfig Run nconfig after oldconfig (requires ncurses)' echo ' --no-clean Do not run make clean before compilation' echo ' --no-mrproper Do not run make mrproper before compilation,' echo ' this is implied by --no-clean.' @@ -411,6 +414,22 @@ parse_cmdline() { CMD_MENUCONFIG=0 print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}" ;; + --nconfig) + TERM_LINES=`stty -a | head -n 1 | cut -d\ -f5 | cut -d\; -f1` + TERM_COLUMNS=`stty -a | head -n 1 | cut -d\ -f7 | cut -d\; -f1` + if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]] + then + echo "Error: You need a terminal with at least 80 columns" + echo " and 19 lines for --nconfig; try --no-nconfig..." + exit 1 + fi + CMD_NCONFIG=1 + print_info 2 "CMD_NCONFIG: ${CMD_NCONFIG}" + ;; + --no-nconfig) + CMD_NCONFIG=0 + print_info 2 "CMD_NCONFIG: ${CMD_NCONFIG}" + ;; --gconfig|--no-gconfig) CMD_GCONFIG=`parse_optbool "$*"` print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}" diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 74693f3..6ca0200 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -90,6 +90,11 @@ config_kernel() { print_info 1 'kernel: >> Invoking menuconfig...' compile_generic menuconfig kernelruntask [ "$?" ] || gen_die 'Error: menuconfig failed!' + elif isTrue ${NCONFIG} + then + print_info 1 'kernel: >> Invoking nconfig...' + compile_generic nconfig kernelruntask + [ "$?" ] || gen_die 'Error: nconfig failed!' elif isTrue ${CMD_GCONFIG} then print_info 1 'kernel: >> Invoking gconfig...' diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 2dbd958..313dbd0 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -98,6 +98,7 @@ determine_real_args() { set_config_with_override BOOL POSTCLEAR CMD_POSTCLEAR set_config_with_override BOOL MRPROPER CMD_MRPROPER set_config_with_override BOOL MENUCONFIG CMD_MENUCONFIG + set_config_with_override BOOL NCONFIG CMD_NCONFIG set_config_with_override BOOL CLEAN CMD_CLEAN set_config_with_override STRING MINKERNPACKAGE CMD_MINKERNPACKAGE diff --git a/genkernel.conf b/genkernel.conf index e62d294..7e5a46f 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -17,6 +17,12 @@ OLDCONFIG="yes" # Run 'make menuconfig' before compiling this kernel? MENUCONFIG="no" +# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel? +NCONFIG="no" + +# Note, that two previous lines are mutual exclusive (logically), while +# MENUCONFIG has a higher priority if both them is enabled. + # Run 'make clean' before compilation? # If set to NO, implies MRPROPER WILL NOT be run # Also, if clean is NO, it won't copy over any configuration