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