OSSP CVS Repository

ossp - Difference in ossp-pkg/shiela/shiela.pl versions 1.20 and 1.21
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shiela/shiela.pl 1.20 -> 1.21

--- shiela.pl    2002/12/21 10:32:40     1.20
+++ shiela.pl    2002/12/21 11:00:17     1.21
@@ -149,7 +149,7 @@
 
     #   determine user information
     $RT->{username} = $CF->{Project}->{User}->{$RT->{userid}}->{name} ||
-                      die "CVS user `$RT->{userid}' not found in Shiela configuration";
+                      die "CVS user `$RT->{userid}' not found in OSSP shiela configuration";
     $RT->{usermail} = $CF->{Project}->{User}->{$RT->{userid}}->{mail} ||
                       "$RT->{userid}\@localhost";
 
@@ -175,11 +175,19 @@
         }
         return $prog;
     }
-    $RT->{sendmail} = &find_program("ssmtp") ||
+    $RT->{sendmail} = $CF->{Environment}->{Program}->{cvs} ||
+                      &find_program("ssmtp") ||
                       &find_program("sendmail") || 
                       die "unable to find `sendmail' program";
-    $RT->{cvs}      = &find_program("cvs") || 
+    $RT->{cvs}      = $CF->{Environment}->{Program}->{sendmail} ||
+                      &find_program("cvs") || 
                       die "unable to find `cvs' program";
+    $RT->{diff}     = $CF->{Environment}->{Program}->{diff} ||
+                      &find_program("diff") || 
+                      die "unable to find `diff' program";
+    $RT->{uuencode} = $CF->{Environment}->{Program}->{uuencode} ||
+                      &find_program("uuencode") || 
+                      die "unable to find `uuencode' program";
 
     #   pre-calculate a reasonable MIME boundary tag
     my $randtag;
@@ -349,7 +357,7 @@
 
 ##  _________________________________________________________________
 ##
-##  Determine Shiela configuration.
+##  Determine OSSP shiela configuration.
 ##
 ##  We theoretically could directly operate on the syntax tree as
 ##  created by parse_config() above. But for convinience reasons and
@@ -380,6 +388,9 @@
         },
         'Logging' => {
             'Report' => {}
+        },
+        'Environment' => {
+            'Program' => {}
         }
     };
     my $cf = &parse_config($t, \&parse_config_callback, $CF);
@@ -1361,14 +1372,14 @@
 
     #   handle special invocation under `cvs add <dir>'
     if (join(' ', @cvsinfo) eq '- New directory') { # see CVS' src/add.c
-        #   Hmmm... we always just deal with files in Shiela, so there
+        #   Hmmm... we always just deal with files in OSSP shiela, so there
         #   is no obvious and consistent way to deal now with only a
         #   plain directory. And there is also no log message provided
         #   by CVS. Additionally, creating empty directories in the CVS
         #   repository doesn't harm anyone. A regular cronjob is usually
         #   used to get rid of them anyway. So we decided to not log
         #   `cvs add <dir>' commands at all. We are early in processing
-        #   it is acceptable to just exit Shiela immediately.
+        #   it is acceptable to just exit OSSP shiela immediately.
         exit(0);
     }
 
@@ -1407,7 +1418,7 @@
                     #  provided a temporary working area on the server
                     #  side for us. Now we can only hope the CVS version
                     #  is at least capable of server communications...
-                    print STDERR "cvs import: Warning: Shiela cannot process local imports\n";
+                    print STDERR "cvs import: Warning: OSSP shiela cannot process local imports\n";
                     print STDERR "cvs import: if the CVS version isn't at least capable of\n";
                     print STDERR "cvs import: server communications (which we're forced to use).\n";
                     print STDERR "cvs import: Ignoring this operation - don't expect log messages!\n";
@@ -1655,8 +1666,8 @@
                     "\$ cvs update -p -r$Iv $Is >$Is.new\n" .
                     "\$ diff -u $Is.old $Is.new\n";
                 if (not $RT->{useserver}) {
-                    system("$RT->{cvs} -f -l -Q -n update -p -r$IV '$Is' | uuencode '$Is' >$Is.old");
-                    system("$RT->{cvs} -f -l -Q -n update -p -r$Iv '$Is' | uuencode '$Is' >$Is.new");
+                    system("$RT->{cvs} -f -l -Q -n update -p -r$IV '$Is' | $RT->{uuencode} '$Is' >$Is.old");
+                    system("$RT->{cvs} -f -l -Q -n update -p -r$Iv '$Is' | $RT->{uuencode} '$Is' >$Is.new");
                 }
                 else {
                     my $cvs = new CVS ($RT->{cvs}, $RT->{cvsroot});
@@ -1676,7 +1687,7 @@
                     $io->close;
                     $cvs->close;
                 }
-                my $io = new IO::File "diff -u $Is.old $Is.new|"
+                my $io = new IO::File "$RT->{diff} -u $Is.old $Is.new|"
                     || die "unable to open diff command pipe for reading";
                 $cvsdiff .= $_ while (<$io>);
                 $io->close;

CVSTrac 2.0.1