[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH]: Fixes and Features, misc things



Thanatermesis <thanatermesis.ecvs at gmail.com> writes:

> diff -Naur live-helper-new-clean/usr/bin/lh_binary_memtest live-helper-new-to-commit/usr/bin/lh_binary_memtest
> --- live-helper-new-clean/usr/bin/lh_binary_memtest	2008-04-28 18:18:28.000000000 +0200
> +++ live-helper-new-to-commit/usr/bin/lh_binary_memtest	2008-05-20 20:10:52.644954763 +0200
> @@ -56,7 +56,7 @@
>  if [ "${LH_CHROOT_BUILD}" = "enabled" ]
>  then
>  
> -	if [ -f chroot/usr/sbin/grub ] && [ ! -f chroot/boot/grub/menu.lst ]
> +	if [ -f chroot/usr/sbin/grub ] || [ -f chroot/sbin/grub ] && [ ! -f chroot/boot/grub/menu.lst ] # Comment: needed if we use grub-gfxboot
>  	then
>  		GRUB="yes"

I nack this one.

We shouldn't add support to things we don't use in Debian and gfxboot
isn't available on Debian.

If we start to add support to all possible tool available the code
will get messy.

> diff -Naur live-helper-new-clean/usr/bin/lh_binary_rootfs live-helper-new-to-commit/usr/bin/lh_binary_rootfs
> --- live-helper-new-clean/usr/bin/lh_binary_rootfs	2008-04-28 18:18:28.000000000 +0200
> +++ live-helper-new-to-commit/usr/bin/lh_binary_rootfs	2008-05-20 20:19:31.838951797 +0200
> @@ -223,6 +223,11 @@
>  			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -info"
>  		fi
>  
> +		if [ -n "${LH_PROCESSORS}" ] && [ ! "${LH_PROCESSORS}" = "none" ]
> +		then
> +			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -processors ${LH_PROCESSORS}" # Comment: This option do a usage of X processors when mksquash'
> +		fi
> +

While this looks technically possible, why we'd want to limit it?

>  		if [ "${LH_PACKAGES_LISTS}" = "stripped" ] || [ "${LH_PACKAGES_LISTS}" = "minimal" ]
>  		then
>  			MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e $(ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's|chroot/||g')"
> @@ -245,7 +250,7 @@
>  				;;
>  
>  			disabled)
> -				mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
> +				mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS} -no-fragments -noappend # Comment: recommended options to use
>  				;;
>  		esac

Can you clarify _why_?

> diff -Naur live-helper-new-clean/usr/bin/lh_chroot_sources live-helper-new-to-commit/usr/bin/lh_chroot_sources
> --- live-helper-new-clean/usr/bin/lh_chroot_sources	2008-04-28 18:18:28.000000000 +0200
> +++ live-helper-new-to-commit/usr/bin/lh_chroot_sources	2008-05-20 20:32:27.461701423 +0200
> @@ -44,28 +44,10 @@
>  		# Creating lock file
>  		Create_lockfile .lock
>  
> -		# Configure custom sources.list
> -		echo "deb ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" > chroot/etc/apt/sources.list
> -
> -		if [ "${LH_SOURCE}" = "enabled" ]
> -		then
> -			echo "deb-src ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
> -		fi
> -
> -		if [ "${LH_SECURITY}" = "enabled" ]
> -		then
> -			if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
> -			then
> -				echo "deb ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
> -
> -				if [ "${LH_SOURCE}" = "enabled" ]
> -				then
> -					echo "deb-src ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
> -				fi
> -			fi
> -		fi
> +        # Remove possible existing sources.list
> +        rm -f chroot/etc/apt/sources.list

Wrong indentation

>  		# Update indices from cache
>  		if [ "${LH_CACHE_INDICES}" = "enabled" ] && [ -d cache/indices_bootstrap ]
>  		then
> @@ -196,15 +199,44 @@
>  			then
>  				mkdir -p cache/indices_bootstrap
>  
> -				cp -f chroot/etc/apt/secring.gpg* cache/indices_bootstrap
> -				cp -f chroot/etc/apt/trusted.gpg* cache/indices_bootstrap
> +				if ls chroot/etc/apt/secring.gpg* > /dev/null 2>&1
> +	   			then
> +					cp -f chroot/etc/apt/secring.gpg* cache/indices_bootstrap
> +	            fi
> +			   	if lsroot/etc/apt/trusted.gpg* > /dev/null 2>&1
                   ^^^ typo
> +				then
> +					cp -f chroot/etc/apt/trusted.gpg* cache/indices_bootstrap
> +				fi



Reply to: