From T.D.Bishop@ukc.ac.uk Sun Feb 9 07:56:29 2003 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CEF937B401 for ; Sun, 9 Feb 2003 07:56:29 -0800 (PST) Received: from mercury.ukc.ac.uk (mercury.ukc.ac.uk [129.12.21.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51A7D43F85 for ; Sun, 9 Feb 2003 07:56:28 -0800 (PST) (envelope-from T.D.Bishop@ukc.ac.uk) Received: from pendennis.ukc.ac.uk ([129.12.3.232]) by mercury.ukc.ac.uk with esmtp (Exim 3.22 #4) id 18htn5-00052G-00; Sun, 09 Feb 2003 15:54:47 +0000 Received: from localhost ([127.0.0.1] helo=pendennis.ukc.ac.uk) by pendennis.ukc.ac.uk with esmtp (Exim 4.12) id 18htn5-0004e7-00; Sun, 09 Feb 2003 15:54:47 +0000 Received: (from tdb@localhost) by pendennis.ukc.ac.uk (8.12.6/8.12.6/Submit) id h19FskBJ017862; Sun, 9 Feb 2003 15:54:46 GMT Message-Id: <200302091554.h19FskBJ017862@pendennis.ukc.ac.uk> Date: Sun, 9 Feb 2003 15:54:46 GMT From: Tim Bishop Reply-To: Tim Bishop To: FreeBSD-gnats-submit@freebsd.org Cc: tim@bishnet.net Subject: change CVSROOT/log_accum.pl to not send mail if address not given X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 48110 >Category: misc >Synopsis: [patch] change CVSROOT/log_accum.pl to not send mail if address not given >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 09 08:00:28 PST 2003 >Closed-Date: Tue Jun 05 14:47:25 GMT 2007 >Last-Modified: Tue Jun 05 14:47:25 GMT 2007 >Originator: Tim Bishop >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD pendennis.ukc.ac.uk 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Jan 31 13:54:04 GMT 2003 tdb@pendennis.ukc.ac.uk:/usr/obj/usr/src/sys/PENDENNIS i386 >Description: After reading "Setting up a CVS repository - the FreeBSD way" I thought I'd have a go at using a few of the scripts. The only loginfo functionality I wanted was the logging, not the mailing of commit logs. However, it didn't seem possible to stop log_accum.pl mailing out a message. The change I made initially was to return from the mail sending subroutine if the $to variable was empty. However, after poking around with the config I noticed that $to will be set to 'nobody' unless overridden. My guess is that this default suggests a message shouldn't be sent out - and thus the change below. I have no idea if this change is desirable for the freebsd cvs repo, but I thought I'd send it in anyhow. >How-To-Repeat: >Fix: Patch of how I solved this given below. There may be a more desirable solution, but this worked in my case. --- log_accum.pl.diff begins here --- --- log_accum.pl 9 Feb 2003 15:32:04 -0000 +++ log_accum.pl 9 Feb 2003 15:41:26 -0000 @@ -450,6 +450,8 @@ $to .= $category; } + return if $to =~ /^nobody$/; + my @email = (); print "Mailing the commit message to '$to'.\n"; --- log_accum.pl.diff ends here --- >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: tdb State-Changed-When: Tue Jun 5 14:46:02 UTC 2007 State-Changed-Why: This PR is no longer relevant. I submitted it over 4 years ago so I'm happy to be the one to close it :-) http://www.freebsd.org/cgi/query-pr.cgi?pr=48110 >Unformatted: