From 7f57bd76c69cbf4f1d29a3db069bb550e76444ca Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Dec 2010 00:02:43 +0100 Subject: Updating defaults for multiarch, part 1. --- functions/defaults.sh | 113 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 80 insertions(+), 33 deletions(-) diff --git a/functions/defaults.sh b/functions/defaults.sh index da8cef404..4c8707cf0 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -270,6 +270,13 @@ Set_defaults () ;; esac fi + else + if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ] + then + _MULTIARCH="true" + else + _MULTIARCH="false" + fi fi # Include packages on base @@ -304,13 +311,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" + true) LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_BOOTSTRAP="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_BOOTSTRAP="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -332,13 +347,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" in + true) LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_CHROOT_SECURITY="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_CHROOT_SECURITY="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -362,13 +385,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" in + true) LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_CHROOT_VOLATILE="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_CHROOT_VOLATILE="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -406,13 +437,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" in + true) LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_BINARY="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_BINARY="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -432,13 +471,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" in + true) LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_BINARY_SECURITY="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_BINARY_SECURITY="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -461,13 +508,21 @@ Set_defaults () ;; ubuntu) - case "${LB_ARCHITECTURES}" in - amd64|i386) + case "${_MULTIARCH}" in + true) LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/" ;; - *) - LB_MIRROR_BINARY_VOLATILE="http://ports.ubuntu.com/" + false) + case "${LB_ARCHITECTURES}" in + amd64|i386) + LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/" + ;; + + *) + LB_MIRROR_BINARY_VOLATILE="http://ports.ubuntu.com/" + ;; + esac ;; esac ;; @@ -794,15 +849,7 @@ Set_defaults () ## config/binary # Setting image filesystem - case "${LB_ARCHITECTURES}" in - sparc) - LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-ext2}" - ;; - - *) - LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat16}" - ;; - esac + LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat16}" # Setting image type case "${LB_DISTRIBUTION}" in -- cgit v1.2.3