summaryrefslogtreecommitdiff
path: root/scripts/package-build/linux-kernel/build.py
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 08:15:22 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 08:15:22 +0000
commit9055e9bae11c66b41e8c18f59e99dda7df5c2d0a (patch)
treea082bb02ba891d636361215ba35c78344312e436 /scripts/package-build/linux-kernel/build.py
parentae3e89deeaf80eb2457aa9235e19e9da1fb2f1ad (diff)
downloadvyos-build-9055e9bae11c66b41e8c18f59e99dda7df5c2d0a.tar.gz
vyos-build-9055e9bae11c66b41e8c18f59e99dda7df5c2d0a.zip
T6674: build-kernel: Get kernel version from the defatults
Get kernel version from the vyos-build/data/defaults.toml for buld 'linux-kernel' and related packages Retrun the original build-jool.py script
Diffstat (limited to 'scripts/package-build/linux-kernel/build.py')
-rwxr-xr-xscripts/package-build/linux-kernel/build.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/package-build/linux-kernel/build.py b/scripts/package-build/linux-kernel/build.py
index 41652c71..1bcab686 100755
--- a/scripts/package-build/linux-kernel/build.py
+++ b/scripts/package-build/linux-kernel/build.py
@@ -26,6 +26,9 @@ from argparse import ArgumentParser
from pathlib import Path
from subprocess import run, CalledProcessError
+# Relative path to defaults.toml
+defaults_path = "../../../data/defaults.toml"
+
def ensure_dependencies(dependencies: list) -> None:
"""Ensure Debian build dependencies are met"""
@@ -211,7 +214,9 @@ if __name__ == '__main__':
config = toml.load(file)
# Extract defaults and packages
- defaults = config.get('defaults', {})
+ with open(defaults_path, 'r') as file:
+ defaults = toml.load(file)
+
packages = config['packages']
# Filter packages if specific packages are specified in the arguments