summaryrefslogtreecommitdiff
path: root/scripts/package-build/linux-kernel/build.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-09-09 10:38:59 +0200
committerGitHub <noreply@github.com>2024-09-09 10:38:59 +0200
commitfc3f8317e95db1ff5283007fa363dc5190830c3b (patch)
tree4d1b4de15afeac1c07a61661c1d41f84a22ea3ef /scripts/package-build/linux-kernel/build.py
parentae3e89deeaf80eb2457aa9235e19e9da1fb2f1ad (diff)
parentf7022914d2f7ddafe9e08ce5a772ed2a16c791b5 (diff)
downloadvyos-build-fc3f8317e95db1ff5283007fa363dc5190830c3b.tar.gz
vyos-build-fc3f8317e95db1ff5283007fa363dc5190830c3b.zip
Merge pull request #754 from sever-sever/T6674
T6674: build-kernel: Get kernel version from the defatults
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