diff options
Diffstat (limited to 'scripts/build-config')
-rwxr-xr-x | scripts/build-config | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/build-config b/scripts/build-config index 542c4665..f04dcb3f 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -23,7 +23,9 @@ def get_default_build_by(): options = { 'architecture': ('Image target architecture (amd64 or i586)', lambda: 'amd64', lambda x: x in ['amd64', 'i586']), - 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None) + 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), + 'debian-mirror': ('Debian repository mirror for ISO build', lambda: defaults.DEBIAN_MIRROR, None), + 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: defaults.DEBIAN_MIRROR, None) } # Create the option parser @@ -42,8 +44,14 @@ for k, v in args.items(): print("{v} is not a valid value for --{o} option".format(o=key, v=v)) sys.exit(1) -# Save to file +# Some fixup for mirror settings. +# The idea is: if --debian-mirror is specified but --pbuilder-debian-mirror is not, +# use the --debian-mirror value for both lb and pbuilder bootstrap +if (args['debian_mirror'] != defaults.DEBIAN_MIRROR) and \ + (args['pbuilder_debian_mirror'] == defaults.DEBIAN_MIRROR): + args['pbuilder_debian_mirror'] = args['debian-mirror'] +# Save to file distutils.dir_util.mkpath(defaults.BUILD_DIR) with open(defaults.BUILD_CONFIG, 'w') as f: |