Andreas Beckmann <a...@debian.org> writes: > Install git for emacs > install/git: Handling install of emacsen flavor emacs > install/git: Byte-compiling for emacs > + emacs -batch -q -no-site-file -f batch-byte-compile git.el git-blame.el > /usr/lib/emacsen-common/packages/install/git: 26: emacs: not found > /usr/lib/emacsen-common/packages/install/git emacs failed at > /usr/lib/emacsen-common/lib.pl line 19, <TSORT> line 7. > dpkg: error processing package elpa-magit (--configure): > installed elpa-magit package post-installation script subprocess returned > error exit status 2 > Setting up libm17n-0:i386 (1.8.0-2) ... > Setting up librsvg2-2:i386 (2.50.3+dfsg-1) ... > Setting up librsvg2-common:i386 (2.50.3+dfsg-1) ... > Setting up glib-networking:i386 (2.66.0-2) ... > Setting up libsoup2.4-1:i386 (2.72.0-2) ... > Setting up libsoup-gnome2.4-1:i386 (2.72.0-2) ... > Setting up librest-0.7-0:i386 (0.8.1-1.1) ... > Setting up libgtk-3-0:i386 (3.24.24-3) ... > Setting up libgtk-3-bin (3.24.24-3) ... > Setting up emacs-gtk (1:27.1+1-3) ... > update-alternatives: using /usr/bin/emacs-gtk to provide /usr/bin/emacs > (emacs) in auto mode > update-alternatives: using /usr/bin/emacs to provide /usr/bin/editor > (editor) in auto mode
As far as I can see, the problem is that the setup for elpa-magit and git-el both call "emacs", but that does not exist until the update-alternatives is called. So there seems to be a race condition here where emacs-gtk (or whatever is providing /usr/bin/emacs) needs to run its postinst before any add-on package wanting to do byte compilation. Somewhat to my surprise I could duplicate this failure with $ sudo schroot -r -c test apt install git-el elpa-magit where test is an up to date sid chroot.