[26452] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25582 - in trunk/athena/bin/sendbug: . debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Jun 7 10:25:49 2012

Date: Thu, 7 Jun 2012 10:25:48 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201206071425.q57EPmhV004480@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-06-07 10:25:48 -0400 (Thu, 07 Jun 2012)
New Revision: 25582

Modified:
   trunk/athena/bin/sendbug/debian/changelog
   trunk/athena/bin/sendbug/sendbug.sh
Log:
In sendbug:
  * Make the bug report questions clearer, give the user some guidance on
    using archaic TTY editors


Modified: trunk/athena/bin/sendbug/debian/changelog
===================================================================
--- trunk/athena/bin/sendbug/debian/changelog	2012-06-07 00:37:37 UTC (rev 25581)
+++ trunk/athena/bin/sendbug/debian/changelog	2012-06-07 14:25:48 UTC (rev 25582)
@@ -1,3 +1,10 @@
+debathena-sendbug (10.0.5-0debathena1) unstable; urgency=low
+
+  * Make the bug report questions clearer, give the user some guidance on
+    using archaic TTY editors
+
+ -- Jonathan Reed <jdreed@mit.edu>  Thu, 07 Jun 2012 10:24:48 -0400
+
 debathena-sendbug (10.0.4-0debathena1) unstable; urgency=low
 
   * Add a --help option. (http://diswww.mit.edu/menelaus/bugs/27568)

Modified: trunk/athena/bin/sendbug/sendbug.sh
===================================================================
--- trunk/athena/bin/sendbug/sendbug.sh	2012-06-07 00:37:37 UTC (rev 25581)
+++ trunk/athena/bin/sendbug/sendbug.sh	2012-06-07 14:25:48 UTC (rev 25582)
@@ -29,7 +29,13 @@
 hostname=$(hostname)
 dpy=$(machtype -d)
 
+localacct=
 shell=`awk -F: '/^'$USER':/ { print $7; exit; }' /etc/passwd 2>/dev/null`
+if [ -z "$shell" ]; then
+    shell=`getent passwd $USER 2>/dev/null | cut -d ':' -f 7`
+else
+    localacct="(local account)"
+fi
 case $shell in
 $SHELL)
   ;;
@@ -63,20 +69,27 @@
 Type:			$cpu
 Display type:		$dpy
 
-Shell:			$shell
+Shell:			$shell $localacct
 Window manager:		${WINDOW_MANAGER:-unknown}
+Desktop session:	${GDMSESSION:-unknown}
 
-What were you trying to do?
-	[Please replace this line with your information.]
+1) What were you trying to do?
 
-What's wrong:
-	[Please replace this line with your information.]
 
-What should have happened:
-	[Please replace this line with your information.]
+2) What happened?
 
-Please describe any relevant documentation references:
-	[Please replace this line with your information.]
+
+3) What should have happened?
+
+
+4) Does this problem happen only on this workstation, or other workstations?
+
+
+5) If you were following instructions, please include the URL or a
+   description of the documentation:
+   (e.g. a "problem set for 18.03" or http://ist.mit.edu)
+
+
 EOF
 
 if [ true = "$gnome" ]; then
@@ -100,19 +113,33 @@
     text="Thank you for your bug report."
     zenity --info --text="$text"
   else
-    text="Failed to send the bug report!  Please contact x3-4435 for"
+    text="Failed to send the bug report!  Please contact olc@mit.edu for"
     text="$text\nassistance.  Your text is in $report_file"
-    text="$text\nif you wish to recover it."
+    text="$text\nif you wish to recover it and submit it to $bugs_address"
     zenity --error --no-wrap --text="$text"
   fi
 else
+  : ${EDITOR=nano}
+  helpstr=
+  case "$EDITOR" in
+    nano|pico)
+      helpstr="(Ctrl-O, then Enter to save; Ctrl-X to quit after saving)"
+      ;;
+    emacs)
+      helpstr="(Ctrl-X, Ctrl-S to save; Ctrl-X, Ctrl-C to quit after saving)"
+      ;;
+  esac
   fmt << EOF
 
-Please fill in the specified fields of the bug report form, which will
-be displayed momentarily.
-Remember to save the file before exiting the editor.
+After you press <Enter>, an editor will now open with the bug report
+form.  Some fields have been filled out already.  Please answer the
+numbered questions with as much detail as possible.  
+Remember to save the file before exiting the editor.  
+$helpstr
+
+Press <Enter> to continue.
 EOF
-  : ${EDITOR=emacs}
+  read dummy
   $EDITOR "$report_file"
   while true; do
     fmt << EOF
@@ -131,8 +158,9 @@
     echo "Thank you for your bug report."
   else
     fmt << EOF
-Failed to send the bug report!  Please contact x3-4435 for assistance.
-Your text is in $report_file if you wish to recover it.
+Failed to send the bug report!  This shouldn't happen!
+Your text is in $report_file if you wish to recover it,
+and you can submit it to $bugs_address.
 EOF
   fi
 fi


home help back first fref pref prev next nref lref last post