Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2003 11:53:47 -0600
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Peter Wemm <peter@wemm.org>
Cc:        all-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-doc@FreeBSD.org, cvs-all@FreeBSD.org, legacy-committers@FreeBSD.org
Subject:   Re: cvs commit: CVSROOT access access.doc access.ports
Message-ID:  <20030207175347.GA91623@opus.celabo.org>
In-Reply-To: <20030207173538.D718D2A89E@canning.wemm.org>
References:  <200302071714.h17HEX79066671@repoman.freebsd.org> <20030207173538.D718D2A89E@canning.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 07, 2003 at 09:35:38AM -0800, Peter Wemm wrote:
> Jacques Vidrine wrote:
> > nectar      2003/02/07 09:14:33 PST
> > 
> >   Modified files:
> >     .                    access access.doc access.ports 
> >   Log:
> >   OK, I think it is safe to split out src, ports, doc mail now.
> >   I suppose I shall get duplicates on all-committers, but so it goes.
> 
> all-committers doesn't do duplicates.  It merges the lists together and
> de-dups the recipients before generating the email.

By then it is too late, if you have different email addresses for
different `access' files.

This could work by having commitmail.pl doing the uniq ... it is doing
some already.  Something like the following (untested).

Cheers,
-- 
Jacques A. Vidrine <nectar@celabo.org>          http://www.celabo.org/
NTT/Verio SME          .     FreeBSD UNIX     .       Heimdal Kerberos
jvidrine@verio.net     .  nectar@FreeBSD.org  .          nectar@kth.se


#! /usr/bin/perl -w
#
# $FreeBSD: CVSROOT/freebsd/commitmail.pl,v 1.11 2003/02/04 18:32:34 peter Exp $

$list = shift(@ARGV);
$mailcmd = "/home/majordomo/wrapper resend.nobm -l $list -f owner-$list -h FreeBSD.org";
#$mailcmd = "/usr/sbin/sendmail -oem -f owner-$list";

%uniq = ();
while ($#ARGV > 0) {
	$access = shift(@ARGV);
	$access2 = shift(@ARGV);

	open(ACCESS, "< $access") || open(ACCESS, "< $access2") || exit 75;
	while (<ACCESS>) {
		chop;
		@words = split;
		if ($words[0] =~ /^[#\/;]/) {
			next;
		}
		unless (exists($uniq{$words[0]})) {
			$uniq{$words[0]} = $words[1] || $words[0];
		}
	}
	close(ACCESS);
}
$list = join(" ", sort values %uniq);
if ($list ne '') {
	exec "$mailcmd $list";
	die "cannot exec `$mailcmd': $!";
} else {
	exec "cat >/dev/null";
	die "cannot exec `cat >/dev/null': $!";
}


# Jan 15 09:47:55 hub sendmail[14995]: JAB14995: to=/home/mail/archive/cvs-committers, delay=00:00:00, xdelay=00:00:00, mailer=*file*, stat=Sent
# Jan 15 09:48:00 hub sendmail[14995]: JAB14995: to="|/home/mail/mailtogroup.pl ncvs cvs-committers", delay=00:00:05, xdelay=00:00:05, mailer=prog, stat=unknown mailer error 13


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-ports" in the body of the message




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