diff options
author | Daniel Baumann <daniel@debian.org> | 2012-11-30 15:08:27 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-11-30 15:09:22 +0100 |
commit | fce9502aad26d6cf10f892a3dbf9b85b265c8473 (patch) | |
tree | a0b0f2ff2f07d40e8403d5b0f89116237ca7065d | |
parent | 2df809705d670993096e841173f565323d93da8a (diff) | |
download | vyos-live-build-fce9502aad26d6cf10f892a3dbf9b85b265c8473.tar.gz vyos-live-build-fce9502aad26d6cf10f892a3dbf9b85b265c8473.zip |
Replicating same qemu support within bootstrap_debootstrao for bootstrap_cdebootstrap too (Closes: #694102).
-rwxr-xr-x | scripts/build/bootstrap_cdebootstrap | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/build/bootstrap_cdebootstrap b/scripts/build/bootstrap_cdebootstrap index c3423010d..1c778e379 100755 --- a/scripts/build/bootstrap_cdebootstrap +++ b/scripts/build/bootstrap_cdebootstrap @@ -113,7 +113,24 @@ then fi Echo_breakage "Running ${LB_BOOTSTRAP}... " - ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + + # Run appropriate bootstrap, i.e. foreign or regular bootstrap + if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then + + if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ] + then + CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')" + fi + + Echo_message "Bootstrap will be foreign" + ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + + Echo_message "Running debootstrap second stage under QEMU" + cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin + Chroot chroot /bin/sh /sbin/cdebootstrap-foreign + else + ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + fi if [ -n "${LB_ROOT_COMMAND}" ] then |