When I install Emacs in a sysroot, the /usr/bin/emacs symlink is not created in the sysroot unless eselect-emacs is manually installed in / beforehand. It runs "eselect emacs" in pkg_post* functions. Reproducible: Always Steps to Reproduce: 1. emerge --rage-clean app-eselect/eselect-emacs # with the / profile 2. emerge app-editors/emacs # with a sysroot profile Actual Results: No /usr/bin/emacs exists in the sysroot. Expected Results: It should symlink /usr/bin/emacs as expected. I only care about version =app-editors/emacs-27.0.90 at the moment.
BDEPEND won't be correct, because it applies only to src_* functions: https://projects.gentoo.org/pms/7/pms.html#x1-680008.1 I fear that we must wait for install time dependencies in EAPI 8.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55e891b44ad9297b7483c4b085830247eaf6e72 commit c55e891b44ad9297b7483c4b085830247eaf6e72 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2020-04-07 09:41:16 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2020-04-07 09:41:16 +0000 app-editors/emacs: Move eselect-emacs from DEPEND to BDEPEND. Strictly, we would need a CBUILD type install dependency (IDEPEND), which cannot be expressed in EAPI 7. Bug: https://bugs.gentoo.org/716334 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-18.59-r12.ebuild | 12 ++++++++---- app-editors/emacs/emacs-23.4-r18.ebuild | 11 +++++++---- app-editors/emacs/emacs-24.5-r7.ebuild | 11 +++++++---- app-editors/emacs/emacs-25.3-r6.ebuild | 11 ++++++----- app-editors/emacs/emacs-26.3-r1.ebuild | 11 ++++++----- app-editors/emacs/emacs-27.0.50_pre20191223.ebuild | 11 ++++++----- app-editors/emacs/emacs-27.0.90.ebuild | 11 ++++++----- app-editors/emacs/emacs-27.0.9999-r1.ebuild | 11 ++++++----- app-editors/emacs/emacs-28.0.9999.ebuild | 11 +++++++---- 9 files changed, 59 insertions(+), 41 deletions(-)
Thinking about it, app-eselect/eselect-emacs is a CBUILD type install dependency, so BDEPEND (CBUILD type) is more correct than DEPEND (CHOST type). Note that it will still fail when installing a binary package in a sysroot, so I leave this bug open.
Created attachment 715881 [details, diff] fix.patch This updates to EAPI 8 and IDEPEND. It needed a bunch of eclass updates to work, though. (Tested with portage-3.0.20.)
Created attachment 716856 [details, diff] fix.patch Rebased, and IDEPEND does not enforce its dependencies being installed during uninstallation, so the pkg_postrm function should test with has_version before calling eselect.
(In reply to David Michael from comment #5) > [...] the pkg_postrm function should test with has_version before calling > eselect. Not going to happen: - The only effect of the has_version test would be to suppress an error message. (It is intentional that there's no "|| die" after the eselect commands.) - During an uninstall sequence, there is no guarantee that deep dependencies are still present any point, so additional tests for app-admin/eselect, app-eselect/eselect-ctags, etc. would be needed. IMHO trying to cover this completely would be a futile undertaking.
This is currently blocked by autotools.eclass. All other inherited eclasses have EAPI 8 support.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6937b367c618f82930e200f8f72efbf42c8126da commit 6937b367c618f82930e200f8f72efbf42c8126da Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2021-07-12 14:45:30 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2021-07-12 14:52:07 +0000 app-editors/emacs: Bump to EAPI 8 Move app-eselect/eselect-emacs from BDEPEND to IDEPEND. Closes: https://bugs.gentoo.org/716334 Suggested-by: David Michael <fedora.dm0@gmail.com> Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-27.2-r3.ebuild | 447 +++++++++++++++++++++++++++++++ app-editors/emacs/emacs-27.2.9999.ebuild | 7 +- app-editors/emacs/emacs-28.0.9999.ebuild | 7 +- 3 files changed, 455 insertions(+), 6 deletions(-)