Subject: misc/1077: fix 2 bugs with send-pr.el
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Rolf Grossmann <grossman@kiss.informatik.tu-muenchen.de>
List: netbsd-bugs
Date: 05/27/1995 10:20:09
>Number:         1077
>Category:       misc
>Synopsis:       fix 2 bugs with send-pr.el
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 27 10:20:05 1995
>Originator:     
>Organization:
	I guess not
>Release:        NetBSD-current 1.0A
>Environment:
System: NetBSD kiss 1.0A NetBSD 1.0A (TIGKI) #22: Mon May 8 19:51:43 MET DST 1995 grossman@kiss:/export/netbsd/src/sys/arch/sparc/compile/TIGKI sparc


>Description:
	Send-pr tries to read /gnats-adm/config with /bin/sh and looks for
	error messages with a regular expression. This expression however
	does not cover all possible error messages the shell might emit for
	that command.
	Also, there is a bug in the send-pr script that prevents send-pr.el
	from sending the bug report: A wrong comparison.

>How-To-Repeat:
	Start emacs and execute send-pr when the file /gnats-adm/config
	does not exist.
	If you fix that bug, note that send-pr still refuses to send your
	problem report, even though it's correct.

>Fix:
	Apply the following patches in /usr/src/gnu/usr.bin/send-pr:

===================================================================
RCS file: /export/netbsd/mastersrc/netbsd/gnu/usr.bin/send-pr/send-pr-el.in,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 send-pr-el.in
*** send-pr-el.in	1995/02/09 18:38:39	1.1.1.1
--- send-pr-el.in	1995/05/26 15:35:31
***************
*** 95,101 ****
        (set-buffer buf)
        (shell-command (concat ". " gnats:root "/gnats-adm/config; echo $" var )
  		     t)
!       (if (looking-at "/bin/sh:\\|\n")
  	  (setq ret nil)
  	(setq ret (buffer-substring (point-min) (- (point-max) 1)))))
      (kill-buffer buf)
--- 95,101 ----
        (set-buffer buf)
        (shell-command (concat ". " gnats:root "/gnats-adm/config; echo $" var )
  		     t)
!       (if (looking-at "/bin/sh:\\|\n\\|\\.:")
  	  (setq ret nil)
  	(setq ret (buffer-substring (point-min) (- (point-max) 1)))))
      (kill-buffer buf)
===================================================================
RCS file: /export/netbsd/mastersrc/netbsd/gnu/usr.bin/send-pr/send-pr.sh,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 send-pr.sh
*** send-pr.sh	1995/03/02 15:13:07	1.1.1.2
--- send-pr.sh	1995/05/26 15:58:44
***************
*** 461,467 ****
        $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
        read input
      else
!       if [ $CNT -eq 5 ]; then
          input=s
        else
          input=a
--- 461,467 ----
        $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
        read input
      else
!       if [ $CNT -eq 6 ]; then
          input=s
        else
          input=a
>Audit-Trail:
>Unformatted: