Include original kconfig in kerncache

If original kconfig exists in the kerncache, use that for comparison to the current kconfig

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@654 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Andrew Gaffney 17 years ago
parent 4304d907ba
commit d52589997e

@ -2,6 +2,10 @@
# Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
14 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> gen_package.sh:
Include original kconfig in kerncache If original kconfig exists in the
kerncache, use that for comparison to the current kconfig
14 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> genkernel: 14 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> genkernel:
Switch back to building kernel first Switch back to building kernel first
Optionally build the kernel a second time if we're integrating the initramfs Optionally build the kernel a second time if we're integrating the initramfs

@ -68,6 +68,7 @@ gen_kerncache()
cd "${KERNEL_DIR}" cd "${KERNEL_DIR}"
cp "${KERNEL_BINARY}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!' cp "${KERNEL_BINARY}" "${TEMP}/kerncache/kernel-${ARCH}-${KV}" || gen_die 'Could not the copy kernel for the kernel package!'
cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}" cp "${KERNEL_DIR}/.config" "${TEMP}/kerncache/config-${ARCH}-${KV}"
cp "${KERNEL_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}"
cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}" cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}"
if isTrue "${GENZIMAGE}" if isTrue "${GENZIMAGE}"
then then
@ -163,7 +164,12 @@ gen_kerncache_is_valid()
if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${KERNEL_CONFIG} ] if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${KERNEL_CONFIG} ]
then then
test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1) if [ -e ${TEMP}/config-${ARCH}-${KV}.orig ]
then
test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV}.orig | md5sum | cut -d " " -f 1)
else
test1=$(grep -v "^#" ${TEMP}/config-${ARCH}-${KV} | md5sum | cut -d " " -f 1)
fi
test2=$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1) test2=$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1)
if [ "${test1}" == "${test2}" ] if [ "${test1}" == "${test2}" ]
then then

Loading…
Cancel
Save