in reply to Re^2: manpages file naming - a filesystem difference dilemma
in thread manpages file naming - a filesystem difference dilemma

hmm.. with a context diff it would be easier to spot your changes.

Here's to that.

$ diff -uNw /usr/lib/perl5/5.8.8/ExtUtils/Install.pm Install.pm --- /usr/lib/perl5/5.8.8/ExtUtils/Install.pm 2006-03-26 14:54:29.00 +0000000 +0200 +++ Install.pm 2006-11-22 19:07:03.000000000 +0100 @@ -83,6 +83,18 @@ $verbose ||= 0; $nonono ||= 0; + my $bootstrapped = eval 'use Filesys::Type 0.02 (qw|fstype|); 1;' +; # CPAN + my $no_colons_in_basenames; + + my @DOSish_FSTs = qw(msdos umsdos vfat ntfs iso9660 smb FAT FAT32 + CDFS NTFS); +=for COMMENTARY + + # Types of fs that can be returned by Filesys::Type::fstype would + have been nice + # to have access to without breaking into the module's encapsul +ation. (this is IMHO + # nonoptimal design; these could/should have been exportable fr +om the module). + +=cut + use Cwd qw(cwd); use ExtUtils::Packlist; use File::Basename qw(dirname); @@ -95,6 +107,7 @@ my(%pack, $dir, $warn_permissions); my($packlist) = ExtUtils::Packlist->new(); # -w doesn't work reliably on FAT dirs + # UHH, FAT-type filesystems can be found on other than MSWin32 OS +'s. Huh? XXX $warn_permissions++ if $^O eq 'MSWin32'; local(*DIR); for (qw/read write/) { @@ -109,6 +122,9 @@ for (readdir DIR) { next if $_ eq $Curdir || $_ eq $Updir || $_ eq ".exists"; my $targetdir = install_rooted_dir($from_to{$source_dir_o +r_file}); + + ++$no_colons_in_basenames if grep(fstype($targetdir) eq $ +_ , @DOSish_FSTs); + mkpath($targetdir) unless $nonono; if (!$nonono && !-w $targetdir) { warn "Warning: You do not have permissions to " . @@ -134,14 +150,15 @@ #hardcoded here. my $targetroot = install_rooted_dir($from_to{$source}); - my $blib_lib = File::Spec->catdir('blib', 'lib'); my $blib_arch = File::Spec->catdir('blib', 'arch'); if ($source eq $blib_lib and exists $from_to{$blib_arch} and directory_not_empty($blib_arch)) { $targetroot = install_rooted_dir($from_to{$blib_arch}); - print "Files found in $blib_arch: installing files in $bl +ib_lib into architecture dependent library tree\n"; + print "Some files found in $blib_arch: we shall therefore + be " + . "installing files in $blib_lib into the architectur +e dependent " + . "library tree\n"; } chdir $source or next; @@ -156,6 +173,18 @@ my $sourcedir = File::Spec->catdir($source, $File::Find: +:dir); my $sourcefile = File::Spec->catfile($sourcedir, $origfil +e); + # Cope with installation of man files to FAT type filesys +tems (could + # be installing to removable media formatted as vfat/FAT3 +2 from a + # UNIX OS, like GNU/Linux or Cygwin or *BSD, for example) +. + if($sourcedir =~ m{ blib/man[31] }x and $no_colons_in_bas +enames) { + my $formername = $targetfile; + $targetfile =~s{::} {.}g; + warn qq|INFO: "$formername"\n => "$targetfile"\n| + , qq|for writing to the target location which is a +| + , (' '.fstype($targetdir)) + , qq| filesystem (no colons allowed).\n|; + } + my $save_cwd = cwd; chdir $cwd; # in case the target is relative # 5.5.3's File::Find missing no_chdir option +. @@ -173,8 +202,8 @@ if (-f $targetfile){ forceunlink($targetfile) unless $nonono; } else { - mkpath($targetdir,0,0755) unless $nonono; - print "mkpath($targetdir,0,0755)\n" if $verbose>1; + mkpath($targetdir) unless $nonono; + print "mkpath($targetdir)\n" if $verbose>1; } copy($sourcefile, $targetfile) unless $nonono; print "Installing $targetfile\n"; @@ -202,6 +231,7 @@ }, $Is_MacPerl ? $Curdir : '.' ); chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!"); } + $no_colons_in_basenames = undef; # XXX ? if ($pack{'write'}) { $dir = install_rooted_dir(dirname($pack{'write'})); mkpath($dir,0,0755) unless $nonono;

:-)

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}