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

Modified Files:
      Tag: branch_0_25
        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.381.2.2
retrieving revision 1.381.2.3
diff -u -d -r1.381.2.2 -r1.381.2.3
--- Engine.pm   22 Jan 2007 18:48:24 -0000      1.381.2.2
+++ Engine.pm   22 Jan 2007 18:56:26 -0000      1.381.2.3
@@ -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.148.2.2
retrieving revision 1.148.2.3
diff -u -d -r1.148.2.2 -r1.148.2.3
--- Bootstrap.pm        22 Jan 2007 18:48:24 -0000      1.148.2.2
+++ Bootstrap.pm        22 Jan 2007 18:56:26 -0000      1.148.2.3
@@ -628,7 +628,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.1378.2.6
retrieving revision 1.1378.2.7
diff -u -d -r1.1378.2.6 -r1.1378.2.7
--- ChangeLog   28 Nov 2006 17:09:54 -0000      1.1378.2.6
+++ ChangeLog   22 Jan 2007 18:56:26 -0000      1.1378.2.7
@@ -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-11-28  Daniel Macks  <[EMAIL PROTECTED]>
 
        * NetAccess.pm: Don't add the master-mirrors pool if Source is


-------------------------------------------------------------------------
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