diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-11-07 16:43:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 16:43:58 +0000 |
commit | 1b94e4fce8c0135e36c5209109eec8be79cecfeb (patch) | |
tree | a795d4ee61493fde17d52e9e9dea9cc110e84369 /scripts | |
parent | badf55cd2d8bb7c8e2b80d60b48e15e6665128da (diff) | |
parent | f4bfaa9b9782a7b255f9240270e4629711b62f86 (diff) | |
download | vyos-build-1b94e4fce8c0135e36c5209109eec8be79cecfeb.tar.gz vyos-build-1b94e4fce8c0135e36c5209109eec8be79cecfeb.zip |
Merge pull request #278 from jsimpso/current
T4796: Fix some bugs in the build-vyos-image script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-vyos-image | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image index 9bb48ed1..5242a7dd 100755 --- a/scripts/build-vyos-image +++ b/scripts/build-vyos-image @@ -71,7 +71,7 @@ def merge_dicts(source, destination): if key not in tmp: tmp[key] = value elif isinstance(source[key], dict): - tmp[key] = dict_merge(source[key], tmp[key]) + tmp[key] = merge_dicts(source[key], tmp[key]) elif isinstance(source[key], list): tmp[key] = source[key] + tmp[key] else: @@ -206,10 +206,6 @@ if __name__ == "__main__": print("Use --build-type=release option if you want to set version number") sys.exit(1) - if not args['custom_apt_entry']: - args['custom_apt_entry'] = [] - args['custom_apt_entry'] = args['custom_apt_entry'] + build_defaults['additional_repositories'] - ## Inject some useful hardcoded options args['build_dir'] = defaults.BUILD_DIR args['pbuilder_config'] = os.path.join(defaults.BUILD_DIR, defaults.PBUILDER_CONFIG) @@ -385,6 +381,10 @@ if __name__ == "__main__": f.write(vyos_repo_entry) # Add custom APT entries + if not args['custom_apt_entry']: + args['custom_apt_entry'] = [] + if build_config['additional_repositories']: + args['custom_apt_entry'] = args['custom_apt_entry'] + build_config['additional_repositories'] if build_config['custom_apt_entry']: custom_apt_file = defaults.CUSTOM_REPO_FILE entries = "\n".join(build_config['custom_apt_entry']) @@ -397,7 +397,7 @@ if __name__ == "__main__": # Add custom APT keys if has_nonempty_key(build_config, 'custom_apt_key'): - key_dir = ARCHIVES_DIR + key_dir = defaults.ARCHIVES_DIR for k in build_config['custom_apt_key']: dst_name = '{0}.key.chroot'.format(os.path.basename(k)) shutil.copy(k, os.path.join(key_dir, dst_name)) |