Updating defaults for multiarch, part 1.

This commit is contained in:
Daniel Baumann 2010-12-06 00:02:43 +01:00
parent 70e84bd3c1
commit 7f57bd76c6
1 changed files with 80 additions and 33 deletions

View File

@ -270,6 +270,13 @@ Set_defaults ()
;; ;;
esac esac
fi fi
else
if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ]
then
_MULTIARCH="true"
else
_MULTIARCH="false"
fi
fi fi
# Include packages on base # Include packages on base
@ -304,6 +311,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}"
true)
LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/" LB_MIRROR_BOOTSTRAP="http://archive.ubuntu.com/ubuntu/"
@ -315,6 +328,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
fi fi
LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}" LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
@ -332,6 +347,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}" in
true)
LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/" LB_MIRROR_CHROOT_SECURITY="http://security.ubuntu.com/ubuntu/"
@ -343,6 +364,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
fi fi
# Setting volatile mirror to fetch packages from # Setting volatile mirror to fetch packages from
@ -362,6 +385,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}" in
true)
LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/" LB_MIRROR_CHROOT_VOLATILE="http://security.ubuntu.com/ubuntu/"
@ -373,6 +402,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-none}" LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE:-none}"
fi fi
@ -406,6 +437,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}" in
true)
LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/" LB_MIRROR_BINARY="http://archive.ubuntu.com/ubuntu/"
@ -417,6 +454,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
fi fi
# Setting security mirror which ends up in the image # Setting security mirror which ends up in the image
@ -432,6 +471,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}" in
true)
LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/" LB_MIRROR_BINARY_SECURITY="http://archive.ubuntu.com/ubuntu/"
@ -443,6 +488,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
fi fi
# Setting volatile mirror which ends up in the image # Setting volatile mirror which ends up in the image
@ -461,6 +508,12 @@ Set_defaults ()
;; ;;
ubuntu) ubuntu)
case "${_MULTIARCH}" in
true)
LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/"
;;
false)
case "${LB_ARCHITECTURES}" in case "${LB_ARCHITECTURES}" in
amd64|i386) amd64|i386)
LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/" LB_MIRROR_BINARY_VOLATILE="http://security.ubuntu.com/ubuntu/"
@ -472,6 +525,8 @@ Set_defaults ()
esac esac
;; ;;
esac esac
;;
esac
LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE:-none}" LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE:-none}"
fi fi
@ -794,15 +849,7 @@ Set_defaults ()
## config/binary ## config/binary
# Setting image filesystem # Setting image filesystem
case "${LB_ARCHITECTURES}" in
sparc)
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-ext2}"
;;
*)
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat16}" LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat16}"
;;
esac
# Setting image type # Setting image type
case "${LB_DISTRIBUTION}" in case "${LB_DISTRIBUTION}" in