From 49181d2c9b12026016142ae558f5b997f4e53569 Mon Sep 17 00:00:00 2001 From: Jan Hutar Date: Mon, 5 Aug 2024 10:57:08 +0200 Subject: [PATCH] feat(KONFLUX-3933): Use rpm to get the value faster Signed-off-by: Jan Hutar --- training/nvidia-bootc/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/training/nvidia-bootc/Containerfile b/training/nvidia-bootc/Containerfile index 233fa7bb..d8be5fa8 100644 --- a/training/nvidia-bootc/Containerfile +++ b/training/nvidia-bootc/Containerfile @@ -23,8 +23,8 @@ WORKDIR /home/builder COPY --chown=1001:0 x509-configuration.ini x509-configuration.ini RUN if [ "${KERNEL_VERSION}" == "" ]; then \ - RELEASE=$(dnf info --installed kernel-core | awk -F: '/^Release/{print $2}' | tr -d '[:blank:]') \ - && VERSION=$(dnf info --installed kernel-core | awk -F: '/^Version/{print $2}' | tr -d '[:blank:]') \ + RELEASE=$(rpm -q kernel-core --qf="%{RELEASE}") \ + && VERSION=$(rpm -q kernel-core --qf="%{VERSION}") \ && export KERNEL_VERSION="${VERSION}-${RELEASE}" ;\ fi \ && if [ "${OS_VERSION_MAJOR}" == "" ]; then \