diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 4bf4299..1557bf7 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -490,16 +490,6 @@ # not-duplicated scriptlets for normal/debug packages %global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%define set_if_needed_alternatives() %{expand: - MASTER="%{?1}" - FAMILY="%{?2}" - ALTERNATIVES_FILE="%{_localstatedir}/lib/rpm-state/$MASTER"_"$FAMILY" - if [ -e "$ALTERNATIVES_FILE" ] ; then - rm "$ALTERNATIVES_FILE" - alternatives --set $MASTER $FAMILY - fi -} - %define post_script() %{expand: update-desktop-database %{_datadir}/applications &> /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -530,17 +520,13 @@ alternatives --install %{_bindir}/java $key %{jrebindir -- %{?1}}/java %{priorit --slave %{_mandir}/man1/rmiregistry.1.gz rmiregistry.1.gz \\ %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1.gz -%{set_if_needed_alternatives $key %{family}} - for X in %{origin} %{javaver} ; do key=jre_"$X" alternatives --install %{_jvmdir}/jre-"$X" $key %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family}} done key=jre_%{javaver}_%{origin} alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jrelnk -- %{?1}} %{priority_for -- %{?1}} -%{set_if_needed_alternatives $key %{family}} } %define post_headless() %{expand: @@ -646,17 +632,13 @@ alternatives --install %{_bindir}/javac $key %{sdkbindir -- %{?1}}/javac %{prior --slave %{_mandir}/man1/serialver.1.gz serialver.1.gz \\ %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1.gz -%{set_if_needed_alternatives $key %{family}} - for X in %{origin} %{javaver} ; do key=java_sdk_"$X" alternatives --install %{_jvmdir}/java-"$X" $key %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family}} done key=java_sdk_%{javaver}_%{origin} alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} $key %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} -%{set_if_needed_alternatives $key %{family}} } %define post_devel() %{expand: @@ -704,16 +686,13 @@ fi for X in %{origin} %{javaver} ; do key=javadocdir_"$X" alternatives --install %{_javadocdir}/java-"$X" $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} done key=javadocdir_%{javaver}_%{origin} alternatives --install %{_javadocdir}/java-%{javaver}-%{origin} $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} key=javadocdir alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} exit 0 } @@ -738,17 +717,14 @@ fi for X in %{origin} %{javaver} ; do key=javadoczip_"$X" alternatives --install %{_javadocdir}/java-"$X".zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} done key=javadoczip_%{javaver}_%{origin} alternatives --install %{_javadocdir}/java-%{javaver}-%{origin}.zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} # Weird legacy filename for backwards-compatibility key=javadoczip alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip %{priority_for -- %{?1}} - %{set_if_needed_alternatives $key %{family_noarch}} exit 0 } @@ -2437,6 +2413,7 @@ done - Remove extra newlines - Inline .gz for alternatives slave man pages - Unwrap alternatives --install lines +- Remove set_if_needed_alternatives * Tue Oct 29 2024 Troy Dawson - 1:21.0.5.0.11-2.1 - Bump release for October 2024 mass rebuild: