Spec File: Use the correct alternatives.

Resolves: #2209151
This commit is contained in:
Nick Clifton 2023-05-23 12:15:27 +01:00
parent a233ff0f8a
commit 34a7a95ddb

View File

@ -9,7 +9,7 @@ BuildRequires: scl-utils-build
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?scl_prefix}binutils Name: %{?scl_prefix}binutils
Version: 2.40 Version: 2.40
Release: 8%{?dist} Release: 9%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -344,8 +344,8 @@ BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc, libstdc++
BuildRequires: elfutils-debuginfod-client-devel BuildRequires: elfutils-debuginfod-client-devel
%endif %endif
Requires(post): %{_sbindir}/alternatives Requires(post): alternatives
Requires(preun): %{_sbindir}/alternatives Requires(preun): alternatives
# We also need rm. # We also need rm.
Requires(post): coreutils Requires(post): coreutils
@ -1104,11 +1104,11 @@ export QA_RPATHS=0x0003
%post %post
%__rm -f %{_bindir}/ld %__rm -f %{_bindir}/ld
%{_sbindir}/alternatives --install %{_bindir}/ld ld \ %{_root_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.bfd %{ld_bfd_priority} %{_bindir}/ld.bfd %{ld_bfd_priority}
%if %{with gold} %if %{with gold}
%{_sbindir}/alternatives --install %{_bindir}/ld ld \ %{_root_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.gold %{ld_gold_priority} %{_bindir}/ld.gold %{ld_gold_priority}
%endif %endif
@ -1123,11 +1123,11 @@ exit 0
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd %{_root_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd
fi fi
%if %{with gold} %if %{with gold}
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.gold %{_root_sbindir}/alternatives --remove ld %{_bindir}/ld.gold
fi fi
%endif %endif
@ -1262,6 +1262,9 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Mon May 22 2023 Marek Polacek <polacek@redhat.com> - 2.40-9
- Spec File: Use the correct alternatives. (#2209151)
* Tue Apr 25 2023 Nick Clifton <nickc@redhat.com> - 2.40-8 * Tue Apr 25 2023 Nick Clifton <nickc@redhat.com> - 2.40-8
- Suppress some s390x linker tests. (#2186396) - Suppress some s390x linker tests. (#2186396)