Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714908 - texlive-module.eclass sometimes does not install doc-files
Summary: texlive-module.eclass sometimes does not install doc-files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: TeX project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-03-26 18:34 UTC by Dominik Schmidt
Modified: 2020-03-30 19:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the problem (texlive-patch,1.12 KB, patch)
2020-03-26 18:34 UTC, Dominik Schmidt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Schmidt 2020-03-26 18:34:03 UTC
The texlive-module.eclass got a recent "fix" to remove posix-isms, note the lines 333-351 here:
https://github.com/gentoo/gentoo/commit/606c68a31bd9a243f28d0bbca2daf202bb40bb3a#diff-494478b6a92a8407349363069f792461L333-L335

This assumes the non-existance of texmf-docs to be equal to not setting the "doc" useflag, which is faulty.
Some packages (e.g. texlive-mathscience) only install the docs inside texmf-dist, and hence the eclass goes ahead and deletes all the documentation in texmf-dist/doc.

Reproducible: Always

Steps to Reproduce:
1. Install dev-texlive/texlive-mathscience[+doc]

Actual Results:  
No docs installed

Expected Results:  
documentation installed
Comment 1 Dominik Schmidt 2020-03-26 18:34:56 UTC
Created attachment 626256 [details, diff]
Patch to fix the problem
Comment 2 Dominik Schmidt 2020-03-26 18:38:21 UTC
See pull-request https://github.com/gentoo/gentoo/pull/15128
Comment 3 Larry the Git Cow gentoo-dev 2020-03-27 07:40:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c76ab560eae84bd631d6a5d91d1ed6641fd154

commit 69c76ab560eae84bd631d6a5d91d1ed6641fd154
Author:     Dominik Schmidt <dominik@schm1dt.ch>
AuthorDate: 2020-03-26 18:28:19 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2020-03-27 07:39:26 +0000

    texlive-module.eclass: fix doc installation
    
    If the package does not create ${WORKDIR}/texmf-doc, then the eclass assumes
    that no documentation should be installed.
    This is assumption is incorrect, since the documentation tar-balls can put the
    docs into texmf-dist and not texmf-doc, as happens with e.g. texlive-mathscience.
    As a result, the documentation files are not installed anymore.
    
    Bug: https://bugs.gentoo.org/714908
    Signed-off-by: Dominik Schmidt <dominik@schm1dt.ch>
    Closes: https://github.com/gentoo/gentoo/pull/15128
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>

 eclass/texlive-module.eclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-03-27 07:41:46 UTC
Thanks! I have only changed the top line (it was too long).
Comment 5 Petr Zima 2020-03-30 19:33:15 UTC
(In reply to Mikle Kolyada from comment #4)
> Thanks! I have only changed the top line (it was too long).

Firstly, let me thank you for fixing the bug swiftly. I have just hit it and reinstalling all my latex packages ;) In the meantime, as an experienced developer I cannot resist to give you an advice here. Please don't take it bad, I mean just well, sharing experience.

1. Don't do such big cleanups. It's virtually impossible to get them reviewed properly. Okay, I guess nobody would listen to this :)
2. Do one thing at a time, like 1 commit for '[...]' -> '[[...]]' and 1 commit for adding '|| die'.
3. (most important) Do most of the work using some regexp replacement (sed/awk/perl/whatever automated script) and commit it separately. It's the best guarantee of correctness.
4. Resolve the remaining special cases by hand in a much smaller commit, which can get properly reviewed.