Making excludes handling simpler, and dropping excluding of kernel images for minimal or stripped images (Closes: #586367).

This commit is contained in:
Daniel Baumann 2010-06-24 01:43:38 +02:00
parent fdb611c18c
commit 12148af2a4
2 changed files with 13 additions and 31 deletions

View File

@ -96,34 +96,21 @@ fi
${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
# Handling chroot excludes # Handling chroot excludes
if [ "${LH_BUILD_WITH_CHROOT}" = "true" ] if [ -f config/binary_rootfs/excludes ]
then then
if [ -f config/binary_rootfs/excludes ] case "${LH_BUILD_WITH_CHROOT}" in
then true)
cp config/binary_rootfs/excludes chroot/chroot/excludes cp config/binary_rootfs/excludes chroot/chroot/excludes
chroot chroot/chroot /usr/bin/env -i xargs --arg-file=/excludes -I FILE bash -c 'rm -rf FILE' chroot chroot/chroot /usr/bin/env -i xargs --arg-file=/excludes -I FILE bash -c 'rm -rf FILE'
rm -f chroot/chroot/excludes rm -f chroot/chroot/excludes
fi ;;
if [ "${LH_DEBIAN_INSTALLER}" != "live" ] false)
then cp config/binary_rootfs/excludes chroot/excludes
case "${LH_PACKAGES_LISTS}" in chroot chroot /usr/bin/env -i xargs --arg-file=/excludes -I FILE bash -c 'rm -rf FILE'
stripped|minimal) rm -f chroot/excludes
# kernel images ;;
rm -f chroot/chroot/boot/${LINUX}* esac
rm -f chroot/chroot/boot/initrd.img*
# kernel symlinks
rm -f chroot/chroot/${LINUX}*
rm -f chroot/chroot/initrd.img*
;;
esac
fi
else
if [ "${LH_CHROOT_FILESYSTEM}" != "squashfs" ]
then
Echo_warning "rootfs excludes are not supported on non-chrooted builds unless squashfs as chroot filesystem is used, thus ignoring excludes now."
fi
fi fi
if [ -n "${LH_ROOT_COMMAND}" ] if [ -n "${LH_ROOT_COMMAND}" ]

View File

@ -362,11 +362,6 @@ case "${LH_CHROOT_FILESYSTEM}" in
;; ;;
false) false)
if [ -f config/binary_rootfs/excludes ]
then
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/binary_rootfs/excludes"
fi
mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
;; ;;
esac esac