Subject: bug#56497: Installation of emacs28 package fails

From: Robert Pluim <[email-masked]>
Date: Mon, 11 Jul 2022 18:00:44 +0200

>>>>> On Tue, 12 Jul 2022 00:05:44 +1000, Emily Seville <[email-masked]> said:

    Emily> I've uninstalled emacs package with Emacs 27.1 via sudo apt purge emacs
    Emily> before installation of new Emacs
    Emily> <https://launchpad.net/~kelleyk/+archive/ubuntu/emacs>. After that I've
    Emily> done sudo add-apt-repository ppa:kelleyk/emacs && sudo apt update. At the
    Emily> and I ran sudo apt install emacs28 and obtain the following error (Does it
    Emily> mean that package is broken?):

    Emily> Reading package lists... Done
    Emily> Building dependency tree... Done
    Emily> Reading state information... Done
    Emily> The following packages were automatically installed and are no longer required:
    Emily>   chromium-codecs-ffmpeg-extra emacs-bin-common emacs-common emacs-el
    Emily> emacs-gtk gstreamer1.0-vaapi libgstreamer-plugins-bad1.0-0
    Emily> libjs-modernizr
    Emily>   libjs-requirejs libqt5positioning5 libqt5webchannel5
    Emily> libqt5webengine-data libqt5webenginecore5 libqt5webenginewidgets5
    Emily> libre2-9 ne-doc
    Emily> Use 'sudo apt autoremove' to remove them.
    Emily> The following additional packages will be installed:
    Emily>   emacs28-common
    Emily> The following NEW packages will be installed:
    Emily>   emacs28 emacs28-common
    Emily> 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Emily> Need to get 24.3 MB of archives.
    Emily> After this operation, 99.7 MB of additional disk space will be used.
    Emily> Do you want to continue? [Y/n] y
    Emily> Get:1 https://ppa.launchpadcontent.net/kelleyk/emacs/ubuntu jammy/main
    Emily> amd64 emacs28-common all 28.1~1.git5a223c7f2e-kk3+22.04 [2,466 B]
    Emily> Get:2 https://ppa.launchpadcontent.net/kelleyk/emacs/ubuntu jammy/main
    Emily> amd64 emacs28 amd64 28.1~1.git5a223c7f2e-kk3+22.04 [24.3 MB]
    Emily> Fetched 24.3 MB in 24s (1,014 kB/s)
    Emily> Selecting previously unselected package emacs28-common.
    Emily> (Reading database ... 306224 files and directories currently installed.)
    Emily> Preparing to unpack
    Emily> .../emacs28-common_28.1~1.git5a223c7f2e-kk3+22.04_all.deb ...
    Emily> Unpacking emacs28-common (28.1~1.git5a223c7f2e-kk3+22.04) ...
    Emily> Selecting previously unselected package emacs28.
    Emily> Preparing to unpack .../emacs28_28.1~1.git5a223c7f2e-kk3+22.04_amd64.deb ...
    Emily> Unpacking emacs28 (28.1~1.git5a223c7f2e-kk3+22.04) ...
    Emily> dpkg: error processing archive
    Emily> /var/cache/apt/archives/emacs28_28.1~1.git5a223c7f2e-kk3+22.04_amd64.deb
    Emily> (--unpack):
    Emily>  trying to overwrite '/usr/include/emacs-module.h', which is also in
    Emily> package emacs-common 1:27.1+1-3ubuntu5
    Emily> dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Emily> Errors were encountered while processing:
    Emily>  /var/cache/apt/archives/emacs28_28.1~1.git5a223c7f2e-kk3+22.04_amd64.deb
    Emily> E: Sub-process /usr/bin/dpkg returned an error code (1)

This isnʼt really an emacs issue, but I suspect if you do ʼsudo apt
autoremoveʼ before you try to install emacs-28 that the conflicting
emacs-common package will get uninstalled.

Robert
--