From owner-freebsd-bugs Sun Feb 9 8: 0:32 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61D0237B401 for ; Sun, 9 Feb 2003 08:00:30 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AF1843FB1 for ; Sun, 9 Feb 2003 08:00:29 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h19G0SNS093041 for ; Sun, 9 Feb 2003 08:00:28 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h19G0Shi093040; Sun, 9 Feb 2003 08:00:28 -0800 (PST) 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 X-Send-Pr-Version: 3.113 Subject: misc/48110: change CVSROOT/log_accum.pl to not send mail if address not given Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48110 >Category: misc >Synopsis: change CVSROOT/log_accum.pl to not send mail if address not given >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 09 08:00:28 PST 2003 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message