summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2014-08-26 23:50:19 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2014-08-26 23:50:30 +0200
commit6bd4253bfae5785503c41a830d9c12926ef65ca9 (patch)
tree45ee0efc2dd1c868fa69a692d9f8bc294b27023d
parentd1982cbd9458138f94b197b29df505d4e8e88533 (diff)
downloadvyos-live-build-tmp-python.tar.gz
vyos-live-build-tmp-python.zip
wip (fixme)tmp-python
-rwxr-xr-xcomponents/bootstrap-debootstrap24
1 files changed, 13 insertions, 11 deletions
diff --git a/components/bootstrap-debootstrap b/components/bootstrap-debootstrap
index 01df273e1..c11fc1fd0 100755
--- a/components/bootstrap-debootstrap
+++ b/components/bootstrap-debootstrap
@@ -12,6 +12,7 @@ import argparse
import configparser
import glob
import os
+import re
import shutil
import subprocess
import sys
@@ -22,7 +23,6 @@ import sys
# * lockfile handling
# * use gettext for i18n
# * debootstrap-options from config/options/debootstrap
-# * take mirrors from config/archives/mirror.{bootstrap,chroot}
def main():
## Parsing Arguments
@@ -48,22 +48,24 @@ def main():
sys.exit(1)
config = configparser.ConfigParser()
-
config.read('config/build.conf')
- try:
- architecture = config.get('build', 'Architecture')
- archive_areas = config.get('build', 'Parent-Archive-Areas')
- distribution = config.get('build', 'Parent-Distribution')
- mirror_bootstrap = config.get('build', 'Parent-Mirror-Bootstrap')
- except:
- archive_areas = config.get('build', 'Archive-Areas')
- distribution = config.get('build', 'Distribution')
- mirror_bootstrap = config.get('build', 'Mirror-Bootstrap')
+ architecture = config.get('build', 'architecture')
+ distribution = config.get('build', 'parent-distribution')
# --verbose
verbose = args.verbose
+ # mirror-bootstrap
+ f = open('config/build.conf', 'r')
+
+ for line in f:
+ if re.match('^deb ', line):
+ mirror_bootstrap = line
+ break
+
+ f.close()
+
# --debootstrap-options
debootstrap_options_late = distribution + ' chroot ' + mirror_bootstrap