commit:     20b4f3efbed3ce3ef64a6e0b4de49a0f19268332
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 22 07:04:34 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jul 22 07:23:23 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20b4f3ef

app-shells/atuin: switch back to greadme.eclass

The package used greadme.eclass before, but was, for some unknown reason,
switched back to readme.gentoo-r1.eclass with
5cc79e4bfc2b ("app-shells/atuin: add 18.6.1"). However, this broke
multiple things:

- readme.gentoo-r1.eclass is not as flexible with optional README files
  as greadme.eclass, causing https://bugs.gentoo.org/956351 which was fixed with
  d1911f241fa8 ("app-shells/atuin: fix call to readme.gentoo_create_doc
  IUSE="client"")
- the README text was copied verbatim from the bash here-doc into a
  file, resulting in wrong quotes being shown
- the readme text is only sensible if USE=client and hence was only
  conditionally shown if this the 'client' USE flag was enabled

Ultimately, greadme.eclass is more sophisticated as
readme.gentoo-r1.eclass and can be used in every situation where
readme.gentoo-r1.eclass is used.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../{atuin-18.6.1.ebuild => atuin-18.6.1-r1.ebuild}      | 16 ++++++++++------
 .../{atuin-18.7.1.ebuild => atuin-18.7.1-r1.ebuild}      | 16 ++++++++++------
 app-shells/atuin/files/README.gentoo                     |  5 -----
 3 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/app-shells/atuin/atuin-18.6.1.ebuild 
b/app-shells/atuin/atuin-18.6.1-r1.ebuild
similarity index 87%
rename from app-shells/atuin/atuin-18.6.1.ebuild
rename to app-shells/atuin/atuin-18.6.1-r1.ebuild
index a004c99ef1d5..c2c0b9fd42ba 100644
--- a/app-shells/atuin/atuin-18.6.1.ebuild
+++ b/app-shells/atuin/atuin-18.6.1-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 CRATES=" "
 RUST_MIN_VER="1.86"
 
-inherit cargo readme.gentoo-r1 shell-completion systemd
+inherit cargo greadme shell-completion systemd
 
 DESCRIPTION="Shell history manager supporting encrypted synchronisation"
 HOMEPAGE="https://atuin.sh https://github.com/atuinsh/atuin";
@@ -34,7 +34,7 @@ BDEPEND="test? ( dev-db/postgresql )"
 
 QA_FLAGS_IGNORED="usr/bin/${PN}"
 
-DISABLE_AUTOFORMATTING=1
+GREADME_DISABLE_AUTOFORMAT=1
 
 DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md )
 
@@ -110,7 +110,6 @@ src_test() {
 }
 
 src_install() {
-       readme.gentoo_create_doc
        dobin "${ATUIN_BIN}"
 
        if use server; then
@@ -133,8 +132,13 @@ src_install() {
 
        insinto "/usr/share/${PN}"
        doins -r shell-init
-}
 
-pkg_postinst() {
-       readme.gentoo_print_elog
+       # The following readme text is only relevant if USE=client.
+       greadme_stdin <<-EOF
+       Gentoo installs atuin's shell-init code under
+           /usr/share/atuin/shell-init/
+       Therefore, instead of using, e.g., 'eval \"\$(atuin init zsh)\"' in
+       your .zshrc you can simply put \"source 
/usr/share/atuin/shell-init/zsh\"
+       there, which avoids the cost of forking a process.
+EOF
 }

diff --git a/app-shells/atuin/atuin-18.7.1.ebuild 
b/app-shells/atuin/atuin-18.7.1-r1.ebuild
similarity index 87%
rename from app-shells/atuin/atuin-18.7.1.ebuild
rename to app-shells/atuin/atuin-18.7.1-r1.ebuild
index 5ee9a1e6c3c5..ea768df96754 100644
--- a/app-shells/atuin/atuin-18.7.1.ebuild
+++ b/app-shells/atuin/atuin-18.7.1-r1.ebuild
@@ -7,7 +7,7 @@ CRATES=" "
 
 RUST_MIN_VER="1.86"
 
-inherit cargo readme.gentoo-r1 shell-completion systemd
+inherit cargo greadme shell-completion systemd
 
 DESCRIPTION="Shell history manager supporting encrypted synchronisation"
 HOMEPAGE="https://atuin.sh https://github.com/atuinsh/atuin";
@@ -35,7 +35,7 @@ BDEPEND="test? ( dev-db/postgresql )"
 
 QA_FLAGS_IGNORED="usr/bin/${PN}"
 
-DISABLE_AUTOFORMATTING=1
+GREADME_DISABLE_AUTOFORMAT=1
 
 DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md )
 
@@ -111,7 +111,6 @@ src_test() {
 }
 
 src_install() {
-       readme.gentoo_create_doc
        dobin "${ATUIN_BIN}"
 
        if use server; then
@@ -134,8 +133,13 @@ src_install() {
 
        insinto "/usr/share/${PN}"
        doins -r shell-init
-}
 
-pkg_postinst() {
-       readme.gentoo_print_elog
+       # The following readme text is only relevant if USE=client.
+       greadme_stdin <<-EOF
+       Gentoo installs atuin's shell-init code under
+           /usr/share/atuin/shell-init/
+       Therefore, instead of using, e.g., 'eval \"\$(atuin init zsh)\"' in
+       your .zshrc you can simply put \"source 
/usr/share/atuin/shell-init/zsh\"
+       there, which avoids the cost of forking a process.
+EOF
 }

diff --git a/app-shells/atuin/files/README.gentoo 
b/app-shells/atuin/files/README.gentoo
deleted file mode 100644
index 1c6eee971743..000000000000
--- a/app-shells/atuin/files/README.gentoo
+++ /dev/null
@@ -1,5 +0,0 @@
-Gentoo installs atuin's shell-init code under
-       /usr/share/atuin/shell-init/
-Therefore, instead of using, e.g., 'eval \"\$(atuin init zsh)\"' in
-your .zshrc you can simply put \"source /usr/share/atuin/shell-init/zsh\"
-there, which avoids the cost of forking a process.

Reply via email to