[PATCH] Allow preseeding of pbuilder/mirrorsite. Closes: #598316
Matt Palmer
mpalmer at hezmatt.org
Mon Dec 13 20:55:47 UTC 2010
As far as I can tell, the db_set calls all through pbuilder.config were
mostly to get around the default value -- but there's no need for it, given
that it will be set correctly if we're non-interactive anyway.
I've tested this patch in all the different ways I can think of, to exercise
all the code paths, and it works in the way I'd expect (a sensible-looking,
valid mirror is set). Absent a formal test plan, I can't be any more
confident that it does the right thing in all situations.
---
debian/pbuilder.config | 6 ------
debian/pbuilder.templates | 1 -
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/debian/pbuilder.config b/debian/pbuilder.config
index 999949c..e07db08 100755
--- a/debian/pbuilder.config
+++ b/debian/pbuilder.config
@@ -35,8 +35,6 @@ 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"
@@ -48,12 +46,8 @@ case "$1" in
# 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
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.
.
--
1.5.6.5
--yEPQxsgoJgBvi8ip--
More information about the Pbuilder-maint
mailing list