Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2003 15:54:46 GMT
From:      Tim Bishop <tim@bishnet.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        tim@bishnet.net
Subject:   misc/48110: change CVSROOT/log_accum.pl to not send mail if address not given
Message-ID:  <200302091554.h19FskBJ017862@pendennis.ukc.ac.uk>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302091554.h19FskBJ017862>