Michael G Schwern via RT wrote:
Show quoted text> <URL:
http://rt.cpan.org/Ticket/Display.html?id=29955 >
>
> Ken Hirsch via RT wrote:
>
>>> As an alternative, what about setting the mod time of the Makefile.PL
>>>
>> to be
>>
>>> one second in the past?
>>>
>>>
>> That would be faster, but I'd worry that it might actually break things
>> in certain cases.
>>
>
> Can you think of those certain cases?
>
>
Just those where utime is "broken". Hopefully calibrate_mtime will take
care of those.
Sorry about the delay. Here's the patch. I ran it so in order to test it:
gunzip <ExtUtils-MakeMaker-6.36.tar.gz | tar xof -
cd ExtUtils-MakeMaker-6.36
patch -p1 <../patch
perl Makefile.PL
make test
....
All tests successful, 7 tests and 31 subtests skipped.
Files=44, Tests=589, 52 wallclock secs (27.33 cusr + 11.22 csys = 38.55 CPU)
--- ExtUtils-MakeMaker-6.36/t/lib/MakeMaker/Test/Setup/BFD.pm 2006-09-02 15:14:32.000000000 -0400
+++ ExtUtils-MakeMaker-NEW/t/lib/MakeMaker/Test/Setup/BFD.pm 2007-10-23 15:14:04.000000000 -0400
@@ -108,6 +108,9 @@
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file; # ensure file at least 1 second old
}
return 1;
--- ExtUtils-MakeMaker-6.36/t/lib/MakeMaker/Test/Setup/PL_FILES.pm 2006-09-02 15:14:32.000000000 -0400
+++ ExtUtils-MakeMaker-NEW/t/lib/MakeMaker/Test/Setup/PL_FILES.pm 2007-10-23 15:14:04.000000000 -0400
@@ -100,6 +100,9 @@
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file; # ensure file at least 1 second old
}
return 1;
--- ExtUtils-MakeMaker-6.36/t/lib/MakeMaker/Test/Setup/Problem.pm 2006-09-02 15:14:32.000000000 -0400
+++ ExtUtils-MakeMaker-NEW/t/lib/MakeMaker/Test/Setup/Problem.pm 2007-11-14 10:20:54.000000000 -0500
@@ -7,6 +7,7 @@
use strict;
use File::Path;
use File::Basename;
+use MakeMaker::Test::Utils;
my %Files = (
'Problem-Module/Makefile.PL' => <<'END',
@@ -37,6 +38,9 @@
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file; # ensure file at least 1 second old
}
return 1;
--- ExtUtils-MakeMaker-6.36/t/lib/MakeMaker/Test/Setup/Recurs.pm 2007-06-29 02:37:47.000000000 -0400
+++ ExtUtils-MakeMaker-NEW/t/lib/MakeMaker/Test/Setup/Recurs.pm 2007-10-23 15:14:04.000000000 -0400
@@ -50,6 +50,9 @@
open(FILE, ">$file") || die "Can't create $file: $!";
print FILE $text;
close FILE;
+
+ my $time = calibrate_mtime();
+ utime $time, $time - 1, $file; # ensure file at least 1 second old
}
return 1;