mk-sbuild: rationalise architecture variables

This commit is contained in:
Emmet Hikory 2010-02-09 11:40:16 +09:00
parent 32d0e916d3
commit c2fa613721
2 changed files with 8 additions and 9 deletions

3
debian/changelog vendored
View File

@ -6,6 +6,7 @@ ubuntu-dev-tools (0.93) UNRELEASED; urgency=low
[ Emmet Hikory ] [ Emmet Hikory ]
* Support qemu-arm-static -> qemu-kvm-extras-static transition * Support qemu-arm-static -> qemu-kvm-extras-static transition
* mk-sbuild: conditionally install lvm2 only for lv-snapshot schroots * mk-sbuild: conditionally install lvm2 only for lv-snapshot schroots
* mk-sbuild: rationalise architecture variables
[ Loïc Minier ] [ Loïc Minier ]
* Demote qemu-kvm-extras-static to a Suggests since most people don't build * Demote qemu-kvm-extras-static to a Suggests since most people don't build
@ -15,7 +16,7 @@ ubuntu-dev-tools (0.93) UNRELEASED; urgency=low
* requestsync: add -C to allow manually adding changelog when missing * requestsync: add -C to allow manually adding changelog when missing
(LP: #518574). (LP: #518574).
-- Emmet Hikory <persia@ubuntu.com> Tue, 09 Feb 2010 11:32:02 +0900 -- Emmet Hikory <persia@ubuntu.com> Tue, 09 Feb 2010 11:38:48 +0900
ubuntu-dev-tools (0.92) lucid; urgency=low ubuntu-dev-tools (0.92) lucid; urgency=low

View File

@ -137,9 +137,6 @@ while :; do
shift shift
;; ;;
--arch) --arch)
# By default, use the native architecture.
arch_opt="--arch=$2"
arch_suffix="-$2"
CHROOT_ARCH="$2" CHROOT_ARCH="$2"
if [ "$2" = "i386" ] || [ "$2" = "lpia" ] && [ -z "$personality" ]; if [ "$2" = "i386" ] || [ "$2" = "lpia" ] && [ -z "$personality" ];
then then
@ -204,13 +201,14 @@ fi
SRC_TYPE="union" SRC_TYPE="union"
SCHROOT_CONF_TYPE="directory" SCHROOT_CONF_TYPE="directory"
CHROOT_NAME="${name}${arch_suffix}" # By default, use the native architecture.
HOST_ARCH=$(dpkg --print-architecture) HOST_ARCH=$(dpkg --print-architecture)
if [ -z "$CHROOT_ARCH" ]; then if [ -z "$CHROOT_ARCH" ]; then
CHROOT_ARCH=$HOST_ARCH CHROOT_ARCH="$HOST_ARCH"
fi fi
CHROOT_NAME="${name}-${CHROOT_ARCH}"
# Load customizations # Load customizations
if [ -r ~/.mk-sbuild.rc ]; then if [ -r ~/.mk-sbuild.rc ]; then
. ~/.mk-sbuild.rc . ~/.mk-sbuild.rc
@ -227,7 +225,7 @@ case "$SRC_TYPE" in
fi fi
# Set up some variables for use in the paths and names # Set up some variables for use in the paths and names
CHROOT_LV="${name}_chroot${arch_suffix}" CHROOT_LV="${name}_chroot-${CHROOT_ARCH}"
CHROOT_PATH="/dev/$VG/$CHROOT_LV" CHROOT_PATH="/dev/$VG/$CHROOT_LV"
# Does the specified VG exist? (vgdisplay doesn't set error codes...) # Does the specified VG exist? (vgdisplay doesn't set error codes...)
if [ `sudo vgdisplay -c "$VG" | wc -l` -eq 0 ]; then if [ `sudo vgdisplay -c "$VG" | wc -l` -eq 0 ]; then
@ -362,7 +360,7 @@ case "$SRC_TYPE" in
esac esac
# debootstrap the chroot # debootstrap the chroot
sudo $DEBOOTSTRAP_COMMAND $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}" sudo "$DEBOOTSTRAP_COMMAND" --arch="$CHROOT_ARCH" $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}"
# Update the package sources # Update the package sources
TEMP_SOURCES=`mktemp -t sources-XXXXXX` TEMP_SOURCES=`mktemp -t sources-XXXXXX`