From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1102943-garchives=archives.gentoo.org@lists.gentoo.org>
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 8455F138334
	for <garchives@archives.gentoo.org>; Mon, 29 Jul 2019 20:10:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B8FD3E0833;
	Mon, 29 Jul 2019 20:10:27 +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 8C99AE082D
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:27 +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 76B7B348F79
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:25 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D35EF6FF
	for <gentoo-commits@lists.gentoo.org>; Mon, 29 Jul 2019 20:10:23 +0000 (UTC)
From: "Thomas Deutschmann" <whissi@gentoo.org>
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" <whissi@gentoo.org>
Message-ID: <1564348779.9418b9d65972045d2087b24b214bad1ecc8ab197.whissi@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: /
X-VCS-Repository: proj/genkernel
X-VCS-Files: gen_package.sh genkernel
X-VCS-Directories: /
X-VCS-Committer: whissi
X-VCS-Committer-Name: Thomas Deutschmann
X-VCS-Revision: 9418b9d65972045d2087b24b214bad1ecc8ab197
X-VCS-Branch: master
Date: Mon, 29 Jul 2019 20:10:23 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 1f4401dc-c359-444f-a45d-c8d8c565ef7c
X-Archives-Hash: 93b83fbc8e78b6ff486f8922c8819ad3

commit:     9418b9d65972045d2087b24b214bad1ecc8ab197
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 21:30:15 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 28 21:19:39 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9418b9d6

genkernel: Normalize output

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_package.sh |  8 ++++++--
 genkernel      | 23 +++++++++++++++++------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/gen_package.sh b/gen_package.sh
index 4a1ca43..0240b80 100755
--- a/gen_package.sh
+++ b/gen_package.sh
@@ -174,6 +174,7 @@ gen_kerncache() {
 }
 
 gen_kerncache_extract_kernel() {
+	print_info 1 "Extracting kerncache kernel from '${KERNCACHE}' ..."
 	"${TAR_COMMAND}" -xf "${KERNCACHE}" -C "${TEMP}" \
 		|| gen_die "Failed to extract '${KERNCACHE}' to '${TEMP}'!"
 
@@ -238,6 +239,7 @@ gen_kerncache_is_valid() {
 
 			if [ -e "${TEMP}/config-${ARCH}-${KV}" -a -e "${TEMP}/kernel-${ARCH}-${KV}" ]
 			then
+				print_info 1 '' 1 0
 				print_info 1 'Valid kerncache found; No sources will be used ...'
 				KERNCACHE_IS_VALID="yes"
 			fi
@@ -262,9 +264,11 @@ gen_kerncache_is_valid() {
 
 				if [[ "${test1}" == "${test2}" ]]
 				then
+					print_info 1 '' 1 0
 					print_info 1 "Valid kerncache '${KERNCACHE}' found; Will skip kernel build step ..."
 					KERNCACHE_IS_VALID="yes"
 				else
+					print_info 1 '' 1 0
 					print_info 1 "Kerncache kernel config differs from '${KERNEL_CONFIG}'; Ignoring outdated kerncache '${KERNCACHE}' ..."
 				fi
 			else
@@ -274,14 +278,14 @@ gen_kerncache_is_valid() {
 					invalid_reason="Kernel config '${KERNEL_CONFIG}' does not exist -- cannot validate kerncache"
 				fi
 
+				print_info 1 '' 1 0
 				print_info 1 "${invalid_reason}; Ignorning kerncache '${KERNCACHE}' ..."
 			fi
 		fi
 	else
+		print_warning 1 '' 1 0
 		print_warning 1 "Kerncache '${KERNCACHE}' does not exist (yet?); Ignoring ..."
 	fi
 
-	echo
-
 	export KERNCACHE_IS_VALID
 }

diff --git a/genkernel b/genkernel
index 58d4cf3..34de18f 100755
--- a/genkernel
+++ b/genkernel
@@ -103,7 +103,6 @@ NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}"
 print_info 1 "Using genkernel configuration from '${_GENKERNEL_CONF}' ..."
 unset _GENKERNEL_CONF
 print_info 1 "Running with options: ${GK_OPTIONS}"
-print_info 1 '' 1 0
 
 # Save any customizations of MODULES_* first.
 override_module_vars="$(compgen -A variable |grep '^MODULES_')"
@@ -118,6 +117,7 @@ determine_real_args
 
 if isTrue "${BUILD_RAMDISK}" && ! isTrue "${SANDBOX}"
 then
+	print_warning 1 '' 1 0
 	print_warning 1 "${BOLD}WARNING:${NORMAL} Will build initramfs ${BOLD}without${NORMAL} sandbox support " 0
 
 	SANDBOX_WARNING_TIMER=0
@@ -129,9 +129,9 @@ then
 	done
 
 	print_warning 1 '' 1 0
-	print_warning 1 '' 1 0
 fi
 
+print_info 2 '' 1 0
 print_info 2 "Sourcing default modules_load from '${GK_SHARE}/defaults/modules_load' ..."
 source "${GK_SHARE}/defaults/modules_load" || gen_die "Could not read '${GK_SHARE}/defaults/modules_load'!"
 
@@ -186,6 +186,7 @@ then
 	gen_kerncache_is_valid
 fi
 
+print_info 1 '' 1 0
 print_info 1 "Working with Linux kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}"
 print_info 1 "Using kernel config file '${KERNEL_CONFIG}' ..."
 
@@ -255,8 +256,13 @@ fi
 
 if isTrue "${KERNCACHE_IS_VALID}"
 then
+	if ! isTrue "${BUILD_STATIC}"
+	then
+		print_info 1 '' 1 0
+		gen_kerncache_extract_modules
+	fi
+
 	print_info 1 '' 1 0
-	! isTrue "${BUILD_STATIC}" && gen_kerncache_extract_modules
 	gen_kerncache_extract_config
 fi
 
@@ -328,11 +334,16 @@ then
 	fi
 fi
 
-if [ -n "${MINKERNPACKAGE}" -o -n "${MODULESPACKAGE}" ]
+if [ -n "${MINKERNPACKAGE}" ]
+then
+	print_info 1 '' 1 0
+	gen_minkernpackage
+fi
+
+if [ -n "${MODULESPACKAGE}" ]
 then
 	print_info 1 '' 1 0
-	[ -n "${MINKERNPACKAGE}" ] && gen_minkernpackage
-	[ -n "${MODULESPACKAGE}" ] && gen_modulespackage
+	gen_modulespackage
 fi
 
 if isTrue "${BUILD_KERNEL}"