Adding check to fail if a cross build is started (Closes: #444669, #444670).

This commit is contained in:
Daniel Baumann 2007-10-10 11:39:55 +02:00
parent 687aee76e9
commit f712678141
8 changed files with 37 additions and 0 deletions

View File

@ -30,6 +30,28 @@ Check_architecture ()
fi fi
} }
Check_crossarchitecture ()
{
if [ -x /usr/bin/dpkg ]
then
HOST="$(dpkg --print-architecture)"
else
HOST="$(uname -m)"
fi
case "${HOST}" in
amd64|i386)
CROSS="amd64 i386"
;;
powerpc|ppc64)
CROSS="powerpc ppc64"
;;
esac
Check_architecture "${CROSS}"
}
Check_multiarchitecture () Check_multiarchitecture ()
{ {
if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ] if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ]

View File

@ -57,6 +57,7 @@ Create_lockfile .lock
# Check architecture # Check architecture
Check_architecture amd64 i386 Check_architecture amd64 i386
Check_crossarchitecture
# Checking depends # Checking depends
Check_package chroot/usr/sbin/grub grub Check_package chroot/usr/sbin/grub grub

View File

@ -57,6 +57,7 @@ Create_lockfile .lock
# Check architecture # Check architecture
Check_architecture amd64 i386 Check_architecture amd64 i386
Check_crossarchitecture
# Checking depends # Checking depends
Check_package chroot/usr/bin/syslinux syslinux Check_package chroot/usr/bin/syslinux syslinux

View File

@ -57,6 +57,7 @@ Create_lockfile .lock
# Check architecture # Check architecture
Check_architecture powerpc ppc64 Check_architecture powerpc ppc64
Check_crossarchitecture
# Checking depends # Checking depends
Check_package chroot/usr/lib/yaboot/yaboot yaboot Check_package chroot/usr/lib/yaboot/yaboot yaboot

View File

@ -33,6 +33,9 @@ Read_conffile config/source
Read_conffile "${LH_CONFIG}" Read_conffile "${LH_CONFIG}"
Set_defaults Set_defaults
# Check architecture
Check_crossarchitecture
Echo_message "Begin caching bootstrap stage..." Echo_message "Begin caching bootstrap stage..."
for STAGE in ${LH_CACHE_STAGES} for STAGE in ${LH_CACHE_STAGES}

View File

@ -38,6 +38,9 @@ then
exit 0 exit 0
fi fi
# Check architecture
Check_crossarchitecture
Echo_message "Begin bootstrapping system..." Echo_message "Begin bootstrapping system..."
Check_package /usr/bin/cdebootstrap cdebootstrap Check_package /usr/bin/cdebootstrap cdebootstrap

View File

@ -38,6 +38,9 @@ then
exit 0 exit 0
fi fi
# Check architecture
Check_crossarchitecture
Echo_message "Begin bootstrapping system..." Echo_message "Begin bootstrapping system..."
# Ensure that a system is built as root # Ensure that a system is built as root

View File

@ -38,6 +38,9 @@ then
exit 0 exit 0
fi fi
# Check architecture
Check_crossarchitecture
Echo_message "Begin bootstrapping system..." Echo_message "Begin bootstrapping system..."
Check_package /usr/sbin/debootstrap debootstrap Check_package /usr/sbin/debootstrap debootstrap