This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bisect-runner.pl should avoid ext/Hash/Util/FieldHash being built twice.
authorNicholas Clark <nick@ccl4.org>
Fri, 25 Nov 2011 11:19:45 +0000 (12:19 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 25 Nov 2011 11:19:45 +0000 (12:19 +0100)
Commit 550428fe486b1888 stopped the invocation of ext/Hash/Util/Makefile.PL
automatically recursing to ext/Hash/Util/FieldHash/Makefile.PL, as make_ext
was also calling it directly. This then resulted in two makes running in
parallel in ext/Hash/Util/FieldHash, which could all end in tears (and
failed builds). Hence we need to apply this fix if it isn't present, to
avoid spurious build failures during bisect runs.

Porting/bisect-runner.pl

index 81bc7fe..1f38589 100755 (executable)
@@ -2536,6 +2536,16 @@ sub patch_ext {
         apply_commit('6695a346c41138df');
     }
 
         apply_commit('6695a346c41138df');
     }
 
+    if (-f 'ext/Hash/Util/Makefile.PL'
+        && extract_from_file('ext/Hash/Util/Makefile.PL',
+                             qr/\bDIR\b.*'FieldHash'/)) {
+        # ext/Hash/Util/Makefile.PL should not recurse to FieldHash's Makefile.PL
+        # *nix, VMS and Win32 all know how to (and have to) call the latter directly.
+        # As is, targets in ext/Hash/Util/FieldHash get called twice, which may result
+        # in race conditions, and certainly messes up make clean; make distclean;
+        apply_commit('550428fe486b1888');
+    }
+
     if ($major < 8 && $^O eq 'darwin' && !-f 'ext/DynaLoader/dl_dyld.xs') {
         checkout_file('ext/DynaLoader/dl_dyld.xs', 'f556e5b971932902');
         apply_patch(<<'EOPATCH');
     if ($major < 8 && $^O eq 'darwin' && !-f 'ext/DynaLoader/dl_dyld.xs') {
         checkout_file('ext/DynaLoader/dl_dyld.xs', 'f556e5b971932902');
         apply_patch(<<'EOPATCH');