develooper Front page | perl.perl5.porters | Postings from September 2016

[perl #129152] mkpport adds quotes to $perl even if it's alreadyquoted

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
September 1, 2016 00:03
Subject:
[perl #129152] mkpport adds quotes to $perl even if it's alreadyquoted
Message ID:
rt-4.0.24-21267-1472688173-1957.129152-15-0@perl.org
On Wed Aug 31 10:17:28 2016, craig.a.berry@gmail.com wrote:
> On Wed, Aug 31, 2016 at 11:43 AM, James E Keenan via RT
> <perlbug-followup@perl.org> wrote:
> > On Wed Aug 31 07:38:33 2016, comdog wrote:
> >> I'm compiling 5.25.4 from a path with a space character in it. It
> >> fails from a double double quoting issue that tries to run a command
> >> like:
> >>
> >> ""/Path/To Some/Place/perl"" ...
> >>
> >> which_perl from MakeMaker::Test::Utils returns a path already quoted,
> >> like q("/Path/To Some/Place/perl"). The run subroutine in mkpport
> >> checks for whitespace in $perl and adds another layer of double quotes
> >> around the string if it finds whitespace. It should only do that if
> >> the value doesn't already have those quotes.
> >
> > So, to confirm this problem, I created this directory:
> 
> Since you've got a test set-up handy, try replacing this line
> 
>   my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
> 
> from:
> 
> http://perl5.git.perl.org/perl.git/blob/HEAD:/mkppport#l140
> 
> with
> 
>   my $run = ($perl !~ m/^\"/) && ($perl =~ m/\s/) ? qq("$perl") : $perl;
> 
> and see if that prevents the double quoting.
> 

Substituting in that one line, 'make' completes successfully.  However, there are massive test failures.  Here is a taste of those:


#####
t/base/term .................................................... sh: 1: /home/jkeenan/Downloads/My: not found
FAILED at test 2
t/base/translate ............................................... ok
[snip]
t/run/cloexec .................................................. # Failed test 3 - child stdout: has 1 newline (rc=127, should be non-zero) at run/cloexec.t line 98
#      got "0"
# expected == "1"
# Failed test 4 - child stdout: fd at run/cloexec.t line 100
#      got ""
# expected "childfd=3\n"
sh: 1: /home/jkeenan/Downloads/My: not found
# Failed test 7 - child return code=127 (zero means inherited fd=3 ok) at run/cloexec.t line 109
#      got "127"
# expected == "0"
# Failed test 8 - child stdout: has 2 newlines at run/cloexec.t line 112
#      got "0"
# expected == "2"
# Failed test 9 - child stdout: split into 2 lines at run/cloexec.t line 113
#      got "0"
# expected == "2"
# Failed test 10 - child stdout: fd at run/cloexec.t line 114
#      got undef
# expected "childfd=3\n"
# Failed test 11 - child stdout: line 1 at run/cloexec.t line 115
#      got undef
# expected "tmpfile1 line 1\n"
# Failed test 14 - child stdout: has 1 newline (rc=127, should be non-zero) at run/cloexec.t line 98
#      got "0"
# expected == "1"
# Failed test 15 - child stdout: fd at run/cloexec.t line 100
#      got ""
# expected "childfd=4\n"
sh: 1: /home/jkeenan/Downloads/My: not found
# Failed test 18 - child return code=127 (zero means inherited fd=4 ok) at run/cloexec.t line 109
#      got "127"
# expected == "0"
# Failed test 19 - child stdout: has 2 newlines at run/cloexec.t line 112
#      got "0"
# expected == "2"
# Failed test 20 - child stdout: split into 2 lines at run/cloexec.t line 113
#      got "0"
# expected == "2"
# Failed test 21 - child stdout: fd at run/cloexec.t line 114
#      got undef
# expected "childfd=4\n"
# Failed test 22 - child stdout: line 1 at run/cloexec.t line 115
#      got undef
# expected "tmpfile1 line 1\n"
FAILED at test 3
t/run/dtrace ................................................... skipped

#####

I tried similar replacements this morning and got similar results.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129152

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About