On one system I have emacs, through the alternatives system, pointing at /usr/bin/emacs-29.3-gtk+x11, on another to /usr/bin/emacs-29.3-nw. In both cases, after updating to emacs-29.3-6.fc40.x86_64, the alternatives were pointing to /usr/bin/emacs-29.3. Both systems had been upgraded from Fedora 39, and in both cases alternatives was used to change the configuration of which emacs to use. In both cases, the old emacs that was installed (after the upgrade to F40) was emacs-29.3-5.fc40.x86_64, and both were updated to emacs-29.3-6.fc40.x86_64 using dnf upgrade. Reproducible: Always Steps to Reproduce: 1.Install Fedoro 40, with emacs-1:29.3-5.fc40.x86_64 2.sudo alternatives --config emacs # select emacs-29.3-gtk+x11 3.update to emacs-1:29.3-6.fc40.x86_64 Similarly for emacs-nw, although you need to install it first. Actual Results: $ ls -l /etc/alternatives/emacs lrwxrwxrwx. 1 root root 19 Apr 29 09:51 /etc/alternatives/emacs -> /usr/bin/emacs-29.3 Expected Results: $ ls -l /etc/alternatives/emacs lrwxrwxrwx. 1 root root 27 Apr 26 10:48 /etc/alternatives/emacs -> /usr/bin/emacs-29.3-gtk+x11
Add a mee too. When I try to run emacs over ssh, it just crashes. $ emacs .gitconfig (emacs:50018): Gtk-WARNING **: 11:53:44.641: cannot open display: (It is not clear to me how I installed emacs-nox several years ago, and now a Gtk version is installed.)
See https://src.fedoraproject.org/rpms/emacs/pull-request/41 for a fix for this issue.
It turns out that this bug was a known side-effect of the fix for bug #684447. From the changelog: * Tue Mar 15 2011 Karel Klic <kklic> - 1:23.3-2 - Another attempt to fix the handling of alternatives (rhbz#684447) The current process loses alternatives preference on every upgrade, but there seems to be no elegant way how to prevent this while having versioned binaries (/bin/emacs-%%{version}) at the same time.
Ah, okay, now I understand. I'll bet the versioned binary thing can be dealt with, though. Let me take another crack at this, and do some testing with versioned upgrades to see if it can be made to work.
I think https://src.fedoraproject.org/rpms/emacs/pull-request/42 should fix this?
FEDORA-2024-cf40c8f40b (emacs-29.4-5.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-cf40c8f40b
FEDORA-2024-cf40c8f40b has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-cf40c8f40b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-cf40c8f40b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-cf40c8f40b (emacs-29.4-5.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
After the update, the alternatives link isn't working at all for the gtk+x11 version. It seems that there should be a symlink emacs-gtk+x11 pointing to the versioned binary, but ther isn't. $ rpm -q emacs emacs-gtk+x11 emacs-29.4-5.fc40.x86_64 emacs-gtk+x11-29.4-5.fc40.x86_64 $ ls -l /etc/alternatives/emacs /usr/bin/emacs* lrwxrwxrwx. 1 root root 22 Jul 11 18:21 /etc/alternatives/emacs -> /usr/bin/emacs-gtk+x11 lrwxrwxrwx. 1 root root 23 Jul 11 18:14 /usr/bin/emacs -> /etc/alternatives/emacs -rwxr-xr-x. 1 root root 33K Jul 8 02:00 /usr/bin/emacsclient -rwxr-xr-x. 1 root root 8.5M Jul 8 02:00 /usr/bin/emacs-29.4-gtk+x11 -rwxr-xr-x. 1 root root 8.2M Jul 8 02:00 /usr/bin/emacs-29.4-pgtk -rwxr-xr-x. 1 root root 445 Jul 8 02:00 /usr/bin/emacs-desktop lrwxrwxrwx. 1 root root 15 Jul 8 02:00 /usr/bin/emacs-pgtk -> emacs-29.4-pgtk $ sudo alternatives --config emacs There are 2 programs which provide 'emacs'. Selection Command ----------------------------------------------- + 1 /usr/bin/emacs-gtk+x11 * 2 /usr/bin/emacs-pgtk Enter to keep the current selection[+], or type selection number: