* mk-sbuild:

-Allow creating experimental chroots again (LP: #885499)
  - experimental shouldn't be the default in experimental chroots.
  - Add --eatmydata flag (LP: #888440)
This commit is contained in:
Stefano Rivera 2011-11-13 01:31:02 +02:00
parent 391e9c7f07
commit 9d493af4b0
2 changed files with 29 additions and 2 deletions

6
debian/changelog vendored
View File

@ -4,8 +4,10 @@ ubuntu-dev-tools (0.136) UNRELEASED; urgency=low
(LP: #881967)
* requestsync: Make --lp the default.
* submittodebian: Use prettier patch filenames (LP: #887333)
* mk-sbuild: Allow creating experimental chroots again (LP: #885499)
* experimental shouldn't be the default in experimental chroots.
* mk-sbuild:
-Allow creating experimental chroots again (LP: #885499)
- experimental shouldn't be the default in experimental chroots.
- Add --eatmydata flag (LP: #888440)
-- Stefano Rivera <stefanor@debian.org> Sat, 12 Nov 2011 23:28:05 +0200

View File

@ -53,6 +53,7 @@ function usage()
echo " --debootstrap-include=list Comma separated list of packages to include"
echo " --debootstrap-exclude=list Comma separated list of packages to exclude"
echo " --debootstrap-proxy=URL Use PROXY as apt proxy"
echo " --eatmydata Install and use eatmydata"
echo " --distro=DISTRO Install specific distro:"
echo " 'ubuntu' or 'debian' "
echo " (defaults to determining from release name)"
@ -72,6 +73,7 @@ function usage()
echo " DEBOOTSTRAP_INCLUDE Included packages (same as --debootstrap-include)"
echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)"
echo " DEBOOTSTRAP_PROXY Apt proxy (same as --debootstrap-proxy)"
echo " EATMYDATA Enable --eatmydata"
echo " TEMPLATE_SOURCES A template for sources.list"
echo " TEMPLATE_SCHROOTCONF A template for schroot.conf stanza"
if [ -z "$1" ]; then
@ -91,6 +93,7 @@ VG=""
DISTRO=""
name=""
proxy="_unset_"
EATMYDATA=0
while :; do
case "$1" in
@ -142,6 +145,10 @@ while :; do
proxy="$2"
shift 2
;;
--eatmydata)
EATMYDATA=1
shift
;;
--distro)
DISTRO="$2"
shift 2
@ -302,6 +309,19 @@ if [ -r ~/.mk-sbuild.rc ]; then
. ~/.mk-sbuild.rc
fi
# Will eatmydata be available?
if [ $EATMYDATA -eq 1 ]; then
case "$RELEASE" in
hardy|lucid|maverick|lenny|squeeze)
echo "eatmydata is known not to be available in $RELEASE, ignoring --eatmydata"
EATMYDATA=0
;;
*)
DEBOOTSTRAP_INCLUDE="${DEBOOTSTRAP_INCLUDE:+$DEBOOTSTRAP_INCLUDE,}eatmydata"
;;
esac
fi
if [ -z "$SCHROOT_TYPE" ]; then
# To build the LV, we need to know which volume group to use
if [ -n "$VG" ]; then
@ -584,6 +604,11 @@ root-groups=$ADMIN_GROUPS
#source-root-groups=$ADMIN_GROUPS
type=SCHROOT_TYPE
EOM
if [ $EATMYDATA -eq 1 ]; then
cat >> "$TEMP_SCHROOTCONF" <<EOM
command-prefix=eatmydata
EOM
fi
case "$SCHROOT_TYPE" in
"lvm-snapshot")
cat >> "$TEMP_SCHROOTCONF" <<EOM