mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-19 15:58:25 +00:00
build: nvidia-gpu: Fix cache usage of the headers tarball
Whenever we count on having the headers tarball, we must unpack the cached content into the expected directory, otherwise we'd simply fail, as we've been failing in our CI, at the end of the process where we generate the tarball from the cached components. It's weird to me, sincerely, that the headers tarball end up in such weird place (build/kernel-nvidia-gpu/builddir/), but I'll leave that to Zvonko to figure out whether something better can be done, as the intuit of this PR is simply unblock Kata Containers CI. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -436,15 +436,20 @@ install_cached_kernel_tarball_component() {
|
|||||||
"${extra_tarballs}" \
|
"${extra_tarballs}" \
|
||||||
|| return 1
|
|| return 1
|
||||||
|
|
||||||
if [[ "${kernel_name}" != "kernel"*"-confidential" ]]; then
|
case ${kernel_name} in
|
||||||
return 0
|
"kernel-nvidia-gpu"*"")
|
||||||
fi
|
local kernel_headers_dir=$(get_kernel_headers_dir "${kernel_name}")
|
||||||
|
mkdir -p ${kernel_headers_dir} || true
|
||||||
|
tar xvf ${workdir}/${kernel_name}/builddir/kata-static-${kernel_name}-headers.tar.xz -C "${kernel_headers_dir}" || return 1
|
||||||
|
;;& # fallthrough in the confidential case we need the modules.tar.xz and for every kernel-nvidia-gpu we need the headers
|
||||||
|
"kernel"*"-confidential")
|
||||||
|
local modules_dir=$(get_kernel_modules_dir ${kernel_version} ${kernel_kata_config_version} ${build_target})
|
||||||
|
mkdir -p "${modules_dir}" || true
|
||||||
|
tar xvf "${workdir}/kata-static-${kernel_name}-modules.tar.xz" -C "${modules_dir}" || return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
local modules_dir=$(get_kernel_modules_dir ${kernel_version} ${kernel_kata_config_version} ${build_target})
|
return 0
|
||||||
mkdir -p "${modules_dir}" || true
|
|
||||||
tar xvf "${workdir}/kata-static-${kernel_name}-modules.tar.xz" -C "${modules_dir}" && return 0
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Install kernel asset
|
#Install kernel asset
|
||||||
|
Reference in New Issue
Block a user