diff options
Diffstat (limited to 'auto/functions')
| -rw-r--r-- | auto/functions/compat | 28 | 
1 files changed, 22 insertions, 6 deletions
| diff --git a/auto/functions/compat b/auto/functions/compat index c3c1c3b..e93c386 100644 --- a/auto/functions/compat +++ b/auto/functions/compat @@ -17,20 +17,34 @@ Compat_arguments ()  		# ignore other unsupported arguments  		--syslinux-*|--bootstrap-config|-e|--encryption|-l|--language) shift; continue;;  		--binary-indices|--packages|--symlinks|--sysvinit|--tasks|--virtual-root-size) shift; continue;; -		--packages-lists|--package-lists|-p) Compat_packagelists $1; shift; continue;; +		--packages-lists|--package-lists|-p) shift; continue;;  		esac  		echo -n "$arg$IFS"  	done  } +Compat_arguments_functions () +{ +	while [ "$#" -gt 0 ] +	do +		arg="$1" +		shift +		case "$arg" in +		--packages-lists|--package-lists|-p) Compat_packagelists $1; shift; continue;; +		esac +	done +} +  Compat_config ()  { -[ -e config/chroot ] && [ "$LB_ARCHIVES" ] && cat <<eof >> config/chroot +if [ -e config/chroot ]; then +cat <<eof >> config/chroot  # Compat (Live-build 2 -> 3) -LB_REPOSITORIES="$LB_ARCHIVES" -LB_PACKAGES_LISTS="$LB_PACKAGE_LISTS"  eof +	[ "$LB_ARCHIVES" ] && echo "LB_REPOSITORIES=\"$LB_ARCHIVES\"" >> config/chroot +	[ "$LB_PACKAGE_LISTS" ] && echo "LB_PACKAGE_LISTS=\"$LB_PACKAGE_LISTS\";LB_PACKAGES_LISTS=\"$LB_PACKAGE_LISTS\"" >> config/chroot +fi  [ -e config/bootstrap ] && [ "$LB_ARCHITECTURES" ] && cat <<eof >> config/bootstrap  # Compat (Live-build 2 -> 3) @@ -67,8 +81,8 @@ Compat_dir ()  Compat_packagelists()  { -	LB_PACKAGE_LISTS="$1" -	LB_PACKAGES_LISTS="$1" +	LB_PACKAGE_LISTS="$@" +	LB_PACKAGES_LISTS="$@"  	mkdir -p config/package-lists  	(  		echo '# AUTOGENERATED from "lb config -p" option - DO NOT CHANGE' @@ -102,6 +116,7 @@ case "$LB_VERSION" in  			auto/config "$@"  			exit $?  		fi +		Compat_arguments_functions "$@"  		OIFS="$IFS"; IFS="$(printf \\a)"  		set -- $(Compat_arguments "$@")  		IFS="$OIFS" @@ -111,6 +126,7 @@ case "$LB_VERSION" in  		LB_PACKAGES_LISTS="$LB_PACKAGE_LISTS"  		[ -z "$LB_ARCHITECTURES" ] && LB_ARCHITECTURES="$LB_ARCHITECTURE"  		LB_ARCHITECTURE="$LB_ARCHITECTURES" +		Compat_config || :  		trap Compat_config EXIT  		;;  	chroot_apt) | 
