[Bug 259259] Mk/Uses/emacs.mk: Remove Emacs major version from EMACS_PKGNAMESUFFIX

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 19 Oct 2021 06:17:18 UTC

            Bug ID: 259259
           Summary: Mk/Uses/emacs.mk: Remove Emacs major version from
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: yasu@freebsd.org
                CC: ports-bugs@FreeBSD.org

Created attachment 228822
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=228822&action=edit
Patch file

When major version of editors/emacs-devel was bumped to 29, I experienced the
problem that `pkg upgrade` can't properly upgrade ports depending on Emacs. For
example, before major version was bumped to 29, package name of 'devel_nox'
flavor of 'devel/magit' was 'magit-emacs28_nox-3.2.1' and it changed to
'magit-emacs29_nox-3.2.1' after major version bump. Unfortunately `pkg upgrade`
can't handle change of PKGNAMESUFFIX properly and regards installed
'magit-emacs28_nox-3.2.1' as orphaned. By applying this commit the package name
becomes 'magit-emacs-devel-nox-3.2.1' and it doesn't change even if major
version of editor/emacs-devel is bumped. So `pkg upgrade` can properly upgrade
ports depending on Emacs.

This is primary purpose that I propose to remove Emacs major version from
EMACS_PKGNAMESUFFIX. But there is also the reason that I think Emacs major
version should not be included in EMACS_PKGNAMESUFFIX. And I'd like to explain
it by comparing Emacs ports with Python ones.

Right now there are following 6 Python ports.

* lang/python27
* lang/python36
* lang/python37
* lang/python38
* lang/python39
* lang/python310

They are latest release of Python 2.7, 3.6, 3.7, 3.8, 3.9 and 3.10
respectively. Every time new minor version X.Y.0 is released new port
lang/pythonXY is created. Each time new point release (X.Y.1, X.Y.2, ...) is
released lang/pythonXY is updated to latest one. When Python X.Y reached its
EoL lang/pythonXY is removed from ports tree. It never upgrades to X.(Y+1).0.
Like this Python ports are tightly coupled with its minor version.

Then how flavor is used? In Python ports world Python ports (lang/pythonXY)
themselves don't have any flavors. They are ports depending on Python that have
flavors. And flavors are used to distinguish which version of Python the
specified flavor of port works with. In this case it is quite reasonable that
flavors name include Python version and PKGNAMEPREFIX such as 'py27-', 'py36-',
etc. are used with ports depending on Python.

Now let's go back Emacs ports world. Currently, and as far as I know, there are
2 Emacs ports. That is, editors/emacs and editors/emacs-devel. The former is
always latest release version, and the latter is latest snapshot from master
branch of upstream repository. Different from Python ports, new port isn't
created even if new version is released or version of latest snapshot is
changed. There is always 2 Emacs ports.

Usage of flavor is also different from that of Python ports. At first Emacs
ports themselves have flavors and they are used to provide variations of Emacs
ports that have different option settings. As a result names such as 'full',
'nox', 'canna' are used to represent such difference. And flavors are also used
with ports depending on Emacs ports to distinguish which flavor of Emacs they
work with. Under such situation I don't think it is reasonable for
PKGNAMESUFFIX of ports depending on Emacs ports to include Emacs major version.

You are receiving this mail because:
You are on the CC list for the bug.