1 | $NetBSD$ |
---|
2 | |
---|
3 | Allow parrot to detect perldoc when run as root. Perldoc changes |
---|
4 | uid to 'nobody', 'nouser' or uid -2 when run as root, so it won't |
---|
5 | be able to write files created by root with mode 0600 (or create new |
---|
6 | files in directories owned by root mode 0755). |
---|
7 | |
---|
8 | --- config/auto/perldoc.pm.orig 2009-03-08 21:32:47.000000000 +0100 |
---|
9 | +++ config/auto/perldoc.pm |
---|
10 | @@ -38,7 +38,9 @@ sub runstep { |
---|
11 | |
---|
12 | my $cmd = $conf->data->get_p5('scriptdirexp') . q{/perldoc}; |
---|
13 | my ( $fh, $filename ) = tempfile( UNLINK => 1 ); |
---|
14 | - my $content = capture_output("$cmd -ud $filename perldoc") || undef; |
---|
15 | + my($stdout, $stderr, $retval) = |
---|
16 | + capture_output("$cmd -u perldoc > $filename"); |
---|
17 | + my($content) = $retval ? undef : $stderr; |
---|
18 | |
---|
19 | return 1 unless defined( $self->_initial_content_check($conf, $content) ); |
---|
20 | |
---|
21 | @@ -68,7 +70,7 @@ E_NOTE |
---|
22 | if ( $new_perldoc ) { |
---|
23 | $TEMP_pod_build .= <<"END" |
---|
24 | ops$slash$pod: ..${slash}src${slash}ops${slash}$ops |
---|
25 | -\t\$(PERLDOC) -ud ops${slash}$pod ..${slash}src${slash}ops${slash}$ops |
---|
26 | +\t\$(PERLDOC) -u ..${slash}src${slash}ops${slash}$ops > ops${slash}$pod |
---|
27 | \t\$(CHMOD) 0644 ops${slash}$pod |
---|
28 | |
---|
29 | END |
---|