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@gentoo.org>
This commit is contained in:
Florian Schmaus 2025-07-22 09:04:34 +02:00
parent f774540cb1
commit 20b4f3efbe
No known key found for this signature in database
GPG Key ID: 2239A7E8F5852052
3 changed files with 20 additions and 17 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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.