utilities patch

For more detail, read Duplicate file in cvs-all commit causes problems.

$ cvs di -u utilities.pm
Index: utilities.pm
===================================================================
RCS file: /home/repositories/freshports-1/scripts/utilities.pm,v
retrieving revision 1.14
diff -u -r1.14 utilities.pm
--- utilities.pm        17 Mar 2007 13:49:42 -0000      1.14
+++ utilities.pm        27 Jun 2007 02:27:26 -0000
@@ -128,7 +128,7 @@

        my $email   = $die;

-       _ReportErrorHelper($level, $message, $email, $die);
+       _ReportErrorHelper($level, $message, $email, $die, 1);
 }

 sub ReportErrorEmail($;$;$;$) {
@@ -137,19 +137,31 @@
        my $email   = shift;
        my $die         = shift;

-       _ReportErrorHelper($level, $message, $email, $die);
+       _ReportErrorHelper($level, $message, $email, $die, 1);
 }

-sub _ReportErrorHelper($;$;$;$) {
+sub ReportErrorEmailNoPrint($;$;$;$) {
        my $level       = shift;
        my $message     = shift;
        my $email   = shift;
        my $die         = shift;

+       _ReportErrorHelper($level, $message, $email, $die, 0);
+}
+
+sub _ReportErrorHelper($;$;$;$;$) {
+       my $level       = shift;
+       my $message     = shift;
+       my $email   = shift;
+       my $die         = shift;
+       my $print   = shift;
+
        my $suffix = $FreshPorts::Config::scriptpath;

        Sys::Syslog::syslog($level, $message . " ($suffix)");
-       print $message . "\n";
+       if ($print) {
+               print $message . "\n";
+       }

        if ($email) {
                SendEmailNotice($FreshPorts::Config::SystemOwnerEmail, $message);
$
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top