bisect.pl avoids perl-5.004 and earlier on case insensitive systems.
authorNicholas Clark <nick@ccl4.org>
Fri, 25 Nov 2011 17:39:04 +0000 (18:39 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 25 Nov 2011 17:39:04 +0000 (18:39 +0100)
bisect.pl now probes to see if the checkout is on a case insensitive file
system (such as the default HFS+ on OS X), and if so, uses perl-5.005 as
the earliest stable release to test.

This should make bisect.pl "just work" on a typical OS X system, for the
vast majority of use cases.

Porting/bisect-runner.pl
Porting/bisect.pl

index fa88c6e..be0ed7e 100755 (executable)
@@ -184,8 +184,10 @@ If your F<db.h> is old enough you can override this with C<-Unoextensions>.
 
 Earliest revision to test, as a I<commit-ish> (a tag, commit or anything
 else C<git> understands as a revision). If not specified, F<bisect.pl> will
-search stable perl releases from 5.002 to 5.14.0 until it finds one where
-the test case passes.
+search stable perl releases until it finds one where the test case passes.
+The default is to search from 5.002 to 5.14.0. If F<bisect.pl> detects that
+the checkout is on a case insensitive file system, it will search from
+5.005 to 5.14.0
 
 =item *
 
@@ -425,7 +427,8 @@ Passing this to F<bisect.pl> will likely cause the bisect to fail badly.
 --validate
 
 Test that all stable revisions can be built. By default, attempts to build
-I<blead>, I<v5.14.0> .. I<perl-5.002>. Stops at the first failure, without
+I<blead>, I<v5.14.0> .. I<perl-5.002> (or I<perl5.005> on a case insensitive
+file system). Stops at the first failure, without
 cleaning the checkout. Use I<--start> to specify the earliest revision to
 test, I<--end> to specify the most recent. Useful for validating a new
 OS/CPU/compiler combination. For example
index f2e68ce..ee7214f 100755 (executable)
@@ -35,8 +35,18 @@ die "Can't find bisect runner $runner" unless -f $runner;
 system $^X, $runner, '--check-args', '--check-shebang', @ARGV and exit 255;
 
 # We try these in this order for the start revision if none is specified.
-my @stable = qw(perl-5.002 perl-5.003 perl-5.004 perl-5.005 perl-5.6.0
-                perl-5.8.0 v5.10.0 v5.12.0 v5.14.0);
+my @stable = qw(perl-5.005 perl-5.6.0 perl-5.8.0 v5.10.0 v5.12.0 v5.14.0);
+
+{
+    my ($dev_C, $ino_C) = stat 'Configure';
+    my ($dev_c, $ino_c) = stat 'configure';
+    if (defined $dev_C && defined $dev_c
+        && $dev_C == $dev_c && $ino_C == $ino_c) {
+        print "You seem to to be on a case insensitive file system.\n\n";
+    } else {
+        unshift @stable, qw(perl-5.002 perl-5.003 perl-5.004)
+    }
+}
 
 $end = 'blead' unless defined $end;