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
> 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
(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..
(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".
@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.
(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.
<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 ;)
Then let's hardcode it.
Fixed. Thanks for reporting.