Bug 12003

Summary: updmap fails to find TeXLive::TLUtils perl module
Product: Mageia Reporter: Pascal Terjan <pterjan>
Component: RPM PackagesAssignee: Malo Deniélou <pmdenielou>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: jamagallon, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: texlive-texmf CVE:
Status comment:

Description Pascal Terjan 2013-12-16 01:09:25 CET
[pterjan@chopin zlib]$ /bin/updmap
Can't locate TeXLive/TLUtils.pm in @INC (you may need to install the TeXLive::TLUtils module) (@INC contains: //texmf-dist/tlpkg /usr/lib/perl5/site_perl/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.18.1 /usr/lib/perl5/vendor_perl/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.18.1 /usr/lib/perl5/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/5.18.1 /usr/lib/perl5/site_perl/5.18.1 /usr/lib/perl5/site_perl/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.18.0 /usr/lib/perl5/site_perl/5.18.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.16.3 /usr/lib/perl5/site_perl/5.16.3 /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/site_perl/5.16.2 /usr/lib/perl5/site_perl/5.16.1 /usr/lib/perl5/site_perl/5.16.1 /usr/lib/perl5/site_perl/5.16.0 /usr/lib/perl5/site_perl/5.16.0 /usr/lib/perl5/site_perl/5.14.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.18.1 /usr/lib/perl5/vendor_perl/5.18.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.18.0 /usr/lib/perl5/vendor_perl/5.18.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.16.3 /usr/lib/perl5/vendor_perl/5.16.3 /usr/lib/perl5/vendor_perl/5.16.2 /usr/lib/perl5/vendor_perl/5.16.2 /usr/lib/perl5/vendor_perl/5.16.1 /usr/lib/perl5/vendor_perl/5.16.1 /usr/lib/perl5/vendor_perl/5.16.0 /usr/lib/perl5/vendor_perl/5.16.0 /usr/lib/perl5/vendor_perl/5.14.2 /usr/lib/perl5/vendor_perl/5.14.1 /usr/lib/perl5/vendor_perl/5.14.0 /usr/lib/perl5/vendor_perl .) at /bin/updmap line 42.
BEGIN failed--compilation aborted at /bin/updmap line 42.

TeXLive/TLUtils.pm is in /usr/share/texmf-dist/tlpkg/TeXLive/TLUtils.pm and 
/usr/share/texmf/tlpkg/TeXLive/TLUtils.pm

I guess the problem is the first entry in @INC: //texmf-dist/tlpkg
The first / should probably be /usr/share

Reproducible: 

Steps to Reproduce:
Comment 1 Pascal Terjan 2013-12-16 01:10:27 CET
The path is coming from:

$ kpsewhich -var-value=TEXMFMAIN
//texmf-dist
Comment 2 Pascal Terjan 2013-12-16 01:22:19 CET
The last update to the spec does:

 perl -pi -e 's|-var-value=TEXMFROOT|-var-value=TEXMFMAIN|g;'			\
-    %{buildroot}%{texmfdir}/scripts/tetex/updmap.pl
+    %{buildroot}%{texmfdistdir}/scripts/texlive/updmap.pl

This seems to make things worse as updmap then appends /tlpkg to the result

[pterjan@chopin texlive-texmf]$ kpsewhich -var-value=TEXMFROOT
/
[pterjan@chopin texlive-texmf]$ kpsewhich -var-value=TEXMFMAIN
//texmf-dist

With TEXMFROOT we will end up with //tlpkg, with TEXMFMAIN it will give //tlpkg/tlpkg which is even worse.
Comment 3 Pascal Terjan 2013-12-16 01:22:55 CET
Sorry for the wrong phrasing, the latest update only fixes the path, it was already done previously :)
Thierry Vignaud 2013-12-16 01:25:48 CET

CC: (none) => thierry.vignaud
Assignee: bugsquad => pierre-malo.denielou

Comment 4 Malo Deniélou 2013-12-16 05:20:52 CET
Sorry, forgot to commit a patch from Fedora.
Can you test texlive-20130530-2?

Status: NEW => ASSIGNED

Comment 5 Juan Magallon 2013-12-16 10:19:53 CET
It still fails with latest package.
Don't know how the patch looks, but this worked for me:

--- texmf.cnf.orig	2013-12-16 10:08:21.056939675 +0100
+++ texmf.cnf	2013-12-16 10:09:08.386941309 +0100
@@ -51,7 +51,7 @@
 % Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
 % Kpathsea sets SELFAUTOLOC (the directory with the binary),
 % SELFAUTODIR (its parent), and SELFAUTOPARENT (its grandparent).
-TEXMFROOT = $SELFAUTOPARENT
+TEXMFROOT = $SELFAUTODIR/share
 
 % The main tree of distributed packages and programs:
 TEXMFDIST = $TEXMFROOT/texmf-dist
@@ -61,7 +61,7 @@
 TEXMFMAIN = $TEXMFDIST
 
 % Local additions to the distribution trees.
-TEXMFLOCAL = $TEXMFROOT/../texmf-local
+TEXMFLOCAL = $TEXMFROOT/texmf-local
 
 % TEXMFSYSVAR, where *-sys store cached runtime data.
 TEXMFSYSVAR = $TEXMFROOT/texmf-var

The usage of SELFAUTOPARENT looks bad, it is the _grand_parent dir...
And in local the usage of '..' looks bad also.

Then

mktexlsr
updmap-sys

and tex looks fine again.

CC: (none) => jamagallon

Comment 6 Malo Deniélou 2013-12-16 17:56:39 CET
There were still a few errors in the regexp in texlive-texmf. Please try the -2.
Comment 7 Malo Deniélou 2014-01-22 12:01:51 CET
Can you confirm that this pub is fixed?
Thanks.
Comment 8 Malo Deniélou 2014-01-25 23:56:55 CET
This is fixed now. Closing.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED