develooper Front page | perl.perl5.porters | Postings from August 2014

[perl #122609] oddity with Makefile.PL timestamps (5.20.0 - win64)

Thread Previous
From:
James E Keenan via RT
Date:
August 28, 2014 23:03
Subject:
[perl #122609] oddity with Makefile.PL timestamps (5.20.0 - win64)
Message ID:
rt-4.0.18-23837-1409267029-703.122609-15-0@perl.org
On Sun Aug 24 19:44:46 2014, anthony@ajrh.net wrote:
> Hello,
> 
> I ran into an error building perl on Windows with nmake repeatedly
> trying to rebuild out-of-date Makefiles, because Makefile.PL had a
> timestamp several hours in the future.
> 
> The reason appears to be the somewhat questionable hack in make_ext.pl
> .
>  At least on my Windows machine, the file system timestamps are in
> local
> time, so assigning a timestamp based on a time() call is prone to jump
> timezones to UTC,  as per this example:
> 
> C:\perl\bin>touch x
> C:\perl\bin>dir x
> 
> Directory of C:\perl\bin
> 24 Aug 14  10:24 pm                 0 x
> 
> C:\perl\bin>perl -e "utime time, time, q[x]"
> 
> C:\perl\bin>dir x
>   Directory of C:\perl\bin
>   25 Aug 14  03:24 am                 0 x
> 
> Below is a quick stab at a reasonable fix, just using the existing
> timestamp as a base.
>  Though n.b. I don't see many similar bug reports on google, so YMMV.
> 
> Anthony
> 
> 

Anthony,

Speaking of timestamps, how did you manage to get the May 26 2015 timestamp in the diff below? :-)

> --- make_ext.pl.Orig    2015-05-26 09:34:20.000000000 -0400
> +++ make_ext.pl 2014-08-24 20:50:17.961096800 -0400
> @@ -443,7 +443,7 @@
>             # the Makefile.PL. Altering the atime and mtime backwards
> by
>             4
>             # seconds seems to resolve the issue.
>             eval {
> -               my $ftime = time - 4;
> +               my $ftime = (stat('Makefile.PL'))[9] - 4;
>                 utime $ftime, $ftime, 'Makefile.PL';
>             };
>          } elsif ($mname =~ /\A(?:Carp
> 

BinGOs,

This touches an area where you made the last commit (diff attached).

Would you be able to evaluate this patch?

Thank you very much.
Jim Keenan


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

Thread Previous


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