Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235395 - sci-visualization/gnuplot: Directory "/tex" created directly under root
Summary: sci-visualization/gnuplot: Directory "/tex" created directly under root
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 19:19 UTC by Richard Li
Modified: 2008-08-25 08:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Li 2008-08-21 19:19:20 UTC
I have sci-visualization/gnuplot-4.2.3-r2 installed. I find it created a directory /tex/latex/gnuplot directly under the root. I have no idea how gnuplot works, but I believe it is wrong to create such a directory.

localhost ~ # eix sci-visualization/gnuplot
[I] sci-visualization/gnuplot
     Available versions:  4.2.2-r1 4.2.3-r2 {X doc emacs gd ggi latex pdf plotutils readline svga wxwindows xemacs}
     Installed versions:  4.2.3-r2(01:28:00 PM 08/17/2008)(X doc latex pdf plotutils readline -emacs -gd -ggi -svga -wxwindows -xemacs)
     Homepage:            http://www.gnuplot.info/
     Description:         Command-line driven interactive plotting program

localhost ~ # qlist gnuplot | grep gnuplot.cfg
/tex/latex/gnuplot/gnuplot.cfg
/usr/share/gnuplot/demo/gnuplot.cfg
localhost ~ #


Reproducible: Always
Comment 1 Ulrich Müller gentoo-dev 2008-08-21 20:28:10 UTC
> I have sci-visualization/gnuplot-4.2.3-r2 installed. I find it created a
> directory /tex/latex/gnuplot directly under the root. I have no idea how
> gnuplot works, but I believe it is wrong to create such a directory.

Well spotted, this is definitely wrong.

What does the following command return?
kpsexpand '$TEXMFSITE'/tex/latex/gnuplot
Comment 2 Richard Li 2008-08-22 01:37:13 UTC
(In reply to comment #1)
> What does the following command return?
> kpsexpand '$TEXMFSITE'/tex/latex/gnuplot

# kpsexpand '$TEXMFSITE'/tex/latex/gnuplot
/tex/latex/gnuplot



I didn't install latex from the portage. I installed texlive2007 from an ISO and put some package names like dev-texlive/texlive-latexrecommended in packages.provided. This may be the reason..
Comment 3 Richard Li 2008-08-22 03:22:30 UTC
(In reply to comment #2)
> I didn't install latex from the portage. I installed texlive2007 from an ISO
> and put some package names like dev-texlive/texlive-latexrecommended in
> packages.provided. This may be the reason..
> 

Yes, I emerged the portage version of dev-texlive/texlive-latexrecommended and then reemerged gnuplot, and "/tex" was moved to "/usr/share/texmf-site/tex".
Comment 4 Ulrich Müller gentoo-dev 2008-08-22 06:19:37 UTC
@opfer: Should we protect against this kind of failure? Either we could forcefully die if kpsexpand is not functional, something like the following (not tested):

    TEXMF=$(kpsexpand '$TEXMFSITE')
    [ -n "${TEXMF} ] || die "boo!"
    sed -i -e "s:\`kpsexpand.*\`:${TEXMF}/tex/latex/${PN}:" \
        share/LaTeX/Makefile.in || die

Or we just hardcode the path via TEXMF="/usr/share/texmf-site" (as many ebuilds in dev-tex do).

I would be in favour of the second solution, because install locations of a package should not depend on the configuration of the live system.
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2008-08-22 08:01:54 UTC
(In reply to comment #4)
> @opfer: Should we protect against this kind of failure? Either we could
> forcefully die if kpsexpand is not functional, something like the following
> (not tested):
> 
>     TEXMF=$(kpsexpand '$TEXMFSITE')
>     [ -n "${TEXMF} ] || die "boo!"
>     sed -i -e "s:\`kpsexpand.*\`:${TEXMF}/tex/latex/${PN}:" \
>         share/LaTeX/Makefile.in || die
> 
> Or we just hardcode the path via TEXMF="/usr/share/texmf-site" (as many ebuilds
> in dev-tex do).
> 
> I would be in favour of the second solution, because install locations of a
> package should not depend on the configuration of the live system.

 On the other hand the package will not work as kpathsea will not find it later on if the user changed the configuration.  I am all for die (no, not you Richard :).  I did such tricks once to get AUCTeX working with a manually installed TeXLive when there were no such thing in Portage.
Comment 6 Ulrich Müller gentoo-dev 2008-08-22 08:43:09 UTC
<ulm> aballier: could you take a look at bug 235395?
<Willikins> ulm: https://bugs.gentoo.org/235395 "sci-visualization/gnuplot: Directory "/tex" created directly under root"; Gentoo Linux, Applications; NEW; richardpku@gmail.com:opfer@g.o
<ulm> would you prefer hardcoding TEXMF="/usr/share/texmf-site" or using kpsexpand in the ebuild?
<aballier> bah texmf-site is where we install extra tex packages, so i think hardcoding is simpler
<aballier> anyway it's just a matter of config files for an user that installs a tex distro from something else than the ebuilds
<ulm> *nod*
<ulm> but opfer disagrees about this
<aballier> i hardcode it a lot for dev-tex ebuilds; so that the installation location is deterministic
<aballier> and doesn't depend on config files
<ulm> k
<aballier> i tried to use config files for some texlive stuff at the beginning, but i reverted to hardcoding as this could lead to different binary packages
<aballier> and some mess like that bug :)
<ulm> would you like to comment on the bug, or should I paste the above from my irc log?
<aballier> imho a package installation location shouldn't depend on tex config files
<aballier> just paste it, its fine ;)
Comment 7 Christian Faulhammer (RETIRED) gentoo-dev 2008-08-25 08:15:04 UTC
Then let's hardcode it.
Comment 8 Ulrich Müller gentoo-dev 2008-08-25 08:29:12 UTC
Fixed. Thanks for reporting.