commit: b19ff3462450417986410812624ed7c29a767824
Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 11 09:13:32 2024 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 16:57:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b19ff346
latex-package.eclass: do not set $@ in latex-package_src_doinstall's loop
Since 595611085bc5 ("latex-package: kill POSIX and old EAPI"), the 'tex'
and 'dtx' case handling of latex-package_src_doinstall's loop would set
$@ to a pdflatex invocation. However, the main loop of this function
iterates over $@, and after $@ is set to a pdflatex command, this
iteration would continue to process the components of the pdflatex
command.
As result, ebuild have to
latex-package_src_doinstall doc
latex-package_src_doinstall pdf
when
latex-package_src_doinstall doc
should be sufficient, because the 'doc' case expands to the "tex dtx dvi
ps pdf" cases. However, once a 'tex' or 'dtx' case was processed, the
remaining onces are no longer be processed, due the bug described above.
The fix is simple: do not abuse $@ to save the pdflatex command,
instead, use a dedicated local variable.
Fixes: 595611085bc532afb9f31fa23cee734bc37d21a4
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
eclass/latex-package.eclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass
index 4082e161b843..d6426775f720 100644
--- a/eclass/latex-package.eclass
+++ b/eclass/latex-package.eclass
@@ -137,11 +137,16 @@ latex-package_src_doinstall() {
continue
einfo "Making documentation:
${i}"
+ local mypdflatex=(
+ pdflatex
+ ${LATEX_DOC_ARGUMENTS}
+ --halt-on-error
+
--interaction=nonstopmode
+ "${i}"
+ )
# some macros need compiler
called twice, do it here.
- set -- pdflatex
${LATEX_DOC_ARGUMENTS} \
- --halt-on-error
--interaction=nonstopmode "${i}"
- if "${@}"; then
- "${@}"
+ if "${mypdflatex[@]}"; then
+ "${mypdflatex[@]}"
else
einfo "pdflatex failed,
trying texi2dvi"
texi2dvi -q -c
--language=latex "${i}" || die