diff --git a/emacs.spec b/emacs.spec index 7af2440..48f6e1e 100644 --- a/emacs.spec +++ b/emacs.spec @@ -575,6 +575,11 @@ fi %posttrans lucid /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-lucid 70 || : +# The preun scriptlet of packages before 29.4-5 will remove this symlink +# after it has been installed, so we may need to put it back: +if [ $1 = 2 && ! -h %{_bindir}/emacs-lucid ]; then + ln -s %emacs-%{version}-nw %{_bindir}/emacs-lucid +fi %preun gtk+x11 if [ $1 = 0 ]; then @@ -583,6 +588,11 @@ fi %posttrans gtk+x11 /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-gtk+x11 75 || : +# The preun scriptlet of packages before 29.4-5 will remove this symlink +# after it has been installed, so we may need to put it back: +if [ $1 = 2 && ! -h %{_bindir}/emacs-gtk+x11 ]; then + ln -s %emacs-%{version}-nw %{_bindir}/emacs-gtk+x11 +fi %preun nw if [ $1 = 0 ]; then @@ -591,6 +601,11 @@ fi %posttrans nw /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || : +# The preun scriptlet of packages before 29.4-5 will remove this symlink +# after it has been installed, so we may need to put it back: +if [ $1 = 2 && ! -h %{_bindir}/emacs-nw ]; then + ln -s %emacs-%{version}-nw %{_bindir}/emacs-nw +fi %preun common if [ $1 = 0 ]; then