summaryrefslogtreecommitdiff
path: root/eclass/texlive-module.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
commit2a3e0d61b3d88306b6fae46756f9ba7d230222ae (patch)
treea0d3259dd259861a49a2d3e6e9220beaa8ec39c2 /eclass/texlive-module.eclass
parent39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (diff)
gentoo auto-resync : 13:12:2024 - 02:01:50
Diffstat (limited to 'eclass/texlive-module.eclass')
-rw-r--r--eclass/texlive-module.eclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index f8b6f0858cd6..ebd65e3dd0d8 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -79,7 +79,7 @@ esac
if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then
_TEXLIVE_MODULE_ECLASS=1
-inherit texlive-common
+inherit eapi9-pipestatus texlive-common
HOMEPAGE="https://www.tug.org/texlive/"
@@ -537,16 +537,15 @@ texlive-module_src_install() {
grep_expressions+=(-e "/${f//./\\.}\$")
done
+ local status
+ # "success-status aware grep", returning exit status 0 instead of 1.
+ _sgrep() { grep "$@"; return "$(( $? <= 1 ? 0 : $? ))"; }
ebegin "Installing man pages"
find texmf-dist/doc/man -type f -name '*.[0-9n]' -print |
- grep -v "${grep_expressions[@]}" |
+ _sgrep -v "${grep_expressions[@]}" |
xargs -d '\n' --no-run-if-empty nonfatal doman
- local pipestatus="${PIPESTATUS[*]}"
- # The grep in the middle of the pipe may return 1 in case
- # everything from the input is dropped.
- # See https://bugs.gentoo.org/931994
- [[ ${pipestatus} == "0 "[01]" 0" ]]
- eend $? || die "error installing man pages (pipestatus: ${pipestatus})"
+ status=$(pipestatus -v)
+ eend $? || die "error installing man pages (PIPESTATUS: ${status})"
# Delete all man pages under texmf-dist/doc/man
find texmf-dist/doc/man -type f -name '*.[0-9n]' -delete ||