From owner-cvs-all Mon Jun 4 16:27:56 2001 Delivered-To: cvs-all@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id F174137B405; Mon, 4 Jun 2001 16:27:48 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 98E913E28; Mon, 4 Jun 2001 16:27:48 -0700 (PDT) To: ru@freebsd.org Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/gnu/usr.bin/send-pr send-pr.sh In-Reply-To: <20010604180653.B43094@sunbay.com>; from ru@FreeBSD.org on "Mon, 4 Jun 2001 18:06:53 +0300" Date: Mon, 04 Jun 2001 16:27:48 -0700 From: Dima Dorfman Message-Id: <20010604232748.98E913E28@bazooka.unixfreak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ruslan Ermilov writes: > On Mon, Jun 04, 2001 at 07:48:39AM -0700, David O'Brien wrote: > > On Mon, Jun 04, 2001 at 01:43:06PM +0300, Ruslan Ermilov wrote: > > > Can we please also remove Subject: from the list of changeable headers? > > > > Agreed. Can we automagically create the subject as a copy of the > > Synopsis line? > > > It's already constructed automatically if empty. What I want is to just > disallow changing it from its default (Synopsis-derived) value. I think this is a good idea. There's no reason for the subject to be different than the synopsis; all that does is serve to confuse whoever is trying to decide what to do with the PR. I've attached a patch which makes send-pr unconditionally write the subject itself. Please review. Thanks, Dima Dorfman dima@unixfreak.org Index: send-pr.sh =================================================================== RCS file: /stl/src/FreeBSD/src/gnu/usr.bin/send-pr/send-pr.sh,v retrieving revision 1.23 diff -u -r1.23 send-pr.sh --- send-pr.sh 2001/06/03 02:40:37 1.23 +++ send-pr.sh 2001/06/04 23:24:59 @@ -285,9 +285,7 @@ SEND-PR: SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo SEND-PR: manual if you are not sure how to fill out a problem report. -SEND-PR: Note that the Synopsis field is mandatory. The Subject (for -SEND-PR: the mail) will be made the same as Synopsis unless explicitly -SEND-PR: changed. +SEND-PR: Note that the Synopsis field is mandatory. SEND-PR: SEND-PR: Choose from the following categories: SEND-PR: @@ -307,7 +305,6 @@ cat >> $file << __EOF__ To: $GNATS_ADDR -Subject: From: $FROM Reply-To: $REPLY_TO Cc: $CC @@ -476,19 +473,31 @@ done # -# Make sure the mail has got a Subject. If not, use the same as -# in Synopsis. +# Remove the subject field if one is already there. There's no reason +# for it to be any different than the synopsis. # - -if grep '^Subject:[ ]*$' $TEMP > /dev/null +if grep '^Subject:' $TEMP > /dev/null then - SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[ ]*//'` ed -s $TEMP << __EOF__ -/^Subject:/s/:.*\$/: $SYNOPSIS/ +/^Subject:/d w q __EOF__ fi + +# +# Add the subject field with the value of $SYNOPSIS. We use the To: +# field as an anchor, which had better be there. +# +SYNOPSIS=`grep '^>Synopsis:' $TEMP | sed -e 's/^>Synopsis:[ ]*//' | + sed -e "s;$SYNOPSIS_C;;"` +ed -s $TEMP << __EOF__ +/^To:/a +Subject: $SYNOPSIS +. +w +q +__EOF__ # # Remove comments and send the problem report To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message