mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 23:07:55 +00:00
cache: kernel: Consider changes in tools/packaging/kernel
Any change in the script used to build the kernel should invalidate the cache. Fixes: #7403 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -33,6 +33,7 @@ cache_kernel_artifacts() {
|
||||
local kernel_tarball_name="kata-static-${KERNEL_FLAVOUR}.tar.xz"
|
||||
local current_kernel_image="$(get_kernel_image_name)"
|
||||
local current_kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
|
||||
local kernel_last_commit="$(get_last_modification ${repo_root_dir}/tools/packaging/kernel)"
|
||||
local kernel_modules_tarball_path="${repo_root_dir}/tools/packaging/kata-deploy/local-build/build/kata-static-kernel-sev-modules.tar.xz"
|
||||
|
||||
# The ${vendor}-gpu kernels are based on an already existing entry, and does not require
|
||||
@@ -59,7 +60,7 @@ cache_kernel_artifacts() {
|
||||
;;
|
||||
esac
|
||||
|
||||
create_cache_asset "${kernel_tarball_name}" "${current_kernel_version}-${current_kernel_kata_config_version}" "${current_kernel_image}"
|
||||
create_cache_asset "${kernel_tarball_name}" "${current_kernel_version}-${current_kernel_kata_config_version}-${kernel_last_commit}" "${current_kernel_image}"
|
||||
if [[ "${KERNEL_FLAVOUR}" == "kernel-sev" ]]; then
|
||||
module_dir="${repo_root_dir}/tools/packaging/kata-deploy/local-build/build/kernel-sev/builddir/kata-linux-${current_kernel_version#v}-${current_kernel_kata_config_version}/lib/modules/${current_kernel_version#v}"
|
||||
if [ ! -f "${kernel_modules_tarball_path}" ]; then
|
||||
|
Reference in New Issue
Block a user