mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-09 07:51:28 +00:00
Understand Debian distribution synonyms, and store the chroot under the
code name.
This commit is contained in:
parent
dceda81ff2
commit
7212902eb8
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
ubuntu-dev-tools (0.123) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.124) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* mk-sbuild:
|
* mk-sbuild:
|
||||||
- Disable daemons with a policy-rc.d script (like pbuilder does)
|
- Disable daemons with a policy-rc.d script (like pbuilder does)
|
||||||
@ -9,8 +9,10 @@ ubuntu-dev-tools (0.123) UNRELEASED; urgency=low
|
|||||||
- Install qemu-user-static instead of qemu-kvm-extras-static.
|
- Install qemu-user-static instead of qemu-kvm-extras-static.
|
||||||
- Correctly substitute release into security suite name.
|
- Correctly substitute release into security suite name.
|
||||||
- Put schroot configuration in chroot.d/sbuild-$chroot (LP: #736808)
|
- Put schroot configuration in chroot.d/sbuild-$chroot (LP: #736808)
|
||||||
|
- Understand Debian distribution synonyms, and store the chroot under the
|
||||||
|
code name.
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@debian.org> Sun, 24 Apr 2011 12:45:31 +0200
|
-- Stefano Rivera <stefanor@debian.org> Sun, 24 Apr 2011 20:35:51 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.122) unstable; urgency=low
|
ubuntu-dev-tools (0.122) unstable; urgency=low
|
||||||
|
|
||||||
|
51
mk-sbuild
51
mk-sbuild
@ -226,24 +226,48 @@ if [ -z "$RELEASE" ]; then
|
|||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine distribution
|
# Determine distribution and possible synonyms
|
||||||
if [ -z "$DISTRO" ]; then
|
synonym=""
|
||||||
if debian-distro-info --all | grep -Fqx "$RELEASE"; then
|
if debian-distro-info --all | grep -Fqx "$RELEASE"; then
|
||||||
DISTRO=debian
|
DISTRO="${DISTRO:-debian}"
|
||||||
|
if [ "$RELEASE" = $(debian-distro-info --devel) ]; then
|
||||||
|
synonym=unstable
|
||||||
|
elif [ "$RELEASE" = $(debian-distro-info --testing) ]; then
|
||||||
|
synonym=testing
|
||||||
|
elif [ "$RELEASE" = $(debian-distro-info --stable) ]; then
|
||||||
|
synonym=stable
|
||||||
|
elif [ "$RELEASE" = $(debian-distro-info --old) ]; then
|
||||||
|
synonym=oldstable
|
||||||
|
fi
|
||||||
elif ubuntu-distro-info --all | grep -Fqx "$RELEASE"; then
|
elif ubuntu-distro-info --all | grep -Fqx "$RELEASE"; then
|
||||||
DISTRO=ubuntu
|
DISTRO="${DISTRO:-ubuntu}"
|
||||||
elif [ "$RELEASE" = "unstable" -o "$RELEASE" = "testing" \
|
elif [ "$RELEASE" = "unstable" ]; then
|
||||||
-o "$RELEASE" = "stable" -o "$RELEASE" = "oldstable" ]; then
|
DISTRO="${DISTRO:-debian}"
|
||||||
DISTRO=debian
|
synonym="$RELEASE"
|
||||||
else
|
RELEASE=$(debian-distro-info --devel)
|
||||||
|
elif [ "$RELEASE" = "testing" ]; then
|
||||||
|
DISTRO="${DISTRO:-debian}"
|
||||||
|
synonym="$RELEASE"
|
||||||
|
RELEASE=$(debian-distro-info --testing)
|
||||||
|
elif [ "$RELEASE" = "stable" ]; then
|
||||||
|
DISTRO="${DISTRO:-debian}"
|
||||||
|
synonym="$RELEASE"
|
||||||
|
RELEASE=$(debian-distro-info --stable)
|
||||||
|
elif [ "$RELEASE" = "oldstable" ]; then
|
||||||
|
DISTRO="${DISTRO:-debian}"
|
||||||
|
synonym="$RELEASE"
|
||||||
|
RELEASE=$(debian-distro-info --old)
|
||||||
|
elif [ -z "$DISTRO" ]; then
|
||||||
echo "Unable to determine distribution, please provide --distro" >&2
|
echo "Unable to determine distribution, please provide --distro" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# By default, name the schroot the same as the release
|
# By default, name the schroot the same as the release
|
||||||
if [ -z "$name" ]; then
|
if [ -z "$name" ]; then
|
||||||
name="$RELEASE"
|
name="$RELEASE"
|
||||||
|
else
|
||||||
|
# Disable synonym when a custom name is used:
|
||||||
|
synonym=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# By default, use the native architecture.
|
# By default, use the native architecture.
|
||||||
@ -254,6 +278,12 @@ fi
|
|||||||
|
|
||||||
CHROOT_NAME="${name}-${CHROOT_ARCH}"
|
CHROOT_NAME="${name}-${CHROOT_ARCH}"
|
||||||
|
|
||||||
|
if [ -z "$synonym" ]; then
|
||||||
|
CHROOT_SYNONYM=""
|
||||||
|
else
|
||||||
|
CHROOT_SYNONYM="${synonym}-${CHROOT_ARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Load customizations
|
# Load customizations
|
||||||
if [ -r ~/.mk-sbuild.rc ]; then
|
if [ -r ~/.mk-sbuild.rc ]; then
|
||||||
. ~/.mk-sbuild.rc
|
. ~/.mk-sbuild.rc
|
||||||
@ -548,6 +578,9 @@ fi
|
|||||||
if [ ! -z "$personality" ]; then
|
if [ ! -z "$personality" ]; then
|
||||||
echo "personality=$personality" >> "$TEMP_SCHROOTCONF"
|
echo "personality=$personality" >> "$TEMP_SCHROOTCONF"
|
||||||
fi
|
fi
|
||||||
|
if [ ! -z "$CHROOT_SYNONYM" ]; then
|
||||||
|
echo "aliases=$CHROOT_SYNONYM" >> "$TEMP_SCHROOTCONF"
|
||||||
|
fi
|
||||||
if [ ! -z "$SCHROOT_CONF_SUFFIX" ]; then
|
if [ ! -z "$SCHROOT_CONF_SUFFIX" ]; then
|
||||||
echo "$SCHROOT_CONF_SUFFIX" >> "$TEMP_SCHROOTCONF"
|
echo "$SCHROOT_CONF_SUFFIX" >> "$TEMP_SCHROOTCONF"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user