Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29325

Modified Files:
      Tag: branch_0_26
        Bootstrap.pm ChangeLog Engine.pm 
Log Message:
backport sudo fix


Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.393.2.1
retrieving revision 1.393.2.2
diff -u -d -r1.393.2.1 -r1.393.2.2
--- Engine.pm   11 Jan 2007 03:17:51 -0000      1.393.2.1
+++ Engine.pm   22 Jan 2007 19:12:57 -0000      1.393.2.2
@@ -323,7 +323,9 @@
 
        my $method = $config->param_default("RootMethod", "sudo");
        if ($method eq "sudo") {
-               $cmd = "/usr/bin/sudo $cmd";
+               my $env = '';
+               $env = "/usr/bin/env PERL5LIB='$ENV{'PERL5LIB'}'" if (exists 
$ENV{'PERL5LIB'} and defined $ENV{'PERL5LIB'});
+               $cmd = "/usr/bin/sudo $env $cmd";
        } elsif ($method eq "su") {
                $cmd = "/usr/bin/su root -c '$cmd'";
        } else {

Index: Bootstrap.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Bootstrap.pm,v
retrieving revision 1.150.2.1
retrieving revision 1.150.2.2
diff -u -d -r1.150.2.1 -r1.150.2.2
--- Bootstrap.pm        11 Jan 2007 03:17:51 -0000      1.150.2.1
+++ Bootstrap.pm        22 Jan 2007 19:12:57 -0000      1.150.2.2
@@ -634,7 +634,9 @@
 my $bpath = shift;
        
        if ($> != 0) {
-               exit &execute("sudo ./inject.pl $bpath");
+               my $env = '';
+               $env = "/usr/bin/env PERL5LIB='$ENV{'PERL5LIB'}'" if (exists 
$ENV{'PERL5LIB'} and defined $ENV{'PERL5LIB'});
+               exit &execute("/usr/bin/sudo $env ./inject.pl $bpath");
        }
        umask oct("022");
 }

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1416.2.2
retrieving revision 1.1416.2.3
diff -u -d -r1.1416.2.2 -r1.1416.2.3
--- ChangeLog   8 Jan 2007 18:10:47 -0000       1.1416.2.2
+++ ChangeLog   22 Jan 2007 19:12:57 -0000      1.1416.2.3
@@ -1,3 +1,8 @@
+2007-01-21  Benjamin Reed  <[EMAIL PROTECTED]>
+
+       * Bootstrap.pm, Engine.pm: use env to set PERL5LIB since 10.4.9
+       sudo strips it
+
 2006-12-13  Dave Morrison  <[EMAIL PROTECTED]>
 
        * Validation.pm: Document the problem with %type_raw[] in package


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to