diff options
| author | Daniel Baumann <daniel@debian.org> | 2010-06-24 01:43:38 +0200 | 
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:12 +0100 | 
| commit | edc9f07fe5eb49dbf4ee0166c726d2ad0d0e8ef8 (patch) | |
| tree | 66b0563779dec86060d90ec95dcd07036f859958 /helpers | |
| parent | cb9bd103b9ee08030b2cad2783935d63d5701abc (diff) | |
| download | vyos-live-build-edc9f07fe5eb49dbf4ee0166c726d2ad0d0e8ef8.tar.gz vyos-live-build-edc9f07fe5eb49dbf4ee0166c726d2ad0d0e8ef8.zip | |
Making excludes handling simpler, and dropping excluding of kernel images for minimal or stripped images (Closes: #586367).
Diffstat (limited to 'helpers')
| -rwxr-xr-x | helpers/binary_chroot | 41 | ||||
| -rwxr-xr-x | helpers/binary_rootfs | 5 | 
2 files changed, 14 insertions, 32 deletions
| diff --git a/helpers/binary_chroot b/helpers/binary_chroot index 08c6f4839..16c4ba3a7 100755 --- a/helpers/binary_chroot +++ b/helpers/binary_chroot @@ -96,34 +96,21 @@ fi  ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot  # Handling chroot excludes -if [ "${LH_BUILD_WITH_CHROOT}" = "true" ] +if [ -f config/binary_rootfs/excludes ]  then -	if [ -f config/binary_rootfs/excludes ] -	then -		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' -		rm -f chroot/chroot/excludes -	fi - -	if [ "${LH_DEBIAN_INSTALLER}" != "live" ] -	then -		case "${LH_PACKAGES_LISTS}" in -			stripped|minimal) -				# kernel images -				rm -f chroot/chroot/boot/${LINUX}* -				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 +	case "${LH_BUILD_WITH_CHROOT}" in +		true) +			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' +			rm -f chroot/chroot/excludes +			;; + +		false) +			cp config/binary_rootfs/excludes chroot/excludes +			chroot chroot /usr/bin/env -i xargs --arg-file=/excludes -I FILE bash -c 'rm -rf FILE' +			rm -f chroot/excludes +			;; +	esac  fi  if [ -n "${LH_ROOT_COMMAND}" ] diff --git a/helpers/binary_rootfs b/helpers/binary_rootfs index 9ed1358b2..ac2b1e7ca 100755 --- a/helpers/binary_rootfs +++ b/helpers/binary_rootfs @@ -362,11 +362,6 @@ case "${LH_CHROOT_FILESYSTEM}" in  				;;  			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}  				;;  		esac | 
