Skip to content
Snippets Groups Projects

Draft: Add kernel variant to the JSON Index

Files
8
@@ -98,7 +98,7 @@ def upload_new_files(path_temp, files):
return f"got {count} file(s)"
def upload_finish(session, image, path_temp, dir_name):
def upload_finish(session, image, path_temp, dir_name, kernel):
# Create target dir
path = bpo.images.path(image.branch, image.device, image.ui, dir_name)
os.makedirs(path, exist_ok=True)
@@ -123,7 +123,7 @@ def upload_finish(session, image, path_temp, dir_name):
# Generate HTML files (for all dirs in the images path, including the path
# of this image and its potentially new parent directories)
bpo.ui.images.write_index_all()
bpo.ui.images.write_index_all(kernel)
# Start next build job
bpo.repo.build()
@@ -137,6 +137,7 @@ def job_callback_build_image():
device = bpo.api.get_header(request, "Device")
dir_name = get_dir_name(request)
job_id = bpo.api.get_header(request, "Job-Id")
kernel = bpo.api.get_header(request, "Kernel")
ui = bpo.api.get_header(request, "Ui")
session = bpo.db.session()
@@ -148,4 +149,4 @@ def job_callback_build_image():
if files:
return upload_new_files(path_temp, files)
return upload_finish(session, image, path_temp, dir_name)
return upload_finish(session, image, path_temp, dir_name, kernel)
Loading