#1053752 emacs metapackage only depends on emacs-{gtk,nox,…} >= 27.1; should depend on >= {Version of metapackage}

#1053752#5
Date:
2023-10-10 12:15:19 UTC
From:
To:
Dear Maintainer,

when upgrading the `emacs` metapackage, one would expect the providing
emacs-gtk, emacs-nox, emacs-lucid… package to be upgraded. That's not
happening. For example:

on bookworm:

#install emacs 28
apt install emacs
#enable the bookworm backports repo
sed -i 's/Suites:.*$/& bookworm-backports/'
#update emacs to 29
apt update
apt install emacs/bookworm-backports

effectlessly updates the metapackage, and leaves the actual emacs
installation alone. This leads to user confusion¹.

The reason becomes obvious when one checks the dependencies:

#> apt depends emacs
emacs
 |Depends: emacs-gtk (>= 1:27.1)
 |Depends: emacs-pgtk (>= 1:27.1)
 |Depends: emacs-lucid (>= 1:27.1)
  Depends: emacs-nox (>= 1:27.1)

#> apt depends emacs/bookworm-backports
emacs
 |Depends: emacs-gtk (>= 1:27.1)
 |Depends: emacs-pgtk (>= 1:27.1)
 |Depends: emacs-lucid (>= 1:27.1)
  Depends: emacs-nox (>= 1:27.1)

So, the metapackage in either case doesn't depend on
emacs-implementation of the same version, but on a much older version
(or anything after).

Proposed solution: make `emacs~version` depend on `emacs-gtk==version`,
not on `>=much-older-version`

Best,
Marcus Müller


¹ https://unix.stackexchange.com/questions/758547/i-have-2-versions-of-emacs-installed-in-debian-how-do-i-remove-one-of-them/758553#758553