From efef7546ddc59b99fda86ecb9bf0adb14e9afe69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 9 Sep 2026 20:10:23 -0300 Subject: [PATCH] fix(ospkgs): report a failed cuda package install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both cuda install blocks read the package manager status after they had restored and exported ARCH, so R was always 0 and a failed cuda install left the node reporting success. The status is now read directly after the install on the apt path and on the yum and dnf path. Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT/postscripts/ospkgs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/ospkgs b/xCAT/postscripts/ospkgs index fb23ab952b..2900a92c07 100755 --- a/xCAT/postscripts/ospkgs +++ b/xCAT/postscripts/ospkgs @@ -871,10 +871,10 @@ elif ( pmatch "$OSVER" "ubuntu*" ); then original_arch=$ARCH unset ARCH eval $command + R=$? # re declare the ARCH env after installing cuda command done ARCH=$original_arch export ARCH - R=$? if [ $R -ne 0 ]; then RETURNVAL=$R fi @@ -997,10 +997,10 @@ else original_arch=$ARCH unset ARCH result=`eval $cmd 2>&1` + R=$? # re declare the ARCH env after installing cuda command done ARCH=$original_arch export ARCH - R=$? if [ $R -ne 0 ]; then RETURNVAL=$R logger -t $log_label -p local4.info "ospkgs: $cmd\n $result"