From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Missing native-search-path for texlive Date: Mon, 30 Nov 2015 15:20:06 +0100 Message-ID: <20151130142006.GA3964@debian> References: <878u5fab63.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3PJS-0005XH-Aj for guix-devel@gnu.org; Mon, 30 Nov 2015 09:20:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3PJR-0000SY-G7 for guix-devel@gnu.org; Mon, 30 Nov 2015 09:20:18 -0500 Content-Disposition: inline In-Reply-To: <878u5fab63.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel@gnu.org On Mon, Nov 30, 2015 at 02:07:00PM +0100, Ludovic Courtès wrote: > It ‘TEXMF’ really a search path, or is it rather a variable that should > point to a single directory? It is a variable that works like a search path, but with a special syntax: /gnu/store/gb4y83bvcpkvdmz0dvi9rp507kbdbr5x-texlive-texmf-2015/share/texmf-dist/web2c/texmf.cnf contains a line TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFDIST} The context binary itself is the following shell script: #!/gnu/store/ibpm6n6706yimzr3967krkxi2ibxq5yh-bash-4.3.39/bin/bash export TEXMFCNF="/gnu/store/gb4y83bvcpkvdmz0dvi9rp507kbdbr5x-texlive-texmf-2015/share/texmf-dist/web2c" exec -a "$0" "/gnu/store/i11ykp24wbgq2lfz7gcz2v0f5h3sg7dg-texlive-bin-2015/share/texmf-dist/scripts/context/stubs/unix/context" "$@" The variable TEXMFCNF gives the directory where texmf.cnf is to be found; this configuration file contains the definition of TEXMF (composed of the other variables). So one would expect the wrapper to be already in place, provided by texlive. The call in the last line is to the following shell script: #!/gnu/store/311nvir0pz1mhf0mgsmfrw00qfj7yq0j-bash-4.3.39/bin/sh mtxrun --script context "$@" "mtxrun" is the following shell script: #!/gnu/store/ibpm6n6706yimzr3967krkxi2ibxq5yh-bash-4.3.39/bin/bash export TEXMFCNF="/gnu/store/gb4y83bvcpkvdmz0dvi9rp507kbdbr5x-texlive-texmf-2015/share/texmf-dist/web2c" exec -a "$0" "/gnu/store/i11ykp24wbgq2lfz7gcz2v0f5h3sg7dg-texlive-bin-2015/bin/mtxrun" "$@" Again, this is a wrapper setting TEXMFCNF. The mtxrun binary is a lua script. The following lines in the script could be of interest: resolvers.criticalvars=allocate { "SELFAUTOLOC","SELFAUTODIR","SELFAUTOPARENT","TEXMFCNF","TEXMF","TEXOS" } resolvers.luacnfname="texmfcnf.lua" I suppose that the normal behaviour will then be to look for the file texmfcnf.lua in the directory given by TEXMFCNF, set by the wrapper scripts. This file seems to be a lua script that is equivalent to texmf.cnf. We modify texmf.cnf to point to the correct directories, using a single substitute: (substitute* texmfcnf (("TEXMFROOT = \\$SELFAUTOPARENT") (string-append "TEXMFROOT = " share))) which results in the line TEXMFROOT = /gnu/store/gb4y83bvcpkvdmz0dvi9rp507kbdbr5x-texlive-texmf-2015/share All further variables depend on TEXMFROOT. So we should probably also modify texmfcnf.lua in a similar way. Unfortunately, it contains a lot of selfautoparent and selfautodir; we should replace them all at the same time. I can propose a patch later. Andreas