summaryrefslogtreecommitdiff
path: root/scripts/live-build-config
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-01-11 05:57:57 +0100
committerDaniil Baturin <daniil@baturin.org>2018-01-11 06:31:21 +0100
commit522ebc6250d5fd007c199396cbd046dd7134de8d (patch)
tree7539f67dd6adfe320e019b24ab3ab9cff7ee830d /scripts/live-build-config
parent81cacb0a31a45e1eb501dd7a004ad1074fc59b1d (diff)
downloadvyos-build-522ebc6250d5fd007c199396cbd046dd7134de8d.tar.gz
vyos-build-522ebc6250d5fd007c199396cbd046dd7134de8d.zip
T519: make VyOS package mirror configurable.
Diffstat (limited to 'scripts/live-build-config')
-rwxr-xr-xscripts/live-build-config11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/live-build-config b/scripts/live-build-config
index e0924f93..1880be39 100755
--- a/scripts/live-build-config
+++ b/scripts/live-build-config
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2015 VyOS maintainers and contributors
+# Copyright (C) 2018 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -60,6 +60,15 @@ lb config noauto \
with open(defaults.BUILD_CONFIG, 'r') as f:
build_config = json.load(f)
+# Add the additional repositories to package lists
+print("Setting up additional APT entries")
+vyos_repo_entry = "deb {0} {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch'])
+
+with open(os.path.join(defaults.BUILD_DIR, defaults.VYOS_REPO_FILE), 'w') as f:
+ f.write(vyos_repo_entry)
+
+# Configure live-build
+
lb_config_command = pystache.render(lb_config_tmpl, build_config)
print("Configuring live-build")