aboutsummaryrefslogtreecommitdiff
path: root/debian/pbuilder.postinst
diff options
context:
space:
mode:
authorEddy Petrișor <eddy.petrisor@gmail.com>2008-03-06 03:07:57 +0200
committerEddy Petrișor <eddy.petrisor@gmail.com>2008-03-06 03:07:57 +0200
commit6cd901f82dcf29fcb50fa4e5c4a315e17d91132e (patch)
tree52a37b453053d8c75d354c49b19ff24d86308ea3 /debian/pbuilder.postinst
parent44af0f8bf06c6c37019ce5e8d56219826f7af3a9 (diff)
downloadpbuilder-6cd901f82dcf29fcb50fa4e5c4a315e17d91132e.tar
pbuilder-6cd901f82dcf29fcb50fa4e5c4a315e17d91132e.tar.gz
If there's no MIRRORSITE line in the pbuilderrc, add one
If, when parsing the current existing pbuilderrc file, no MIRRORSITE setting is found, fall back to autodetection. Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Diffstat (limited to 'debian/pbuilder.postinst')
-rwxr-xr-xdebian/pbuilder.postinst5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst
index 8665c49..ae1cb3d 100755
--- a/debian/pbuilder.postinst
+++ b/debian/pbuilder.postinst
@@ -38,6 +38,11 @@ case "$1" in
# make sure latter calls do not overwrite stuff silently
db_set pbuilder/rewrite "false"
+ else
+ # no MIRRORSITE line found in the pbuilderrc file
+ echo "MIRRORSITE=$PLACEHOLDER" >> "$CONFFILE"
+ MIRRORSITE=""
+ db_set pbuilder/mirrorsite ""
fi
else
echo "MIRRORSITE=$PLACEHOLDER" > "$CONFFILE"