On Mon, Jun 13, 2011 at 08:21:52PM +0200, Daniel Baumann wrote: > Adding an own option just for excluding the kernel and initrd seems like > not worth it; rather, the already existing config/chroot_rootfs/excludes > should be used. that solves the task of excluding files in a generic way.
That would work better if lb_rootfs passed -wildcards to mksquashfs. As it is, the excludes file is a poor fit for this because it doesn't support wildcards when building a squashfs; the exact kernel/initrd filenames change often. (Note that the excludes file *does* support wildcards if squashfs isn't being used.) -- Colin Watson [[email protected]]
>From a6a3be14ab3238f515af2928006a446e14d44fdb Mon Sep 17 00:00:00 2001 From: Colin Watson <[email protected]> Date: Mon, 13 Jun 2011 19:36:30 +0100 Subject: [PATCH] Pass -wildcards to mksquashfs if using an excludes file. --- scripts/build/lb_binary_rootfs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs index 70a6dc7..754a7c2 100755 --- a/scripts/build/lb_binary_rootfs +++ b/scripts/build/lb_binary_rootfs @@ -357,7 +357,7 @@ case "${LB_CHROOT_FILESYSTEM}" in then cp config/binary_rootfs/excludes chroot/excludes - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -ef /excludes" + MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef /excludes" fi # Create image @@ -425,7 +425,7 @@ case "${LB_CHROOT_FILESYSTEM}" in false) if [ -e config/binary_rootfs/excludes ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -ef config/binary_rootfs/excludes" + MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/binary_rootfs/excludes" fi mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} -- 1.7.5.4
