commit: 343d6ed90d4b62c53443abfac20d701a998ea0d5
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 18 00:34:30 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 00:34:30 2019 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=343d6ed9
Normalize output
- Try to use "<module>: >> $msg" notation.
- Try to group modules and separate them by blank lines.
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_package.sh | 11 ++++-------
genkernel | 30 +++++++++++++++++++-----------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/gen_package.sh b/gen_package.sh
index bee9989..ca46a2c 100755
--- a/gen_package.sh
+++ b/gen_package.sh
@@ -2,8 +2,7 @@
# $Id$
gen_minkernpackage() {
- print_info 1 ''
- print_info 1 "Creating minimal kernel package in '${MINKERNPACKAGE}'
..."
+ print_info 1 "minkernpkg: >> Creating minimal kernel package in
'${MINKERNPACKAGE}' ..."
rm -rf "${TEMP}/minkernpackage" >/dev/null 2>&1
mkdir "${TEMP}/minkernpackage" || gen_die "Failed to create
'${TEMP}/minkernpackage'!"
if [ -n "${KERNCACHE}" ]
@@ -86,8 +85,7 @@ gen_minkernpackage() {
gen_modulespackage() {
if [ -d "${INSTALL_MOD_PATH}/lib/modules/${KV}" ]
then
- print_info 1 ''
- print_info 1 "Creating modules package in '${MODULESPACKAGE}'
..."
+ print_info 1 "modulespkg: >> Creating modules package in
'${MODULESPACKAGE}' ..."
rm -rf "${TEMP}/modulespackage" >/dev/null 2>&1
mkdir "${TEMP}/modulespackage" || gen_die "Failed to create
'${TEMP}/modulespackage'!"
@@ -102,13 +100,12 @@ gen_modulespackage() {
print_info 3 "COMMAND: ${tar_cmd[*]}" 1 0 1
eval "${tar_cmd[@]}" || gen_die "Failed to create compressed
modules package '${MODULESPACKAGE}'!"
else
- print_info 1 "'${INSTALL_MOD_PATH}/lib/modules/${KV}' was not
found; Skipping creation of modules package in '${MODULESPACKAGE}' ..."
+ print_info 1 "modulespkg: >>
'${INSTALL_MOD_PATH}/lib/modules/${KV}' was not found; Skipping creation of
modules package in '${MODULESPACKAGE}' ..."
fi
}
gen_kerncache() {
- print_info 1 ''
- print_info 1 "Creating kernel cache in '${KERNCACHE}' ..."
+ print_info 1 "kerncache: >> Creating kernel cache in '${KERNCACHE}' ..."
rm -rf "${TEMP}/kerncache" >/dev/null 2>&1
mkdir "${TEMP}/kerncache" || gen_die "Failed to create
'${TEMP}/kerncache'!"
diff --git a/genkernel b/genkernel
index bb53452..fb08ea7 100755
--- a/genkernel
+++ b/genkernel
@@ -161,15 +161,16 @@ print_info 1 "Using kernel config file '${KERNEL_CONFIG}'
..."
if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}"
then
- print_info 1 ""
+ 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
isTrue "${CMD_INSTALL}" && make_bootdir_writable
if isTrue "${BUILD_KERNEL}" && ! isTrue "${KERNCACHE_IS_VALID}"
then
+ print_info 1 '' 1 0
+
# Configure kernel
config_kernel
@@ -215,12 +216,14 @@ if isTrue "${CMD_INSTALL}"
then
if isTrue "${KERNCACHE_IS_VALID}"
then
+ print_info 1 '' 1 0
gen_kerncache_extract_kernel
fi
fi
if isTrue "${KERNCACHE_IS_VALID}"
then
+ print_info 1 '' 1 0
! isTrue "${BUILD_STATIC}" && gen_kerncache_extract_modules
gen_kerncache_extract_config
fi
@@ -228,7 +231,7 @@ fi
# Run callback
if [ -n "${CMD_CALLBACK}" ]
then
- print_info 1 "" 1 0
+ print_info 1 '' 1 0
print_info 1 "Preparing to run callback: \"${CMD_CALLBACK}\"" 0
CALLBACK_ESCAPE=0
@@ -243,7 +246,6 @@ then
if [ "${CALLBACK_ESCAPE}" -eq 0 ]
then
- print_info 1 '' 1 0
print_info 1 '' 1 0
eval ${CMD_CALLBACK} | tee -a "${LOGFILE}"
CMD_STATUS="${PIPESTATUS[0]}"
@@ -261,18 +263,18 @@ fi
if isTrue "${BUILD_RAMDISK}"
then
- print_info 1 ''
+ print_info 1 '' 1 0
# Compile initramfs
create_initramfs
else
- print_info 1 ''
+ print_info 1 '' 1 0
print_info 1 "initramfs: >> Not building since only the kernel was
requested ..."
fi
if isTrue "${INTEGRATED_INITRAMFS}"
then
- print_info 1 ''
+ print_info 1 '' 1 0
# We build the kernel a second time to include the initramfs
compile_kernel
@@ -285,20 +287,26 @@ then
# Only update KERNCACHE when KERNCACHE wasn't used because
# when it was used nothing has been changed so no update is
# necessary.
+ print_info 1 '' 1 0
gen_kerncache
else
- print_info 3 "Kerncache was used and kernel/modules therefore
didn't change; Skipping '${KERNCACHE}' generation ..."
+ print_info 3 '' 1 0
+ print_info 3 "kerncache: >> Existing kerncache was used and
kernel/modules therefore didn't change; Skipping '${KERNCACHE}' generation ..."
fi
fi
-[ -n "${MINKERNPACKAGE}" ] && gen_minkernpackage
-[ -n "${MODULESPACKAGE}" ] && gen_modulespackage
+if [ -n "${MINKERNPACKAGE}" -o -n "${MODULESPACKAGE}" ]
+then
+ print_info 1 '' 1 0
+ [ -n "${MINKERNPACKAGE}" ] && gen_minkernpackage
+ [ -n "${MODULESPACKAGE}" ] && gen_modulespackage
+fi
if isTrue "${BUILD_KERNEL}"
then
show_warning_initramfs_is_required=yes
- print_info 1 ''
+ print_info 1 '' 1 0
print_info 1 'Kernel compiled successfully!'
if isTrue "${CMD_INSTALL}"