wip (fixme)
This commit is contained in:
parent
d1982cbd94
commit
6bd4253bfa
|
@ -12,6 +12,7 @@ import argparse
|
||||||
import configparser
|
import configparser
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -22,7 +23,6 @@ import sys
|
||||||
# * lockfile handling
|
# * lockfile handling
|
||||||
# * use gettext for i18n
|
# * use gettext for i18n
|
||||||
# * debootstrap-options from config/options/debootstrap
|
# * debootstrap-options from config/options/debootstrap
|
||||||
# * take mirrors from config/archives/mirror.{bootstrap,chroot}
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
## Parsing Arguments
|
## Parsing Arguments
|
||||||
|
@ -48,22 +48,24 @@ def main():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
|
||||||
config.read('config/build.conf')
|
config.read('config/build.conf')
|
||||||
|
|
||||||
try:
|
architecture = config.get('build', 'architecture')
|
||||||
architecture = config.get('build', 'Architecture')
|
distribution = config.get('build', 'parent-distribution')
|
||||||
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')
|
|
||||||
|
|
||||||
# --verbose
|
# --verbose
|
||||||
verbose = args.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
|
||||||
debootstrap_options_late = distribution + ' chroot ' + mirror_bootstrap
|
debootstrap_options_late = distribution + ' chroot ' + mirror_bootstrap
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue