Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 2715  / 1 Year ago, sun, january 8, 2023, 2:56:45

I've been building my own emacs because I want to fix some issues in it and get the bug fixes upstream. However, Ubuntu keeps automatically removing my own built emacs and I have to keep rebuilding and reinstalling it.



Here's my output of apt-cache policy emacs when I went to bed last night:



~/emacs$ sudo apt-cache policy emacs
emacs:
Installed: 26.0.50.aaron-1
Candidate: 46.1
Version table:
46.1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
*** 26.0.50.aaron-1 100
100 /var/lib/dpkg/status


Here it is when I wake up:



~/emacs$ sudo apt-cache policy emacs
[sudo] password for excelsiora:
emacs:
Installed: 46.1
Candidate: 46.1
Version table:
*** 46.1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
100 /var/lib/dpkg/status


Why is this package being versioned at 46 instead of 24 or 25? 26 is the currently the highest major emacs version you can get.



I can see that this is a meta-package: https://packages.debian.org/source/jessie/emacs-defaults



Why is Ubuntu updating software without asking?



Main Question: What am I supposed to do - assign my package version a number higher than 46 just to make it stick?



That seems like a horrible hack, or maybe that's how it's supposed to work?


More From » 16.04

 Answers
1

There are many issues and questions here, so I'll be brief but try to cover them all.




  • emacs is just a meta-package that points at the latest version of emacs... in Ubuntu (currently emacs24). The "46.1" is just a package version, deliberately high to displace older emacs packages. See apt show emacs for a bit more info.


  • You're overriding that emacs package with a lower version number package. Ubuntu prioritises the package version installed by version number. The highest will be the one that gets installed (when installing or upgrading), hence yours is constantly guzzumped.



    You can see this in the apt-cache policy emacs output. The candidate is the higher version.


  • You can work around priorities with pinning, or fudging your version number (something higher than 46.1) but that does rather ignore the problem (and may leave a emacs24 package in place).


  • Your best option is removing the emacs package and just building and installing a emacs25 or emacs26 package instead. You could also build an emacs meta-package that depended on your version-in-name package, but that's just a vanity. I wouldn't do that unless you're planning on distributing.


  • Regarding Ubuntu doing stuff without "without asking", check to see if automatic updates are turned on. Getting the latest available to it is the default behaviour so I think this is more a case of "not understanding what Ubuntu does" rather than a ghost in the machine, or worse.


  • And as for "why version 24, not 25 or 26?", Ubuntu and Debian beneath it both aim for stable, tested software versions. 26 is still in development and 25 didn't come out until September 2016.



    Additionally, Ubuntu isn't a rolling-release so versions of Ubuntu with 24 will stay on version 24 for the lifespan of those Ubuntu releases (unless something really crazy happens). Security patches will be backported and applied if necessary but it'll still be 24.



[#12190] Sunday, January 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rontablis

Total Points: 293
Total Questions: 123
Total Answers: 104

Location: Austria
Member since Mon, Mar 1, 2021
3 Years ago
;