kelleyk / ppa-emacs

Packaging repository for my Emacs PPA
https://launchpad.net/~kelleyk/+archive/ubuntu/emacs
99 stars 4 forks source link

emacs26-common 26.1~1.git07f8f9b-kk1+18.04 conflicts with emacs-common_1:25.2+1-10 #3

Closed andersk closed 4 years ago

andersk commented 6 years ago
Preparing to unpack .../17-emacs-common_1%3a25.2+1-10_all.deb ...
Unpacking emacs-common (1:25.2+1-10) ...
dpkg: error processing archive /tmp/apt-dpkg-install-6FaXtO/17-emacs-common_1%3a25.2+1-10_all.deb (--unpack):
 trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs26-common 26.1~1.git07f8f9b-kk1+18.04

I suspect /usr/share/emacs/site-lisp/subdirs.el doesn’t belong in emacs26-common.

kelleyk commented 6 years ago

Thank you for reporting an issue!

The problem here is slightly more complicated than that, but yes, this file's location creates a conflict. The Debian-maintained emacs packages relocate these files so that multiple major versions can be installed side-by-side. I intend to update my packaging at some point (when I have the time) to mirror what the Debian packages do, which should resolve this problem.

This is the same issue described in #1.

Sorry for the trouble! (I'd be happy to accept patches resolving the issue, if you or anyone else is feeling motivated.)

otuk commented 6 years ago

I am encountering the same issue. Does anyone have a work around?

sdrafahl commented 5 years ago

I am also getting this error

Unpacking emacs-common (1:26.1+1-3.2ubuntu2) ... dpkg: error processing archive /var/cache/apt/archives/emacs-common_1%3a26.1+1-3.2ubuntu2_all.deb (--unpack): trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs26-common 26.2~1.gitfd1b34b-kk1+19.04

gmoutso commented 4 years ago

I got various conflicts when installing on 19.10 on top of the ubuntu package. But I rather uninstall the ubuntu package to have this and its module support. Thanks!

kelleyk commented 4 years ago

Yes: you need to either install my packages (emacs26 or emacs26-nox, which will also pull in emacs26-common and emacs26-el) or the ones from the main Ubuntu repositories. They are not interchangeable/compatible.

I'm not aware that there's really a reason to mix and match, though. Perhaps when I revisit the packaging to fix #1, I should also add Conflicts metadata so that the Ubuntu packages are removed if you try to install mine.

sc0ttwad3 commented 4 years ago

I removed the emacs and emacs-common packages that come with Ubuntu 20.04. After adding your ppa, successfully, I'm running into a similar (maybe same?) problem in Ubuntu-20.04 installing emacs26 and emacs26-common. I've tried various things like clearing apt cache, and other things that haven't worked, or enabled me to get past this...

❯ sudo apt install emacs26
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  emacs26-common
The following NEW packages will be installed:
  emacs26 emacs26-common
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 21.8 MB of archives.
After this operation, 117 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal/main amd64 emacs26-common all 26.3~1.git96dd019-kk1+20.04 [17.9 MB]
Get:2 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal/main amd64 emacs26 amd64 26.3~1.git96dd019-kk1+20.04 [3,954 kB]
Fetched 21.8 MB in 4s (5,249 kB/s)
(Reading database ... 115652 files and directories currently installed.)
Preparing to unpack .../emacs26-common_26.3~1.git96dd019-kk1+20.04_all.deb ...
Unpacking emacs26-common (26.3~1.git96dd019-kk1+20.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs26-common_26.3~1.git96dd019-kk1+20.04_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs-common 1:26.3+1-1ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../emacs26_26.3~1.git96dd019-kk1+20.04_amd64.deb ...
Unpacking emacs26 (26.3~1.git96dd019-kk1+20.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs26_26.3~1.git96dd019-kk1+20.04_amd64.deb (--unpack):
 trying to overwrite '/usr/share/emacs/26.3/etc/DOC', which is also in package emacs-gtk 1:26.3+1-1ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/emacs26-common_26.3~1.git96dd019-kk1+20.04_all.deb
 /var/cache/apt/archives/emacs26_26.3~1.git96dd019-kk1+20.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
saeedghsh commented 4 years ago

@kelleyk: I'm not aware that there's really a reason to mix and match, though.

I ran into a similar problem, not intentionally trying to "mix and match". This happened when I had your package installed and attempted sudo apt install elpa-elpy, which I think tries to install emacs as a dependency from the main Ubuntu repositories! Does that make sense?

Now, with broken apt, when I try sudo apt --fix-broken install, here is the result:

The following additional packages will be installed:
  emacs-common emacs-gtk
Suggested packages:
  emacs-common-non-dfsg ncurses-term
The following NEW packages will be installed:
  emacs-common emacs-gtk
0 upgraded, 2 newly installed, 0 to remove and 57 not upgraded.
3 not fully installed or removed.
Need to get 16.9 MB of archives.
After this operation, 111 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 emacs-common all 1:26.3+1-1ubuntu2 [13.3 MB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 emacs-gtk amd64 1:26.3+1-1ubuntu2 [3,588 kB]
Fetched 16.9 MB in 2s (8,686 kB/s)   
(Reading database ... 467781 files and directories currently installed.)
Preparing to unpack .../emacs-common_1%3a26.3+1-1ubuntu2_all.deb ...
Unpacking emacs-common (1:26.3+1-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/emacs-common_1%3a26.3+1-1ubuntu2_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs26-common 26.3~1.git96dd019-kk1+20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../emacs-gtk_1%3a26.3+1-1ubuntu2_amd64.deb ...
Unpacking emacs-gtk (1:26.3+1-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/emacs-gtk_1%3a26.3+1-1ubuntu2_amd64.deb (--unpack):
 trying to overwrite '/usr/share/emacs/26.3/etc/DOC', which is also in package emacs26 26.3~1.git96dd019-kk1+20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/emacs-common_1%3a26.3+1-1ubuntu2_all.deb
 /var/cache/apt/archives/emacs-gtk_1%3a26.3+1-1ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
kelleyk commented 4 years ago

@saeedghsh Thanks for the additional context! All of the packages you have there are Ubuntu ones (not from my PPA). Makes sense that they'd be pulled in by elpa-elpy.

I haven't ever tried to install Debian-packaged versions of Emacs packages like elpy; I use Emacs itself to install from ELPA/MELPA directly. Still, what you're doing should ideally not cause problems like the ones you've run into.

Let's open a tracking issue (#11). Emacs 27.1 is hopefully going to be available soon, and there are some other improvements I'd like to make to the packaging (like fixing the issues with having multiple Emacs versions installed side-by-side).

kelleyk commented 4 years ago

In my emacs27 packaging, I've added Provides to the control file; so, for example, apt should believe that the emacs27-common package from my PPA provides emacs-common, avoiding this problem.

Please let me know if you run into any more trouble once you have a chance to try those packages (which should be available in the PPA shortly)!

BJSchmidt commented 4 years ago

@kelleyk FYI I installed Emacs27 on Ubuntu 20.04 from your PPA today, and ran into the same issue:

Errors were encountered while processing:
 /tmp/apt-dpkg-install-RVK8CA/064-emacs27-common_27.1~1.git86d8d76aa3-kk2+20.04_all.deb

I was able to resolve it with:

sudo apt --purge remove emacs-common
sudo apt --fix-broken install
kelleyk commented 4 years ago

Hm, I'm sorry; I guess that I didn't fix that issue as well as I thought I had. I've opened #16 to track.

improve100 commented 3 years ago

i fix the probram,flow this: sudo apt --purge remove emacs27 sudo apt --purge remove emacs sudo apt --purge remove emacs-common sudo apt --fix-broken install sudo apt autoremove sudo apt install emacs27 emacs --version

togakangaroo commented 3 years ago

I seem to be getting errors no matter which of the above remediations I try

$ sudo apt --purge remove emacs-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'emacs-common' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 emacs-bin-common : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-el : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-gtk : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I'm running out of ideas as this happens no matter what I attempt to remove/add or anything. Pretty much always

dpkg: error processing archive /var/cache/apt/archives/emacs-common_1%3a26.3+1-1ubuntu2_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs27-common 27.1~1.git86d8d76aa3-kk2+20.04

Anything else to try? I'm not even sure how to uninstall anymore since even running remove emacs27 ends in the same error

KhalfaniW commented 3 years ago

Try removing all the packages at once to break the cycle of not being able to uninstall things.

sudo apt --purge remove emacs25 emacs [or whatever other packages that have unmet dependencies]

This got me out of the apt --fix-broken install loop

aQuaYi commented 3 years ago

Try removing all the packages at once to break the cycle of not being able to uninstall things.

sudo apt --purge remove emacs25 emacs [or whatever other packages that have unmet dependencies]

This got me out of the apt --fix-broken install loop

You save my life. Thank you.