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}"