aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMatthew Palmer <mpalmer@debian.org>2010-12-15 14:24:29 +1100
committerJunichi Uekawa <dancer@netfort.gr.jp>2012-01-27 07:06:36 +0900
commitc1747f8747dbb17d6688e1db6fc5a5d2b99a15ab (patch)
treebca8741fce15222693eae4797fe6db9154890048 /debian
parent877ed0551853b8c2cfc4c7dfb998b7299dcd0994 (diff)
downloadpbuilder-c1747f8747dbb17d6688e1db6fc5a5d2b99a15ab.tar
pbuilder-c1747f8747dbb17d6688e1db6fc5a5d2b99a15ab.tar.gz
Bug#598316: pbuilder: mirrorsite is not preseedable
tag 598316 +patch usertags 598316 +patch-supplied thanks Attached are three patches fixing the three issues reported in this bug. Hopefully it should be fairly self-explanatory which one is for which. - Matt >From 3631bcda0a9bf0011d02268942ebc7756fd03ada Mon Sep 17 00:00:00 2001 From: Matt Palmer <mpalmer@hezmatt.org> Date: Mon, 13 Dec 2010 17:04:45 +1100 Subject: [PATCH] Allow arbitrary whitespace in sources.list. Ref: #598316 An overly restrictive regex means that people who like very neat sources.list files get penalised. Not any more.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/pbuilder.config10
-rw-r--r--debian/pbuilder.templates1
2 files changed, 2 insertions, 9 deletions
diff --git a/debian/pbuilder.config b/debian/pbuilder.config
index 2e50015..e07db08 100755
--- a/debian/pbuilder.config
+++ b/debian/pbuilder.config
@@ -35,25 +35,19 @@ case "$1" in
else
# no MIRRORSITE line found in the pbuilderrc file
echo "MIRRORSITE=$PLACEHOLDER" >> "$CONFFILE"
- MIRRORSITE=""
- db_set pbuilder/mirrorsite ""
fi
else
cat <<EOF > "$CONFFILE"
# this is your configuration file for pbuilder.
# the file in /usr/share/pbuilder/pbuilderrc is the default template.
-# /etc/pbuilderrc is the one meant for overwritting defaults in
+# /etc/pbuilderrc is the one meant for overwriting defaults in
# the default template
#
# read pbuilderrc.5 document for notes on specific options.
EOF
echo "MIRRORSITE=$PLACEHOLDER" >> "$CONFFILE"
- MIRRORSITE=""
- db_set pbuilder/mirrorsite ""
fi
- db_get pbuilder/mirrorsite
- [ "$RET" = "$PLACEHOLDER" ] && db_set pbuilder/mirrorsite "" || true
db_input medium pbuilder/mirrorsite || [ $? = 30 ]
db_go
@@ -67,7 +61,7 @@ EOF
MIRRORSITE=$(
( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ;
[ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list || true ) \
- | grep -E '^deb (ftp|http):' | head -n 1 | awk '{print $2;}'
+ | grep -E '^deb[[:space:]]+(ftp|http):' | head -n 1 | awk '{print $2;}'
)
while [ -z "$MIRRORSITE" ] ; do
db_input high pbuilder/nomirror || true
diff --git a/debian/pbuilder.templates b/debian/pbuilder.templates
index 3f80003..68440b7 100644
--- a/debian/pbuilder.templates
+++ b/debian/pbuilder.templates
@@ -1,6 +1,5 @@
Template: pbuilder/mirrorsite
Type: string
-Default: http://cdn.debian.net/debian
_Description: Default mirror site:
Please enter the default mirror you want to be used by pbuilder.
.