3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-04-22 07:41:08 +00:00

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

@ -6,6 +6,7 @@ ubuntu-dev-tools (0.93) UNRELEASED; urgency=low
[ Emmet Hikory ]
* Support qemu-arm-static -> qemu-kvm-extras-static transition
* mk-sbuild: conditionally install lvm2 only for lv-snapshot schroots
* mk-sbuild: rationalise architecture variables
[ Loïc Minier ]
* 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
(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

@ -137,9 +137,6 @@ while :; do
shift
;;
--arch)
# By default, use the native architecture.
arch_opt="--arch=$2"
arch_suffix="-$2"
CHROOT_ARCH="$2"
if [ "$2" = "i386" ] || [ "$2" = "lpia" ] && [ -z "$personality" ];
then
@ -204,13 +201,14 @@ fi
SRC_TYPE="union"
SCHROOT_CONF_TYPE="directory"
CHROOT_NAME="${name}${arch_suffix}"
# By default, use the native architecture.
HOST_ARCH=$(dpkg --print-architecture)
if [ -z "$CHROOT_ARCH" ]; then
CHROOT_ARCH=$HOST_ARCH
CHROOT_ARCH="$HOST_ARCH"
fi
CHROOT_NAME="${name}-${CHROOT_ARCH}"
# Load customizations
if [ -r ~/.mk-sbuild.rc ]; then
. ~/.mk-sbuild.rc
@ -227,7 +225,7 @@ case "$SRC_TYPE" in
fi
# 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"
# Does the specified VG exist? (vgdisplay doesn't set error codes...)
if [ `sudo vgdisplay -c "$VG" | wc -l` -eq 0 ]; then
@ -362,7 +360,7 @@ case "$SRC_TYPE" in
esac
# 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
TEMP_SOURCES=`mktemp -t sources-XXXXXX`