[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#127774: bug: patch for #127774 and #86360

Package: bug
Version: N/A; reported 2002-10-21

Hi there!

I wrote a patch to fix/add wishlist items of #127774. I added -a
to query archived bugs.  If -a is set, I add a "&archive=yes" to the
URL.  For details please see the diff.

Between Bug #127774 and #86360 ist no big difference.  So I wrote the
patch for both bugs (one patch to fix #127774 and #86360).

Therefore I added a -c option which clears $DISPLAY.  And if $DISPLAY is
not set, bugview uses the console browser.

I also added the section OPTIONS to the manpage with these two options.

I hope it's okay!


*** /home/dennis/debian/bug/127774+86360.patch
diff -urN bug- bug-
--- bug-	Sun Jun  6 07:45:33 1999
+++ bug-	Mon Oct 21 18:08:40 2002
@@ -2,11 +2,18 @@
 bugview \- Accesses the Debian Bug Tracking System.
-\fBbugview\fR <\fIbug#\fR>|<\fIpackage\fR>
+\fBbugview\fR <\fIbug#\fR>|<\fIpackage\fR> [\fIoptions\fR]
 .B Bugview
 opens a WWW browser and accesses the Debian Bug Tracking System WWW page
 that provides information regarding the requested item.
+.B -a
+show archived bugs
+.B -c
+use console browser
diff -urN bug- bug-
--- bug-	Sun Feb  4 03:56:04 2001
+++ bug-	Mon Oct 21 18:05:54 2002
@@ -78,9 +78,12 @@
 usage () {
-echo $"Usage:  bugview <bug>
+echo $"Usage:  bugview <bug> [options]
 View bugs from the Debian BTS on the web.  <bug> can be either 
-a package name or a bug number."
+a package name or a bug number.
+	-a	show archived bugs
+	-c	use console browser"
 echo -n $"The default X11 browser is "
 echo "\`$X11BROWSER';"
@@ -90,8 +93,10 @@
 X11BROWSER and CONSOLEBROWSER, respectively."
-while getopts h? opt; do
+while getopts ach? opt; do
 	case "$opt" in
+		a) ARCHIVED="&archive=yes";;
+		c) DISPLAY=;;
 		h|?)	usage
 		*)	echo "Invalid argument: $opt" 1>&2
@@ -120,7 +125,7 @@
-URL=$(printf "$BUGSERVER" $(encode_url "$1" ) )
+URL=$(printf "$BUGSERVER" $(encode_url "$1" ) )$ARCHIVED
 # If we know $BROWSER is an X11 browser, we send it to the background
 if echo $(basename $BROWSER) | egrep -q 'netscape|mozilla|amaya|arena|mosaic|opera' ; then

GUI? Das sind 10 xterms und ein Hintergrundbild!
GPG/PGP available at http://satanII.enemy.org/~seppy/gpg.asc

Reply to: