Include original kconfig in kerncache
authorAndrew Gaffney <agaffney@gentoo.org>
Fri, 14 Mar 2008 03:14:46 +0000 (03:14 +0000)
committerAndrew Gaffney <agaffney@gentoo.org>
Fri, 14 Mar 2008 03:14:46 +0000 (03:14 +0000)
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

ChangeLog
gen_package.sh

index e31ab50698544d6aefa42f5b0137be272430890c..0f702c689799fe9231a6e7a19faafdabdf5bfc85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $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:
   Switch back to building kernel first
   Optionally build the kernel a second time if we're integrating the initramfs
index d0dfdc3a16ad57edd4a86dfa18525a5bd63dbc80..bf7ad0d719d8a003acee47db5d7a01f0805a95b8 100644 (file)
@@ -68,6 +68,7 @@ gen_kerncache()
        cd "${KERNEL_DIR}"
        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_CONFIG}" "${TEMP}/kerncache/config-${ARCH}-${KV}"
        cp "${KERNEL_DIR}/System.map" "${TEMP}/kerncache/System.map-${ARCH}-${KV}"
        if isTrue "${GENZIMAGE}"
         then
@@ -163,7 +164,12 @@ gen_kerncache_is_valid()
                        if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${KERNEL_CONFIG} ]
                        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)
                                if [ "${test1}" == "${test2}" ]
                                then