mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 09:32:42 +00:00
Fix rhbz #2248872
Ensure the versioned llvm-config alternative gets removed during major upgrades of the non-compat package. Also add code that removes the versioned llvm-config alternatives of the previous 3 LLVM versions. These versions didn't remove their own versioned llvm-config alternative, leading to broken output, e.g. llvm-config-16 points to llvm-config-64 from LLVM 17.
This commit is contained in:
parent
9dcea4c065
commit
1846c73b59
1 changed files with 10 additions and 0 deletions
10
llvm.spec
10
llvm.spec
|
@ -493,6 +493,16 @@ done
|
|||
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
|
||||
%if %{without compat_build}
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
|
||||
|
||||
# During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the
|
||||
# main llvm-devel package was leaving entries in the alternatives system.
|
||||
# Try to remove them now.
|
||||
for v in 14 15 16; do
|
||||
if [[ -e %{_bindir}/llvm-config-$v
|
||||
&& "x$(%{_bindir}/llvm-config-$v --version | awk -F . '{ print $1 }')" != "x$v" ]]; then
|
||||
%{_sbindir}/update-alternatives --remove llvm-config-$v %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||
fi
|
||||
done
|
||||
%endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue