[tex-live] pretest in winXP

T T t34www at googlemail.com
Wed Jun 2 11:45:15 CEST 2010


On 2 June 2010 04:25, Dan&Jan Luecking <luecking at uark.edu> wrote:
> You wrote:
>
>>I wrote:
>
>>> For example, running
>>>  pst2pdf filename
>>> produces a message from runscript that no suitable script can be
>>> found. Renaming texmf-dist/scripts/pst2pdf/pst2pdf to pst2pdf.pl
>>> allows the command to succeed.
>
>>This is really strange.  That problem should be gone for months now.
>>I tried purifyeps and texloganalyser from the list you gave and both
>>worked for me on TL'09 (should be the same for TL'10).  (Well,
>>purifyeps actually failed but due to missing perl module - the script
>>itself was found.)
>
> Actually, I misinterpreted the message. The script is found, but
> is not run. Here is the exact message:
> [C:\work\testing]pst2pdf chap1
> TEXDIR  C:/TL/2010
> C:\TL\2010\bin\win32\runscript.tlu:559:
> C:\TL\2010\bin\win32\runscript.tlu:525: don't know how to execute script:
> c:/TL/2010/texmf-dist/scripts/pst2pdf/pst2pdf
>
> Also, since adding the extension allowed it to work, I thought that
> was what was required. However, most of the scripts I listed actually
> do work without name changes. It appears to be a function of the first
> line in the file. If it says something like
>  #!/usr/bin/perl
> then it is run with perl. But pst2pdf starts with
>  eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S
> $0 $argv:q'
> and doesn't work. On the other hand, giving it an extension makes it work.

Yes, because extensionless scripts are executed based on the #!
(she-bang) line but (from the runscript.tlu source):

-- only the two most common cases are considered:
-- #! /path/to/command [options]
-- #! /usr/bin/env command [options]
-- ([options] after the command are retained as well)

I'm afraid it's not possible to support contortions like the one in
pst2pdf - it would require implementing Perl parser.

Karl, if you are listening, could we add the '.pl' extension to just
this one script for the sake of making it runnable at all.

> For python scripts that start with
>  #!/usr/bin/python -O
> I get
>  [C:\work/test]de-macro
> TEXDIR  C:/TL/2010
> C:\TL\2010\bin\win32\runscript.tlu:559:
> C:\TL\2010\bin\win32\runscript.tlu:529: program not found (not part of TeX
> Live): python

Correct and expected, since we don't ship python with TL.

> If the extension .py is added, I get (at home where python is not installed)
>
> [C:\work\test]de-macro
> TEXDIR  C:/TL/2010
> C:\TL\2010\bin\win32\runscript.tlu:559:
> C:\TL\2010\bin\win32\runscript.tlu:517: no appropriate script or program
> found: de-macro

You probably forgot to run mkteslsr after changing the extension and
kpathsea still uses the old file database for searching.

> It seems to me that adding the extension works more often than relying
> on the initial line of the file.

AFAIK (Karl, please correct me on this if I'm wrong), we try not to
change the upstream files unless necessary, because this complicates
automated updates from CTAN.

Cheers,

Tomek



More information about the tex-live mailing list