Fix missing moddeps file by adding a test;Do not keep the initrd/initramfs with a...
authorEric Edgar <rocket@gentoo.org>
Mon, 21 Nov 2005 17:01:26 +0000 (17:01 +0000)
committerEric Edgar <rocket@gentoo.org>
Mon, 21 Nov 2005 17:01:26 +0000 (17:01 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@324 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_initramfs.sh
gen_initrd.sh
gen_moddeps.sh
gen_package.sh

index 736a65275fa02c1735762174542f4758e2e2b351..348a73056cb4b41b09b148a729ee83a282c4091a 100644 (file)
@@ -516,6 +516,7 @@ merge_initramfs_cpio_archives(){
        [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] ||
                [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] &&
                        cp ${TMPDIR}/initramfs-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz
+                       rm ${TMPDIR}/initramfs-${KV}
 
        # Mips also mimics Pegasos to merge the initramfs into the kernel
        if [ "${MIPS_EMBEDDED_IMAGE}" != '' ]; then
index 25058fcd8ecc2fe439ac471cacccd587d2dbe883..d3b94feb162b0361e878f104441403c5dcafcf0c 100644 (file)
@@ -398,6 +398,7 @@ create_initrd() {
        [ "${KERNEL_MAKE_DIRECTIVE}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] ||
                [ "${KERNEL_MAKE_DIRECTIVE_2}" == 'zImage.initrd' -a "${GENERATE_Z_IMAGE}" = '1' ] &&
                cp ${TMPDIR}/initrd-${KV} ${KERNEL_DIR}/arch/${ARCH}/boot/images/ramdisk.image.gz
+               rm ${TMPDIR}/initrd-${KV}
 
        # Mips also mimics Pegasos to merge the initrd into the kernel
        [ "${MIPS_EMBEDDED_IMAGE}" != '' ] \
index 840b2ca67c57315cb765c505830c0590d5f6d58c..a699e66bda2a67ec846ce8274bda4efc8b574a11 100644 (file)
@@ -62,5 +62,8 @@ gen_dep_list()
        done
 
        # Only list each module once
-       cat ${TEMP}/moddeps | sort | uniq
+       if [ -f ${TEMP}/moddeps ]
+       then
+           cat ${TEMP}/moddeps | sort | uniq
+       fi
 }
index f6391bde4bb33bbc883fda7e6d2ba611caf31621..86c8f752b04bcd37f97199e0f50985e27787305e 100644 (file)
@@ -23,12 +23,17 @@ gen_minkernpackage()
             fi
 
        fi
-       if [ "${KERN_24}" != '1' -a  "${CMD_BOOTSPLASH}" != '1' ]
+       
+       if [ "${GENERATE_Z_IMAGE}" != '1' ]
        then
-               [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
-       else
-               [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initrd-${KV}" "${TEMP}/minkernpackage/initrd-${ARCH}-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
+           if [ "${KERN_24}" != '1' -a  "${CMD_BOOTSPLASH}" != '1' ]
+           then
+                   [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
+           else
+                   [ "${BUILD_INITRD}" -ne 0 ] && { cp "${TMPDIR}/initrd-${KV}" "${TEMP}/minkernpackage/initrd-${ARCH}-${KV}" || gen_die 'Could not copy the initrd for the kernel package!'; }
+           fi
        fi
+       
        cd "${TEMP}/minkernpackage" 
        /bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!'
        cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1