On Sun, Oct 09, 2005 at 01:31:54PM -0700, Joshua Hoblitt via RT wrote:
> [cut from a off list thread between jhoblitt & nickg]
> 
> >As a general comment, 36119 makes me a little nervous as 'chmod' isn't
> >something you can count on unless your on a POSIX like system and osname
> >ne 'MSWin32' certainly would encompass non-POSIX systems.  Are you
> >planning on retool this patch to be more pedantic about platforms?
> >
> >
> I guess that I need to find out whether chmod dies with an error if it
> isn't supported, or silently continues. I'm hoping that it just silently
> continues so that we can leave it as it is. If the platform needs
> executes on the library, then this line should ensure that.

I think chmod silently does nothing if it isn't supported on that
platform but I could be wrong.  Before we go that route... why don't we
try Leo's original suggestion of trying to preserve the permissions
during the copy.  Can you try the attached patch and see if it works?

> I would rather that we had an exception list of platforms for which it
> doesn't work. I think what's best is if I post to the list to ask if
> chmod dies if it is not supported.. Would you agree?

It probably won't work on MacOS, MSWin32, os2, VMS, epoc, NetWare, or
dos and who knows how many other platforms that Perl runs on.  I think
we're much better off using inclusive rather and exclusive lists.

Cheers,

-J

--
Index: config/gen/makefiles/dynclasses_pl.in
===================================================================
--- config/gen/makefiles/dynclasses_pl.in       (revision 9424)
+++ config/gen/makefiles/dynclasses_pl.in       (working copy)
@@ -15,7 +15,7 @@
 
 use strict;
 
-use File::Copy qw(copy);
+use File::Copy;
 
 # qq[] isn't guaranteed to work, but it's safer than "" as some platforms
 # (eg FreeBSD) have ""s embedded in their substution values. q[] is used in
@@ -152,7 +152,7 @@
     my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
 
     foreach (@ungrouped_pmcs, keys %$group_files) {
-        copy("$_$LOAD_EXT", $dest) or die "Copy $_$LOAD_EXT failed ($?)\n";
+        File::Copy::syscopy("$_$LOAD_EXT", $dest) or die "Copy $_$LOAD_EXT 
failed ($?)\n";
     }
 }
 else {

Attachment: pgpUOynCnnJXM.pgp
Description: PGP signature

Reply via email to