Change 33460 by [EMAIL PROTECTED] on 2008/03/10 13:58:15

        Upgrade to ExtUtils-Install-1.50

Affected files ...

... //depot/perl/lib/ExtUtils/Install.pm#58 edit
... //depot/perl/lib/ExtUtils/t/Install.t#10 edit
... //depot/perl/lib/ExtUtils/t/Installapi2.t#2 edit
... //depot/perl/lib/ExtUtils/t/can_write_dir.t#2 edit

Differences ...

==== //depot/perl/lib/ExtUtils/Install.pm#58 (text) ====
Index: perl/lib/ExtUtils/Install.pm
--- perl/lib/ExtUtils/Install.pm#57~33410~      2008-03-02 10:37:45.000000000 
-0800
+++ perl/lib/ExtUtils/Install.pm        2008-03-10 06:58:15.000000000 -0700
@@ -2,8 +2,6 @@
 use strict;
 
 use vars qw(@ISA @EXPORT $VERSION $MUST_REBOOT %Config);
-$VERSION = '1.47';
-$VERSION = eval $VERSION;
 
 use AutoSplit;
 use Carp ();
@@ -22,6 +20,8 @@
 @ISA = ('Exporter');
 @EXPORT = ('install','uninstall','pm_to_blib', 'install_default');
 
+=pod 
+
 =head1 NAME
 
 ExtUtils::Install - install files from here to there
@@ -35,6 +35,17 @@
   uninstall($packlist);
 
   pm_to_blib({ 'lib/Foo/Bar.pm' => 'blib/lib/Foo/Bar.pm' });
+    
+=head1 VERSION
+
+1.50
+
+=cut
+
+$VERSION = '1.50';
+$VERSION = eval $VERSION;
+
+=pod
 
 =head1 DESCRIPTION
 
@@ -271,6 +282,7 @@
 }
 
 
+=pod
 
 =head2 Functions
 
@@ -333,19 +345,20 @@
     return $skip
 }
 
+=pod
+
 =item _have_write_access
 
 Abstract a -w check that tries to use POSIX::access() if possible.
 
 =cut
 
-
 {
     my  $has_posix;
     sub _have_write_access {
         my $dir=shift;
-        if (!defined $has_posix) {
-            $has_posix=eval 'local $^W; require POSIX; 1' || 0;
+        unless (defined $has_posix) {
+            $has_posix= (!$Is_cygwin && eval 'local $^W; require POSIX; 1') || 
0; 
         }
         if ($has_posix) {
             return POSIX::access($dir, POSIX::W_OK());
@@ -355,6 +368,7 @@
     }
 }
 
+=pod
 
 =item _can_write_dir(C<$dir>)
 
@@ -408,6 +422,8 @@
     return 0;
 }
 
+=pod
+
 =item _mkpath($dir,$show,$mode,$verbose,$dry_run)
 
 Wrapper around File::Path::mkpath() to handle errors.
@@ -454,6 +470,8 @@
     
 }
 
+=pod
+
 =item _copy($from,$to,$verbose,$dry_run)
 
 Wrapper around File::Copy::copy to handle errors.
@@ -478,6 +496,8 @@
     }
 }
 
+=pod
+
 =item _chdir($from)
 
 Wrapper around chdir to catch errors.
@@ -499,6 +519,8 @@
     return $ret;
 }
 
+=pod
+
 =end _private
 
 =over 4
@@ -569,7 +591,7 @@
 The $always_copy parameter which when true causes files to be updated 
 regardles as to whether they have changed, if it is defined but false then 
 copies are made only if the files have changed, if it is undefined then the 
-value of the environment variable EU_ALWAYS_COPY is used as default.
+value of the environment variable EU_INSTALL_ALWAYS_COPY is used as default.
 
 The %result hash will be populated with the various keys/subhashes reflecting 
 the install. Currently these keys and their structure are:
@@ -636,7 +658,9 @@
     $dry_run  ||= 0;
 
     $skip= _get_install_skip($skip,$verbose);
-    $always_copy = $ENV{EU_ALWAYS_COPY}||0 
+    $always_copy =  $ENV{EU_INSTALL_ALWAYS_COPY}
+                 || $ENV{EU_ALWAYS_COPY} 
+                 || 0
         unless defined $always_copy;
 
     my(%from_to) = %$from_to;
@@ -893,6 +917,7 @@
   return $files;
 }
 
+=pod
 
 =item B<install_default> I<DISCOURAGED>
 
@@ -1092,6 +1117,7 @@
     close CMD or die "Filter command '$cmd' failed for $src";
 }
 
+=pod
 
 =item B<pm_to_blib>
 
@@ -1233,6 +1259,7 @@
     return $builder;
 }
 
+=pod
 
 =back
 
@@ -1253,11 +1280,15 @@
 If there is no INSTALL.SKIP file in the make directory then this value
 can be used to provide a default.
 
-=item B<EU_ALWAYS_COPY>
+=item B<EU_INSTALL_ALWAYS_COPY>
 
 If this environment variable is true then normal install processes will
 always overwrite older identical files during the install process.
 
+Note that the alias EU_ALWAYS_COPY will be supported if EU_INSTALL_ALWAYS_COPY
+is not defined until at least the 1.50 release. Please ensure you use the
+correct EU_INSTALL_ALWAYS_COPY. 
+
 =back
 
 =head1 AUTHOR

==== //depot/perl/lib/ExtUtils/t/Install.t#10 (text) ====
Index: perl/lib/ExtUtils/t/Install.t
--- perl/lib/ExtUtils/t/Install.t#9~33404~      2008-03-01 06:40:16.000000000 
-0800
+++ perl/lib/ExtUtils/t/Install.t       2008-03-10 06:58:15.000000000 -0700
@@ -22,6 +22,9 @@
 use MakeMaker::Test::Setup::BFD;
 
 BEGIN { use_ok('ExtUtils::Install') }
+# ensure the env doesnt pollute our tests
+local $ENV{EU_INSTALL_ALWAYS_COPY};
+local $ENV{EU_ALWAYS_COPY};    
 
 # Check exports.
 foreach my $func (qw(install uninstall pm_to_blib install_default)) {

==== //depot/perl/lib/ExtUtils/t/Installapi2.t#2 (text) ====
Index: perl/lib/ExtUtils/t/Installapi2.t
--- perl/lib/ExtUtils/t/Installapi2.t#1~33410~  2008-03-02 10:37:45.000000000 
-0800
+++ perl/lib/ExtUtils/t/Installapi2.t   2008-03-10 06:58:15.000000000 -0700
@@ -34,7 +34,10 @@
     ok( chdir File::Spec->updir );
     ok( teardown_recurs(), 'teardown' );
 }
-
+# ensure the env doesnt pollute our tests
+local $ENV{EU_INSTALL_ALWAYS_COPY};
+local $ENV{EU_ALWAYS_COPY};    
+    
 chdir 'Big-Dummy';
 
 my $stdout = tie *STDOUT, 'TieOut';
@@ -191,7 +194,7 @@
 {
   local @INC = ('install-test/lib/perl');
   local $ENV{PERL5LIB} = '';
-  local $ENV{EU_ALWAYS_COPY}=1;
+  local $ENV{EU_INSTALL_ALWAYS_COPY}=1;
   my $tfile='install-test/other_lib/perl/Big/Dummy.pm';
   my $sfile='blib/lib/Big/Dummy.pm';
   ok(-r $tfile,"install file already exists");
@@ -212,7 +215,7 @@
 {
   local @INC = ('install-test/lib/perl');
   local $ENV{PERL5LIB} = '';
-  local $ENV{EU_ALWAYS_COPY}=0;
+  local $ENV{EU_INSTALL_ALWAYS_COPY}=0;
   my $tfile='install-test/other_lib/perl/Big/Dummy.pm';
   my $sfile='blib/lib/Big/Dummy.pm';
   ok(-r $tfile,"install file already exists");

==== //depot/perl/lib/ExtUtils/t/can_write_dir.t#2 (xtext) ====
Index: perl/lib/ExtUtils/t/can_write_dir.t
--- perl/lib/ExtUtils/t/can_write_dir.t#1~33404~        2008-03-01 
06:40:16.000000000 -0800
+++ perl/lib/ExtUtils/t/can_write_dir.t 2008-03-10 06:58:15.000000000 -0700
@@ -34,22 +34,28 @@
            FS->rel2abs(FS->catdir('does', 'not', 'exist')),
           ];
 
+SKIP: {
+    my $exists = FS->catdir(qw(exists));
+    my $subdir = FS->catdir(qw(exists subdir));
+    
+    
+    ok mkdir $exists;
+    END { rmdir $exists }
+    
+    ok chmod 0555, $exists, 'make read only';
 
-my $exists = FS->catdir(qw(exists));
-my $subdir = FS->catdir(qw(exists subdir));
-ok mkdir $exists;
-END { rmdir $exists }
+    skip "Current user or OS cannot create directories that they cannot read", 
6
+          if -w $exists; # these tests require a directory we cant read
 
-ok chmod 0555, $exists, 'make read only';
-ok !-w $exists;
-is_deeply [can_write_dir($exists)], [0, $exists];
-is_deeply [can_write_dir($subdir)], [0, $exists, $subdir];
-
-ok chmod 0777, $exists, 'make writable';
-ok -w $exists;
-is_deeply [can_write_dir($exists)], [1, $exists];
-is_deeply [can_write_dir($subdir)],
-          [1,
-           $exists,
-           $subdir
-          ];
+    is_deeply [can_write_dir($exists)], [0, $exists];
+    is_deeply [can_write_dir($subdir)], [0, $exists, $subdir];
+    
+    ok chmod 0777, $exists, 'make writable';
+    ok -w $exists;
+    is_deeply [can_write_dir($exists)], [1, $exists];
+    is_deeply [can_write_dir($subdir)],
+              [1,
+               $exists,
+               $subdir
+              ];
+}
\ No newline at end of file
End of Patch.

Reply via email to