Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 46585
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 6.52
Fixed in: (no value)



Subject: [PATCH] Use Cygwin path built-in functions in tests
The newly added tests in t/MM_Cygwin.t for testing /cygdrive/c/ stuff fails if the path prefix (cygdrive) is changed by the user (like I do :). The proper way to get Unix paths from Windows paths is through the use of the Cygwin::win_to_posix_path() built-in function. The attached patch corrects the test file. Thanks.
Subject: cygwin.patch
--- ExtUtils-MakeMaker-6.52/t/MM_Cygwin.t.orig 2009-06-01 10:51:51.057360300 -0400 +++ ExtUtils-MakeMaker-6.52/t/MM_Cygwin.t 2009-06-01 10:59:04.438438300 -0400 @@ -104,30 +104,29 @@ SKIP: { my $comspec = $ENV{COMSPEC}; - skip("\$ENV{COMSPEC} does not exist", 3) unless $comspec; + skip("\$ENV{COMSPEC} does not exist", 1) unless $comspec; - # Convert into cygwin-flavoured '/cygdrive/c/...' path. - # Is there a better way than direct munging? A File::* - # module perhaps? + $comspec = Cygwin::win_to_posix_path($comspec); - $comspec =~ s{^(\w):} {/cygdrive/\l$1}x; - $comspec =~ s{\\ } {/}gx; + ok(MM->maybe_command($comspec), + qq{'$comspec' should be executable"} + ); +} - ok(MM->maybe_command($comspec),"$comspec should be executable"); +# 'C:/' should *never* be executable, it's a directory. - # /cygdrive/c should *never* be executable, it's a directory. +my $cdrive = Cygwin::win_to_posix_path("C:/"); - ok(! MM->maybe_command(q{/cygdrive/c}), - qq{/cygdrive/c should never be executable} - ); +ok(! MM->maybe_command($cdrive), + qq{'$cdrive' should never be executable} +); - # Our copy of Perl (with a unix-path) should always be executable. +# Our copy of Perl (with a unix-path) should always be executable. - ok(MM->maybe_command($Config{perlpath}), - qq{$Config{perlpath} should be executable} - ); +ok(MM->maybe_command($Config{perlpath}), + qq{'$Config{perlpath}' should be executable} +); -} package FakeOut;
Thanks, I've applied your patch as ed237eb. Please check http://github.com/schwern/extutils-makemaker/commit/ed237eb860da5dd448a6916194ea26cf3bb65875 and let me know the results.
On Mon Jun 01 15:40:04 2009, MSCHWERN wrote: Show quoted text
> Thanks, I've applied your patch as ed237eb. Please check > http://github.com/schwern/extutils- > makemaker/commit/ed237eb860da5dd448a6916194ea26cf3bb65875 > and let me know the results.
This needs to be applied to blead, too. Thanks.
On Tue Jun 02 07:33:55 2009, JDHEDDEN wrote: Show quoted text
> On Mon Jun 01 15:40:04 2009, MSCHWERN wrote:
> > Thanks, I've applied your patch as ed237eb. Please check > > http://github.com/schwern/extutils- > > makemaker/commit/ed237eb860da5dd448a6916194ea26cf3bb65875 > > and let me know the results.
> > This needs to be applied to blead, too. Thanks.
That will happen as part of the normal p5p maint process. Feel free to patch it in specifically if you can't wait.
Cygwin::win_to_posix_path() appears to be a recent thing introduced in 2007. Can't use it. See http://www.nntp.perl.org/group/perl.cpan.testers/2009/06/msg4146197.html What else you got?
Subject: Re: [rt.cpan.org #46585] [PATCH] Use Cygwin path built-in functions in tests
Date: Tue, 23 Jun 2009 16:34:00 -0400
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: "Jerry D. Hedden" <jdhedden [...] cpan.org>
On Tue, Jun 23, 2009 at 4:20 PM, Michael G Schwern via RT <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=46585 > > > Cygwin::win_to_posix_path() appears to be a recent thing introduced in > 2007.  Can't use it.  See > http://www.nntp.perl.org/group/perl.cpan.testers/2009/06/msg4146197.html > > What else you got?
There is no alternative. You'll need to skip the test if Cygwin::win_to_posix_path() is not available. Updated patch attached.

Message body is not shown because sender requested not to inline it.

Fixed in 254f2c7309dabe977f9b05d8905fb705e6ccd12c