This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bisect-runner: Work around ./Configure -S bug
authorFather Chrysostomos <sprout@cpan.org>
Tue, 17 May 2016 20:37:46 +0000 (13:37 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 17 May 2016 20:37:46 +0000 (13:37 -0700)
v5.23.4-46-g41d7307 stopped ./Configure -S from working.
In v5.23.5-89-g7a4fcb3, it started working again.

In order to bisect in this region, copy the optdef.sh file, which
Configure was invoking from the wrong path.

This patch actually works this time (I hope).

Porting/bisect-runner.pl

index 4c1cce9..360c186 100755 (executable)
@@ -1403,7 +1403,15 @@ if (-f 'config.sh') {
     # Emulate noextensions if Configure doesn't support it.
     fake_noextensions()
         if $major < 10 && $defines{noextensions};
-    system_or_die('./Configure -S');
+    if (system './Configure -S') {
+        # See commit v5.23.5-89-g7a4fcb3.  Configure may try to run
+        # ./optdef.sh instead of UU/optdef.sh.  Copying the file is
+        # easier than patching Configure (which mentions optdef.sh multi-
+        # ple times).
+        require File::Copy;
+        File::Copy::copy("UU/optdef.sh", "./optdef.sh");
+        system_or_die('./Configure -S');
+    }
 }
 
 if ($target =~ /config\.s?h/) {