aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorEddy Petrișor <eddy.petrisor@gmail.com>2008-03-06 01:57:04 +0200
committerEddy Petrișor <eddy.petrisor@gmail.com>2008-03-06 02:10:30 +0200
commit922da87bc9013abaebe890aedba905a6149347c9 (patch)
tree2adef56263327fe15106a55d664089a6d5ee784b /debian
parentb00822d6d98691b2d60103fd1ccc61498b6cf503 (diff)
downloadpbuilder-922da87bc9013abaebe890aedba905a6149347c9.tar
pbuilder-922da87bc9013abaebe890aedba905a6149347c9.tar.gz
Better default placeholder URL; Create minimalistic pbuilderrc files
Use http://you-have-broken-debconf-configuration.example.com/ as a default place-holder instead of the possiblly confusing _ No longer create large /etc/pbuilderrc files, instead create a minimal file which contains just the MIRRORSITE definition since pbuilder sources the default options, so there's only need for overrides. Thanks Junichi for clearing that up. Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/pbuilder.postinst10
-rw-r--r--debian/pbuilder.templates2
2 files changed, 6 insertions, 6 deletions
diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst
index 9d5a529..d55b5c1 100755
--- a/debian/pbuilder.postinst
+++ b/debian/pbuilder.postinst
@@ -24,6 +24,7 @@ case "$1" in
configure)
CONFFILE=/etc/pbuilderrc
+ PLACEHOLDER='http://you-have-broken-debconf-configuration.example.com/'
# if there is a custom file, then we shouldn't touch it
if [ -f "$CONFFILE" ] ; then
@@ -36,23 +37,22 @@ case "$1" in
[ "$RET" = "true" ] || exit 0
fi
else
- # TODO: try creating a file only with the MIRRORSITE line
- cp "/usr/share/doc/pbuilder/examples/pbuilderrc" "$CONFFILE"
+ echo "MIRRORSITE=$PLACEHOLDER" > "$CONFFILE"
MIRRORSITE=""
db_set pbuilder/mirrorsite ""
fi
db_get pbuilder/mirrorsite
- [ "$RET" = "_" ] && db_set pbuilder/mirrorsite "" || true
+ [ "$RET" = "$PLACEHOLDER" ] && db_set pbuilder/mirrorsite "" || true
db_input medium pbuilder/mirrorsite || [ $? = 30 ]
db_go
db_get pbuilder/mirrorsite
MIRRORSITE="$RET"
- # the "_" alternative is just a safety net,
+ # the "$PLACEHOLDER" alternative is just a safety net,
# but that should really never happen
- if [ -z "$MIRRORSITE" ] || [ "$MIRRORSITE" = "_" ] ; then
+ if [ -z "$MIRRORSITE" ] || [ "$MIRRORSITE" = "$PLACEHOLDER" ] ; then
SRCLISTDIR=/etc/apt/sources.list.d
MIRRORSITE=$(
( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ;
diff --git a/debian/pbuilder.templates b/debian/pbuilder.templates
index 1b8f0ed..e160b3d 100644
--- a/debian/pbuilder.templates
+++ b/debian/pbuilder.templates
@@ -1,6 +1,6 @@
Template: pbuilder/mirrorsite
Type: string
-Default: _
+Default: http://you-have-broken-debconf-configuration.example.com/
_Description: Default mirror site:
Please enter the default mirror you want to be used by pbuilder.
.