LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   BUG: pedigree module in texlive-2019.190626-x86_64-4 broken (https://www.linuxquestions.org/questions/slackware-14/bug-pedigree-module-in-texlive-2019-190626-x86_64-4-broken-4175675912/)

gildbg 05-26-2020 03:32 AM

BUG: pedigree module in texlive-2019.190626-x86_64-4 broken
 
Hello,

pedigree - create a TeX file for pedigree from a csv file is broken on Slackware-current64. This module is in package texlive-2019.190626-x86_64-4

root@p:~# pedigree
Can't locate Pedigree.pm in @INC (you may need to install the Pedigree module) (@INC contains: //texmf-dist/scripts/pedigree-perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/pedigree line 124.
BEGIN failed--compilation aborted at /usr/bin/pedigree line 124.

and on user the same result:

$ pedigree
Can't locate Pedigree.pm in @INC (you may need to install the Pedigree module) (@INC contains: //texmf-dist/scripts/pedigree-perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/bin/pedigree line 124.
BEGIN failed--compilation aborted at /usr/bin/pedigree line 124.


Line 124 on file pedigree in /usr/bin need to be changed

From:

Code:

use Pedigree
To :

Code:

use lib '/usr/share/texmf-dist/scripts/pedigree-perl/Pedigree';
Regards,

slacktroll 05-27-2020 12:26 PM

It's probably a feature in the perl slackbuild that causes this, (why would it search -> @INC contains: '//texmf-dist/scripts/pedigree-perl')

ponce 05-27-2020 12:52 PM

I think the issue is with the command "kpsewhich -var-value=SELFAUTOPARENT" that isn't able to return the correct path, "/usr/share", and returns instead "/" (and that is included in @INC later in pedigree.pl): IMHO the just-fix-it-I-dont-care solution should be to run a sed like that in the packaged texlive
Code:

sed -i 's|`kpsewhich -var-value=SELFAUTOPARENT`|"/usr/share/"|' $PKG/usr/share/texmf-dist/scripts/*/*.pl
but it's just a workaround, because the thing to actually fix should be kpsewhich.
maybe the texlive maintainer on SBo, Johannes, could have a better fix...

drumz 05-27-2020 01:27 PM

According to https://tug.org/texinfohtml/kpathsea.html
Quote:

Finally, it sets the environment variables SELFAUTOLOC, SELFAUTODIR and SELFAUTOPARENT to the location, parent and grandparent directory of the executable, removing . and .. path elements and resolving symbolic links. These are used in the default configuration file to allow people to invoke TeX from anywhere. You can use ‘kpsewhich --expand-var=\$SELFAUTOLOC’, etc., to see the values.
And on my machine (running 14.2 with texlive from SBo):
Code:

$ which kpsewhich
/usr/bin/kpsewhich
$ kpsewhich -var-value=SELFAUTOLOC
/usr/bin
$ kpsewhich -var-value=SELFAUTODIR
/usr
$ kpsewhich -var-value=SELFAUTOPARENT
/

So it appears to me kpsewhich is working correctly. Maybe the pedigree perl file has a bug? I don't know.

FYI:
Code:

$ grep "kpsewhich -var-value=SELFAUTOPARENT" /usr/share/texmf-dist/scripts/*/*.pl                     
/usr/share/texmf-dist/scripts/cjk-gs-integrate/cjk-gs-integrate.pl:    chomp(my $foo = `kpsewhich -var-value=SELFAUTOPARENT`);
/usr/share/texmf-dist/scripts/crossrefware/bbl2bib.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/crossrefware/bibdoiadd.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/crossrefware/bibmradd.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/crossrefware/biburl2doi.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/crossrefware/bibzbladd.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/share/texmf-dist/scripts/pedigree-perl/pedigree.pl:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root


franzen 05-28-2020 12:04 AM

Quote:

Originally Posted by ponce (Post 6127952)
I think the issue is with the command "kpsewhich -var-value=SELFAUTOPARENT" that isn't able to return the correct path, "/usr/share", and returns instead "/"

The idea on that in the buildscript is, that binaries/links from texlive may reside in /usr/bin and not in /usr/share/texmf-dist/bin.
It was a pain at least for me, that TeTeX had that extra PATH added bei profile.sh which e.g. is causing build issues on SBo when builders didn't correctly "su -". That feels like putting e.g. named to /opt/bin to me ;-)

So i'll see what i can do for pedigree, i have no immediate optimal fix. Maybe poking in kpsewhich.

bassmadrigal 05-28-2020 10:24 AM

Quote:

Originally Posted by franzen (Post 6128143)
So i'll see what i can do for pedigree, i have no immediate optimal fix. Maybe poking in kpsewhich.

It looks like there's several scripts in /usr/bin that will have the same problem:

Code:

jbhansen@febtober:~$ grep -R "kpsewhich -var-value=SELFAUTOPARENT" /usr/bin/
/usr/bin/bbl2bib:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/biburl2doi:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/ltx2crossrefxml:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/bibzbladd:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/bibdoiadd:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/bibmradd:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
/usr/bin/pedigree:    chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root

I tried to find a list of variables supported by kpsewhich, to see if any had "/usr/share" output, but I came up blank (although, I don't really use texlive, so my knowledge is limited). If you can't find a kpsewhich variable for /usr/share, you may want to use ponce's sed line on the above scripts.

franzen 05-29-2020 01:19 PM

From the texlive mailinglist i was told, that it's a fail from the perl-script maintainer(which is informed now),
and that a fix like ponce suggested would do it.
Hopefully the maintainer fixes his scripts, so it will be automatically fixed here with the next release.

franzen 06-24-2020 08:23 AM

Quote:

Originally Posted by gildbg (Post 6127386)
pedigree - create a TeX file for pedigree from a csv file is broken on Slackware-current64.

Should be fixed now, you may mark the thread as solved.


All times are GMT -5. The time now is 06:04 AM.