diff options
author | 2019-03-23 04:51:52 +0100 | |
---|---|---|
committer | 2019-03-23 09:06:18 +0100 | |
commit | 459790c8075e8152e764a9d1d070994fd5cb83b6 (patch) | |
tree | 3942e9dedab36e1644468381f9222d3d1bbae74c /gen_package.sh | |
parent | Fix "--kerncache=/foo/bar.bz2" when used with "--no-kernel-sources" (diff) | |
download | genkernel-459790c8075e8152e764a9d1d070994fd5cb83b6.tar.gz genkernel-459790c8075e8152e764a9d1d070994fd5cb83b6.tar.bz2 genkernel-459790c8075e8152e764a9d1d070994fd5cb83b6.zip |
gen_kerncache_is_valid(): No need to do anything if $KERNCACHE file doesn't exist
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_package.sh')
-rwxr-xr-x | gen_package.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gen_package.sh b/gen_package.sh index 32cbf853..bd137ad5 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -169,20 +169,21 @@ gen_kerncache_extract_config() gen_kerncache_is_valid() { KERNCACHE_IS_VALID="no" - if ! isTrue "${KERNEL_SOURCES}" - then - BUILD_KERNEL="no" - # Can make this more secure .... - /bin/tar -xf ${KERNCACHE} -C ${TEMP} - if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] - then - print_info 1 'Valid kernel cache found; no sources will be used' - KERNCACHE_IS_VALID="yes" - fi - else - if [ -e "${KERNCACHE}" ] + if [ -e "${KERNCACHE}" ] + then + if ! isTrue "${KERNEL_SOURCES}" then + BUILD_KERNEL="no" + # Can make this more secure .... + + /bin/tar -xf ${KERNCACHE} -C ${TEMP} + if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] + then + print_info 1 'Valid kernel cache found; no sources will be used' + KERNCACHE_IS_VALID="yes" + fi + else KERNEL_CONFIG="/${KERNEL_OUTPUTDIR}/.config" if [ "${CMD_KERNEL_CONFIG}" != '' ] then @@ -208,7 +209,6 @@ gen_kerncache_is_valid() fi test2=$("${CONFGREP}" -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) - if [ "${test1}" == "${test2}" ] then echo |