Move postun alternatives logic to preun

- Move postun alternatives logic to preun
- Related: RHEL-68848
This commit is contained in:
Thomas Fitzsimmons 2024-09-24 18:46:03 -04:00
parent adf8faf24f
commit 86b20e17d5

View File

@ -564,7 +564,7 @@ exit 0
}
%define postun_headless() %{expand:
%define preun_headless() %{expand:
if [ "x$debug" == "xtrue" ] ; then
set -x
fi
@ -681,7 +681,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
exit 0
}
%define postun_devel() %{expand:
%define preun_devel() %{expand:
if [ "x$debug" == "xtrue" ] ; then
set -x
fi
@ -692,7 +692,12 @@ then
alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
fi
}
%define postun_devel() %{expand:
if [ "x$debug" == "xtrue" ] ; then
set -x
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :
if [ $1 -eq 0 ] ; then
@ -731,7 +736,7 @@ fi
exit 0
}
%define postun_javadoc() %{expand:
%define preun_javadoc() %{expand:
if [ "x$debug" == "xtrue" ] ; then
set -x
fi
@ -770,7 +775,7 @@ fi
exit 0
}
%define postun_javadoc_zip() %{expand:
%define preun_javadoc_zip() %{expand:
if [ "x$debug" == "xtrue" ] ; then
set -x
fi
@ -2255,8 +2260,8 @@ done
%postun
%{postun_script %{nil}}
%postun headless
%{postun_headless %{nil}}
%preun headless
%{preun_headless %{nil}}
%posttrans
%{posttrans_script %{nil}}
@ -2267,6 +2272,9 @@ done
%post devel
%{post_devel %{nil}}
%preun devel
%{preun_devel %{nil}}
%postun devel
%{postun_devel %{nil}}
@ -2276,14 +2284,14 @@ done
%posttrans javadoc
%{alternatives_javadoc_install %{nil}}
%postun javadoc
%{postun_javadoc %{nil}}
%preun javadoc
%{preun_javadoc %{nil}}
%posttrans javadoc-zip
%{alternatives_javadoczip_install %{nil}}
%postun javadoc-zip
%{postun_javadoc_zip %{nil}}
%preun javadoc-zip
%{preun_javadoc_zip %{nil}}
%endif
%if %{include_debug_build}
@ -2299,8 +2307,8 @@ done
%postun slowdebug
%{postun_script -- %{debug_suffix_unquoted}}
%postun headless-slowdebug
%{postun_headless -- %{debug_suffix_unquoted}}
%preun headless-slowdebug
%{preun_headless -- %{debug_suffix_unquoted}}
%posttrans slowdebug
%{posttrans_script -- %{debug_suffix_unquoted}}
@ -2308,6 +2316,9 @@ done
%post devel-slowdebug
%{post_devel -- %{debug_suffix_unquoted}}
%preun devel-slowdebug
%{preun_devel -- %{debug_suffix_unquoted}}
%postun devel-slowdebug
%{postun_devel -- %{debug_suffix_unquoted}}
@ -2325,8 +2336,8 @@ done
%postun fastdebug
%{postun_script -- %{fastdebug_suffix_unquoted}}
%postun headless-fastdebug
%{postun_headless -- %{fastdebug_suffix_unquoted}}
%preun headless-fastdebug
%{preun_headless -- %{fastdebug_suffix_unquoted}}
%posttrans fastdebug
%{posttrans_script -- %{fastdebug_suffix_unquoted}}
@ -2337,6 +2348,9 @@ done
%post devel-fastdebug
%{post_devel -- %{fastdebug_suffix_unquoted}}
%preun devel-fastdebug
%{preun_devel -- %{fastdebug_suffix_unquoted}}
%postun devel-fastdebug
%{postun_devel -- %{fastdebug_suffix_unquoted}}
@ -2443,6 +2457,7 @@ done
- Set rpmrelease to 4
- Remove copy-jdk-configs logic
- Remove alternatives removal special handling
- Move postun alternatives logic to preun
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:21.0.5.0.11-2.1
- Bump release for October 2024 mass rebuild: