Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598096 - [PATCH] Concatenate several definitions of TEXINPUTS into a colon-separated list in /etc/profile.env, just like PATH
Summary: [PATCH] Concatenate several definitions of TEXINPUTS into a colon-separated l...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-25 19:32 UTC by Thomas Fischer
Modified: 2016-11-04 15:25 UTC (History)
0 users

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


Attachments
Adding 'TEXINPUTS' into the set 'colon_separated' (env_update-TEXINPUTS.patch,608 bytes, patch)
2016-10-25 19:32 UTC, Thomas Fischer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fischer 2016-10-25 19:32:43 UTC
Created attachment 451450 [details, diff]
Adding 'TEXINPUTS' into the set 'colon_separated'

The tool 'env_update' collects variable definitions from files in /etc/env.d and builds /etc/profile.env. Certain variables, when defined in multiple files in /etc/env.d, are concatenated with a colon (':') as separator in between. Prime example is the variable PATH.
Which variables are recognized as 'can be concatenated with a colon as separator' is defined in variable colon_separated around line 111 in file pym/portage/util/env_update.py in the sources for Portage.

In this feature request, I would like to request to add variable TEXINPUTS as used TeX systems. Various TeX tools use this variable to locate files (e.g. packages, fonts, images) to be used during a compilation which may not be placed in the default locations (e.g. CWD, /usr/share/texmf*, ...).

An example where setting TEXINPUTS during a package installation is necessary is package for SDAPS (http://sdaps.org/). SDAPS used to automate the generation and evaluation of paper-based questionnaires and as such allows the generation of questionnaires both with LaTeX and LibreOffice. For LaTeX, a number of files are installed in /usr/share/sdaps/tex and cannot be found by LaTeX tools like pdflatex or kpsewhich unless TEXINPUTS is set to include /usr/share/sdaps/tex.
The package SDAPS will install a file 95sdaps into /etc/env.d which contains the single line
TEXINPUTS="/usr/share/sdaps/tex"
Eventually, /etc/profile.env shall contain a line like this:
TEXINPUTS="/some/other/path:/usr/share/sdaps/tex:/yet/another/path"
Comment 1 Zac Medico gentoo-dev 2016-10-26 04:15:58 UTC
(In reply to Thomas Fischer from comment #0)
> The package SDAPS will install a file 95sdaps into /etc/env.d which contains
> the single line
> TEXINPUTS="/usr/share/sdaps/tex"

We don't have to patch portage, since it suffices to set COLON_SEPARATED="TEXINPUTS" inside that 95sdaps file.
Comment 2 Thomas Fischer 2016-11-04 08:57:10 UTC
(In reply to Zac Medico from comment #1)
> (In reply to Thomas Fischer from comment #0)
> > The package SDAPS will install a file 95sdaps into /etc/env.d which contains
> > the single line
> > TEXINPUTS="/usr/share/sdaps/tex"
> 
> We don't have to patch portage, since it suffices to set
> COLON_SEPARATED="TEXINPUTS" inside that 95sdaps file.

Ok, I'll try that.

Is there a reason why variable 'colon_separated' still lists some very specific variable names such as ADA_INCLUDE_PATH or KDEDIRS (which is KDE4-specific), apart from historic reasons and that none has changed that?
Comment 3 Zac Medico gentoo-dev 2016-11-04 15:25:53 UTC
The existing values are just for backward compatibility.