diff --git a/.pipelines/containerSourceData/scripts/BuildNvidiaDriverContainers.sh b/.pipelines/containerSourceData/scripts/BuildNvidiaDriverContainers.sh index 6ebf949be71..7a5ef0e688d 100644 --- a/.pipelines/containerSourceData/scripts/BuildNvidiaDriverContainers.sh +++ b/.pipelines/containerSourceData/scripts/BuildNvidiaDriverContainers.sh @@ -163,11 +163,11 @@ function get_packages_to_install { } function get_component_name_and_version { - echo "+++ Get Component name and version" + echo "+++ Get Component name and version..." COMPONENT="$IMAGE" echo "Component name -> $COMPONENT" - COMPONENT_VERSION=$(rpm -q --qf '%{VERSION}-%{release}\n' -p $HOST_MOUNTED_DIR/RPMS/x86_64/$IMAGE* | rev | cut -d '.' -f 2- | rev) + COMPONENT_VERSION=$(rpm -q --qf '%{VERSION}-%{release}\n' -p $HOST_MOUNTED_DIR/RPMS/x86_64/$IMAGE-[0-9]* | rev | cut -d '.' -f 2- | rev) echo "Component Version -> $COMPONENT_VERSION" }