diff options
author | Christian Breunig <christian@breunig.cc> | 2025-05-12 18:15:05 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2025-05-12 20:45:52 +0200 |
commit | 73df823da16546ab3a498d137fcf96e09a5ba896 (patch) | |
tree | ed59bc144745d9a61dd4c738deef22f0e7d1506f /scripts/package-build/linux-kernel/build.py | |
parent | 63f3ae10b05c90cad73a2ef3210c558e4daf74ec (diff) | |
download | vyos-build-73df823da16546ab3a498d137fcf96e09a5ba896.tar.gz vyos-build-73df823da16546ab3a498d137fcf96e09a5ba896.zip |
Docker: T7253: remove Kernel build dependencies to shrink container image
Move the Kernel build dependencies to package.toml to unbload the build
container even more.
Diffstat (limited to 'scripts/package-build/linux-kernel/build.py')
-rwxr-xr-x | scripts/package-build/linux-kernel/build.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/package-build/linux-kernel/build.py b/scripts/package-build/linux-kernel/build.py index af610079..6fa6af35 100755 --- a/scripts/package-build/linux-kernel/build.py +++ b/scripts/package-build/linux-kernel/build.py @@ -37,6 +37,7 @@ def ensure_dependencies(dependencies: list) -> None: return print("I: Ensure Debian build dependencies are met") + run(['sudo', 'apt-get', 'update'], check=True) run(['sudo', 'apt-get', 'install', '-y'] + dependencies, check=True) @@ -112,9 +113,6 @@ def build_package(package: dict, dependencies: list) -> None: # Clone or update the repository #clone_or_update_repo(repo_dir, package['scm_url'], package['commit_id']) - # Ensure dependencies - #ensure_dependencies(dependencies) - # Prepare the package if required #if package.get('prepare_package', False): # prepare_package(repo_dir, package.get('install_data', '')) @@ -275,6 +273,11 @@ if __name__ == '__main__': with open(defaults_path, 'r') as file: defaults = toml.load(file) + # Load global dependencies + global_dependencies = config.get('dependencies', {}).get('packages', []) + if global_dependencies: + ensure_dependencies(global_dependencies) + packages = config['packages'] # Filter packages if specific packages are specified in the arguments |