From 71b35f8e70d97d797427b5f31fe2ea7b0f16b767 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 21 Oct 2024 10:00:27 +0200 Subject: [PATCH] Fix %postun scriptlet for llvm-devel when upgrading/downgrading The scriptlet tried to run llvm-config-%{maj_ver} when upgrading or downgrading to check if ${maj_ver} has changed. Since postun runs after the package files have been uninstalled this will always fail to run the command. We should run instead llvm-config%{exec_suffix}, which in the case of upgrades or downgrades will still be present, installed from the new package. --- llvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm.spec b/llvm.spec index 590695b..df64349 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1672,7 +1672,7 @@ fi # alternative must be removed in order to give priority to a newly installed # compat package. if [[ $1 -eq 0 - || "x$(%{_bindir}/llvm-config-%{maj_ver} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then + || "x$(%{_bindir}/llvm-config%{exec_suffix} --version | awk -F . '{ print $1 }')" != "x%{maj_ver}" ]]; then %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi %endif