[tex-live] possible tlmgr bug
Maxwell, Adam R
adam.maxwell at pnl.gov
Wed May 4 18:26:57 CEST 2011
On May 4, 2011, at 08:29, Philipp Stephani wrote:
> Am 04.05.2011 um 15:55 schrieb Adam R. Maxwell:
>
>> On May 4, 2011, at 00:05 , Reinhard Kotucha wrote:
>>
>>> Sorry, but I fear that there are some other scripts in TeX Live which
>>> can't deal with spaces in filenames. They can't be fixed easily and
>>> it would make more sense to re-write them in Perl in order to make
>>> them work on Windows too.
>>
>> So this line in TLUtils.pm will handle spaces correctly? It's
>> approximately near the one Artemio called out:
>>
>> chomp (my $guessed_platform = `/bin/sh $config_guess`);
>>
>> Are backticks in Perl handled differently from Bourne shell?
>
> AFAIK it is passed directly to the shell which does word splitting.
I don't grok Perl, but that appears to be confirmed by
http://perldoc.perl.org/perlop.html#%60STRING%60
Consequently, one might conclude that merely rewriting all scripts in Perl
will not make them work as desired :).
> For myself I tend to avoid calling the shell whenever possible when I try to write OS-independent code. The popular "system" function in C is probably the biggest source of problems; it should be replaced by direct process creation
Agreed, and I'd include popen(3) as another source of problems.
> Then even something like `/bin/sh '$config_guess'` might work (unless the path $config_guess contains an ASCII apostrophe, of course).
Still, though, Perl must have a way to pass argv directly to /bin/sh and
capture stdout...right? If not, some quoting appears to be required, as
is done elsewhere in that file ($tarfile_quote).
More information about the tex-live
mailing list