[Libreoffice-commits] .: 2 commits - bin/tinbuild

Thorsten Behrens thorsten at kemper.freedesktop.org
Wed Feb 23 01:01:13 PST 2011


 bin/tinbuild |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 77e5d7370edc601f209a3207a3cd7ff094d6e050
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Feb 23 09:59:52 2011 +0100

    Make tinbuild load SMTP modules only on demand
    
    Net::SMTP::SSL and Net:SMTP::TLS may not be installed or available
    on all systems, so we're now only loading that if the corresponding
    command line option was given.

diff --git a/bin/tinbuild b/bin/tinbuild
index 6328069..b4c3800 100755
--- a/bin/tinbuild
+++ b/bin/tinbuild
@@ -52,9 +52,6 @@ sendMailMsg ()
 	echo $BCC
 	perl -e "
 use MIME::Lite;
-use Net::SMTP;
-use Net::SMTP::SSL;
-use Net::SMTP::TLS;
 
 my \$text;
 while (<>) {
@@ -82,6 +79,7 @@ if ('$LOG' ne '' && -f '$LOG') {
 my \$smtp_class = '$SMTPCRYPT' eq 'none' ? 
     'Net::SMTP' : 
     '$SMTPCRYPT' eq 'ssl' ? 'Net::SMTP::SSL' : 'Net::SMTP::TLS';
+eval \"use \$smtp_class\";
 my \$SMTP = \$smtp_class->new(
 	'$SMTPHOST',
     Hello => 'documentfoundation.org',
commit 27e563e830223fa981b457e0b232623f005cca5a
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Feb 23 09:57:29 2011 +0100

    Made tinderbox bcc owner on error mails
    
    Every error spam now gets Bcc-ed to the owner. This does not apply
    to the x-tinder zipped log file mails.

diff --git a/bin/tinbuild b/bin/tinbuild
index 69b9b58..6328069 100755
--- a/bin/tinbuild
+++ b/bin/tinbuild
@@ -47,7 +47,9 @@ sendMailMsg ()
 	TO="$1"
 	SUBJECT="$2"
 	HEADERS="$3"
-	LOG="$4"
+	BCC="$4"
+	LOG="$5"
+	echo $BCC
 	perl -e "
 use MIME::Lite;
 use Net::SMTP;
@@ -90,6 +92,7 @@ die \"Cannot connect to SMTP server!\" unless defined \$SMTP;
 
 \$SMTP->mail('$OWNER');
 \$SMTP->to('$TO');
+\$SMTP->bcc('$BCC') if ('$BCC' ne '');
 \$SMTP->data();
 \$SMTP->datasend( \$msg->as_string() );
 \$SMTP->dataend();
@@ -132,7 +135,7 @@ reportError ()
 			TINDER1="`echo 'Full log available at http://tinderbox.go-oo.org/MASTER/status.html'`"
 			TINDER2="`echo \"Box name: $TINDERNAME\"`"
 		fi
-		cat <<EOF | sendMailMsg "$to_mail" "Tinderbox failure, $message"
+		cat <<EOF | sendMailMsg "$to_mail" "Tinderbox failure, $message" "" "$OWNER"
 Hi folks,
 
 One of you broke the build of LibreOffice master with your commit :-(
@@ -205,7 +208,7 @@ tinderbox: END
 		XTINDER=",'X-Tinder:'=>'gzookie'"
 	fi
 
-	echo "$MESSAGE" | sendMailMsg "tinderbox at gimli.documentfoundation.org" "tinderbox gzipped logfile" "$XTINDER" "$GZLOG"
+	echo "$MESSAGE" | sendMailMsg "tinderbox at gimli.documentfoundation.org" "tinderbox gzipped logfile" "$XTINDER" "" "$GZLOG"
 }
 
 ## code


More information about the Libreoffice-commits mailing list