Discussion:
ctan-o-mat in 2018 pretest
Add Reply
David Carlisle
2018-04-13 22:13:11 UTC
Reply
Permalink
Raw Message
running ctan-o-mat (from anywhere) in cygwin tl pretest I get the error

$ ctan-o-mat
Can't open perl script
"/usr/local/texlive/2018/bin/x86_64-cygwin/ctan-o-mat.pl": No such
file or directory



It just tries to exec
exec perl "$0.pl" "$@"


so the one in the bin directory in the path doesn't find the actual
perl in scripts, it seems to work fine if called directly:

$ perl /usr/local/texlive/2018/texmf-dist/scripts/ctan-o-mat/ctan-o-mat.pl
--version
1.2

not sure if this is an issue with the upstrean ctan-o-mat or the way
it's packaged in TL?

David
Gerd Neugebauer
2018-04-13 22:22:54 UTC
Reply
Permalink
Raw Message
Post by David Carlisle
running ctan-o-mat (from anywhere) in cygwin tl pretest I get the error
$ ctan-o-mat
Can't open perl script
"/usr/local/texlive/2018/bin/x86_64-cygwin/ctan-o-mat.pl": No such
file or directory
[...]
Post by David Carlisle
not sure if this is an issue with the upstrean ctan-o-mat or the way
it's packaged in TL?
This seems pretty sure to be a problem of the packaging.

BTW. I have reworked ctan-o-mat to hide the perl script and make it more fail safe. But this hasn't made it to CTAN yet.
Post by David Carlisle
David
Ciao
Gerd
Reinhard Kotucha
2018-04-13 23:10:09 UTC
Reply
Permalink
Raw Message
Post by Gerd Neugebauer
Post by David Carlisle
running ctan-o-mat (from anywhere) in cygwin tl pretest I get the error
$ ctan-o-mat
Can't open perl script
"/usr/local/texlive/2018/bin/x86_64-cygwin/ctan-o-mat.pl": No such
file or directory
[...]
Post by David Carlisle
not sure if this is an issue with the upstrean ctan-o-mat or the
way it's packaged in TL?
This seems pretty sure to be a problem of the packaging.
BTW. I have reworked ctan-o-mat to hide the perl script and make it
more fail safe. But this hasn't made it to CTAN yet.
Hi Gerd,
what does "to hide the perl script" mean?

BTW, the preferred shebang line (in ctan-o-mat.pl) is

#!/usr/bin/env perl

This allows that Perl is found in PATH. Some users might have a newer
version of Perl in /usr/local/bin.

The wrapper script (ctan-o-mat) isn't needed. If properly installed,
TeX Live creates symlinks to *.pl files in bin/<platform> directories
for all Unix systems and a runscript wrapper in bin/win32 which also
makes the Perl shipped with TeX Live visible to the script.

All you have to do is to provide the .pl file.

For more info about the wrapper for Windows, see the comments in

http://tug.org/svn/texlive/trunk/Master/bin/win32/runscript.tlu

Please note that the Perl for Windows shipped with TL doesn't contain
all the packages available from CPAN. It's advisable to test the
script on Windows.

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Reinhard Kotucha
2018-04-14 00:07:30 UTC
Reply
Permalink
Raw Message
Post by Reinhard Kotucha
BTW, the preferred shebang line (in ctan-o-mat.pl) is
#!/usr/bin/env perl
Please note that env assumes that everything before EOL is one
argument, hence if you say

#!/usr/bin/env perl -w

it looks for a program "perl -w". In order to turn warnings on, use

$^W=1;

in your script or, if desired,

BEGIN {
$^W=1;
}

The latter turns warnings on before the script is compiled, otherwise
warnings are issued only at run-time.

Regards,
Reinhad
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Gerd Neugebauer
2018-04-14 06:44:17 UTC
Reply
Permalink
Raw Message
Post by Reinhard Kotucha
Post by Reinhard Kotucha
BTW, the preferred shebang line (in ctan-o-mat.pl) is
#!/usr/bin/env perl
Please note that env assumes that everything before EOL is one
argument, hence if you say
#!/usr/bin/env perl -w
[...]
Thanks for the hints. I had already changed it accordingly in my dev environment.

Ciao
Gerd
Gerd Neugebauer
2018-04-14 06:58:25 UTC
Reply
Permalink
Raw Message
[...]
Post by Reinhard Kotucha
Post by Gerd Neugebauer
BTW. I have reworked ctan-o-mat to hide the perl script and make it
more fail safe. But this hasn't made it to CTAN yet.
Hi Gerd,
Hi Reinhard,
Post by Reinhard Kotucha
what does "to hide the perl script" mean?
This means it is less prominent that the program is perl. I have eiminated the wrapper script for Unix by renaming the perl script to its base name and adapting the shebang line.
[...]
Post by Reinhard Kotucha
The wrapper script (ctan-o-mat) isn't needed. If properly installed,
TeX Live creates symlinks to *.pl files in bin/<platform> directories
for all Unix systems and a runscript wrapper in bin/win32 which also
makes the Perl shipped with TeX Live visible to the script.
ctan-o-mat is not TeX Live-only. I make a program which is supposed to work almost everywhere. It's ok if TeX Live integrates it any way desirable. But this does not relieve me from supporting the rest of the world.
Post by Reinhard Kotucha
All you have to do is to provide the .pl file.
It will be still there for anyone to use it.
Post by Reinhard Kotucha
For more info about the wrapper for Windows, see the comments in
http://tug.org/svn/texlive/trunk/Master/bin/win32/runscript.tlu
I have my own wrapper for windows (for non-TeX Live) which I have rewritten from scratch. I managed to test it at least rudimentary.
Post by Reinhard Kotucha
Please note that the Perl for Windows shipped with TL doesn't contain
all the packages available from CPAN. It's advisable to test the
script on Windows.
I am aware of this. I tried to use only few and stable modules
Post by Reinhard Kotucha
Regards,
Reinhard
Ciao
Gerd

Ken Brown
2018-04-14 01:42:56 UTC
Reply
Permalink
Raw Message
Post by David Carlisle
running ctan-o-mat (from anywhere) in cygwin tl pretest I get the error
$ ctan-o-mat
Can't open perl script
"/usr/local/texlive/2018/bin/x86_64-cygwin/ctan-o-mat.pl": No such
file or directory
It just tries to exec
so the one in the bin directory in the path doesn't find the actual
$ perl /usr/local/texlive/2018/texmf-dist/scripts/ctan-o-mat/ctan-o-mat.pl
--version
1.2
not sure if this is an issue with the upstrean ctan-o-mat or the way
it's packaged in TL?
The symlink /usr/local/texlive/2018/bin/x86_64-cygwin/ctan-o-mat is
wrong on Cygwin. It points to the shell script
../../texmf-dist/scripts/ctan-o-mat/ctan-o-mat instead of the perl
script ../../texmf-dist/scripts/ctan-o-mat/ctan-o-mat.pl as it does on
other unix-like platforms.

This was probably my fault, but I've just committed the correct symlink.
I apologize, and I hope this commit will still make into the release.
If not, it will have to be fixed afterwards.

Ken
Loading...