diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-01-11 06:31:44 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-01-11 06:31:44 +0100 |
commit | 920344fe59ae3c2ec27c3c21d6588c4f05bbae88 (patch) | |
tree | 0d9f66a8c60caafbc3465041261ceb3c66801079 /scripts/live-build-config | |
parent | 522ebc6250d5fd007c199396cbd046dd7134de8d (diff) | |
download | vyos-build-920344fe59ae3c2ec27c3c21d6588c4f05bbae88.tar.gz vyos-build-920344fe59ae3c2ec27c3c21d6588c4f05bbae88.zip |
Add some debugging capabilities to the build scripts.
Diffstat (limited to 'scripts/live-build-config')
-rwxr-xr-x | scripts/live-build-config | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/live-build-config b/scripts/live-build-config index 1880be39..544c67e8 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -60,11 +60,19 @@ lb config noauto \ with open(defaults.BUILD_CONFIG, 'r') as f: build_config = json.load(f) +debug = build_config['debug'] + # 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: +apt_file = os.path.join(defaults.BUILD_DIR, defaults.VYOS_REPO_FILE) + +if debug: + print("Adding these entries to {0}:".format(apt_file)) + print("\t", vyos_repo_entry) + +with open(apt_file, 'w') as f: f.write(vyos_repo_entry) # Configure live-build @@ -72,8 +80,8 @@ with open(os.path.join(defaults.BUILD_DIR, defaults.VYOS_REPO_FILE), 'w') as f: lb_config_command = pystache.render(lb_config_tmpl, build_config) print("Configuring live-build") -os.chdir(defaults.BUILD_DIR) +os.chdir(defaults.BUILD_DIR) result = os.system(lb_config_command) if result > 0: print("live-build config failed") |