#509: tools/dev/install_files.pl  did not care about symlinks
---------------------+------------------------------------------------------
 Reporter:  gerd     |       Owner:  jkeenan 
     Type:  todo     |      Status:  assigned
 Priority:  major    |   Milestone:          
Component:  install  |     Version:  1.0.0   
 Severity:  medium   |    Keywords:          
     Lang:           |       Patch:  new     
 Platform:  linux    |  
---------------------+------------------------------------------------------
Changes (by jkeenan):

  * patch:  rejected => new


Comment:

 Replying to [comment:9 allison]:
 > I'm happy to go ahead and apply it if we get testing on our big 3
 platforms. But, we should wrap the symlink call in an eval providing a
 more meaningful error message to future-proof porting.

 I have created the ''tt509_install_files'' branch in SVN to implement
 this.  Here is what I am applying in that branch:
 {{{
 $ svn diff
 Index: lib/Parrot/Install.pm
 ===================================================================
 --- lib/Parrot/Install.pm       (revision 40089)
 +++ lib/Parrot/Install.pm       (working copy)
 @@ -226,6 +226,21 @@
          else {
              next unless -e $src;
              next if $^O eq 'cygwin' and -e "$src.exe"; # stat works, copy
 not
 +            if (-l $src) {
 +                # check if the system supports symbolic linking
 +                use Config;
 +                if ($Config{d_symlink} && $Config{d_readlink}) {
 +                    # copy as symbolic link;
 +                    # be extra cautious about existence of symlinks
 +                    # on a given OS
 +                    my $symlink_exists = eval {
 +                        symlink(readlink($src), $dest); 1;
 +                    };
 +                    die "$@" unless $symlink_exists;
 +                    print "$dest\n";
 +                    next;
 +                }
 +            }
              copy( $src, $dest ) or die "Error: couldn't copy $src to
 $dest: $!\n";
              print "$dest\n";
          }
 }}}
 Can we get some people on Win32 systems to check out this branch,
 configure with `perl Configure.pl
 --prefix=C:\tmp\some\appropriate\directory`, then `make manifest_tests &&
 make && make install` and post results in this ticket?

 (I specify `make manifest_tests` because that's where the tests of the
 install tools are located, `make`-wise.)

 `make manifest_tests` and `make install` work properly on Linux -- but
 then you'd expect them to, wouldn't you?

 Thank you very much.[[BR]]
 kid51

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/509#comment:10>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to