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

Bug#549439: pkgreport.cgi - internal server errors when using include= parameter




Thanks for your patient answers.

I am experimenting with pulling out groups of bugs using usertags.
Specifically I was attempting to make some of the urls in [2], that
claim to pull out arch-specific bugs, actually work.

Assuming the architecture specific bits are done by usertags that are
against the debian-boot@lists.debian.org user, you can just do the
following:

http://bugs.debian.org/cgi-bin/pkgreport.cgi?maint=debian-boot@lists.debian.org;tag=amd64;users=debian-boot@lists.debian.org

sure, I realised I could use that method. However I was interested to check whether for example this URL (taken from [1]) would/could ever work:
  http://bugs.debian.org/cgi-bin/pkgreport.cgi?maint=debian-boot@lists.debian.org;include=alpha
which amounts to wondering what the include= keyword does for you.


I can't find any documentation for how to construct such URLs more
advanced than setting users= and tag= in the URL. Reading the source
of pkgreport.cgi[3] suggests not much of the vision actually ended
up getting implemented, but I am having trouble following the code.

The only bit that isn't implemented is the ability to enter users= and
other bits in the url selection at the bottom.

ok, that helps quite a bit.

I'm happy to help write something that documents the current
functionality.

That'd be great.

What form would be most useful?
A distinct file or a patch to e.g. [2]?

One thing I have been trying to figure out is how to get the
usertags defined for a given bug report to be displayed in the
browser.

If you give the user in the users field, they're displayed as if they
were actual tags.

Really? I mean here when I am looking at one particular bug, eg the url
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214790
This is the first hit in the general search for usertags
  http://bugs.debian.org/cgi-bin/bugreport.cgi?users=debian-boot@lists.debian.org
so it would seem there should be usertags to show.
Yet I can't see any usertags in the display of the individual bug.

I tried the obvious
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=214790;users=debian-boot@lists.debian.org
and got a 500 error.
I tried a newer bug
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=326109;users=debian-boot@lists.debian.org;
and I aslo get a 500 error.


I would also like to be able to display all the usertags set by a
given user. If I just set users= in the URL, but omit tag=, I'd get
all bugs tagged by that user but would then have to compile the
usertags. It seems it would be easy for pkgreport.cgi to do that for
me and show it as a line at the top of the summary display.

It actually already does that at the top of the display:

Ah. I am pretty sure it wasn't doing that for me before, when I started
asking all these dumb questions. I tried again just now, and got the
list of tags. Yay. Have you updated the running code in between?

I found also that this:
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian-boot@lists.debian.org;include=alpha
"works", where it did not before. By "works" I mean that the Options section shows a whole stack of 'tagged' selectors, that I did not see
before.


So now I think I am starting to get this. Then I tried:

 lynx -mime_header -source
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=alpha;users=debian-boot@lists.debian.org

and got the attached file (pkgreport.cgi.usertag.test1.txt).

I see the Summary and the Options sections but no, er, bug numbers listed.
Yet the Summary says there are bugs to display.

If I do the obvious thing and hit the 'submit' button on the displayed
page, the URL changes to
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=alpha
and I get "No reports found!".

If I select unarchived & archived in the Misc options -
the URL changes to
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=both;tag=alpha
and I get "No reports found!".

If I do the same thing for the i386 architecture, I do get some bug numbers displayed, but far fewer than what the summary states.
(pkgreport.cgi.usertag.test2.txt)
The URLs
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian-boot@lists.debian.org;tag=i386
   http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian-boot@lists.debian.org;tag=i386;archive=both;
both yield the same result.

Assuming there's not some reason for this behaviour,
this should probably be broken out into a separate bug.


Kind regards,
Vince

[1] http://wiki.debian.org/DebianInstaller/Bugs
[2] http://bugs.debian.org/debbugs-source/mainline/html/Access.html.in
HTTP/1.1 200 OK

Date: Mon, 05 Oct 2009 05:07:30 GMT

Server: Apache

Connection: close

Content-Type: text/html; charset=utf-8



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD>
<TITLE>Bugs tagged alpha -- Debian Bug report logs</TITLE>
<link rel="stylesheet" href="/css/bugs.css" type="text/css"></HEAD>
<BODY onload="pagemain();">
<DIV id="status_mask"></DIV>
<H1>Debian Bug report logs: Bugs tagged alpha</H1>
<HR><H2>No reports found!</H2></HR>
<script type="text/javascript">
<!--
toggle_extra_status_visible();
function pagemain() {
	toggle(1);
//	toggle(2);
	enable(1);
}

var visible_extra_status = 0;

function toggle_extra_status_visible() {
  all_divs = document.getElementsByTagName("div");
  for (var i = 0; i < all_divs.length; i++) {
      if (all_divs[i].className == "shortbugstatusextra") {
         if (all_divs[i].style.position == 'absolute' ) {
	    all_divs[i].style.position = "static";
      	    all_divs[i].style.display = "block";
	    all_divs[i].style.zIndex = 0;
	    all_divs[i].style.border = 0;
	    var subspans = all_divs[i].getElementsByTagName("span");
	    for (var j = 0; j < subspans.length; j++) {
   	    	subspans[j].style.display = "inline";
	    }
         }
	 else {
	    all_divs[i].style.position = "absolute";
      	    all_divs[i].style.display = "none"
	    all_divs[i].style.zIndex = 2;
	    all_divs[i].style.border = "#000 1px solid";
	    var subspans = all_divs[i].getElementsByTagName("span");
	    for (var j = 0; j < subspans.length; j++) {
   	    	subspans[j].style.display = "block";
	    }
         }
      }
  }
}

function extra_status_visible(id) {
  var m = document.getElementById("status_mask");
  if (visible_extra_status) {
     var t = document.getElementById("extra_status_"+visible_extra_status);
     t.style.display = "none";
     if (m) {
        m.style.display = "none";
     }
     if (visible_extra_status == id) {
     	visible_extra_status = 0;
        return;
     }
     visible_extra_status = 0;
  }
  var e = document.getElementById("extra_status_"+id);
  if (e) {
     e.style.display = "block";
     visible_extra_status = id;
     if (m) {
        m.onclick = function() { extra_status_visible(id); };
        m.style.display = "block";
     }
  }
}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function save_cat_cookies() {
  var cat = document.categories.categorisation.value;
  var exp = new Date();
  exp.setTime(exp.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
  var oldexp = new Date();
  oldexp.setTime(oldexp.getTime() - 1 * 365 * 24 * 60 * 60 * 1000);
  var lev;
  var done = 0;

  var u = document.getElementById("users");
  if (u != null) { u = u.value; }
  if (u == "") { u = null; }
  if (u != null) {
      setCookie("cat" + cat + "_users", u, exp, "/");
  } else {
      setCookie("cat" + cat + "_users", "", oldexp, "/");
  }

  var bits = new Array("nam", "pri", "ttl", "ord");
  for (var i = 0; i < 4; i++) {
      for (var j = 0; j < bits.length; j++) {
          var e = document.getElementById(bits[j] + i);
	  if (e) e = e.value;
	  if (e == null) { e = ""; }
	  if (j == 0 && e == "") { done = 1; }
	  if (done || e == "") {
              setCookie("cat" + cat + "_" + bits[j] + i, "", oldexp, "/");
	  } else {
              setCookie("cat" + cat + "_" + bits[j] + i, e, exp, "/");
	  }
      }
  }
}

function toggle(i) {
        var a = document.getElementById("a_" + i);
        if (a) {
             if (a.style.display == "none") {
                     a.style.display = "";
             } else {
                     a.style.display = "none";
             }
        }
}

function enable(x) {
    for (var i = 1; ; i++) {
        var a = document.getElementById("b_" + x + "_" + i);
        if (a == null) break;
        var ischecked = a.checked;
        for (var j = 1; ; j++) {
            var b = document.getElementById("b_" + x + "_"+ i + "_" + j);
            if (b == null) break;
            if (ischecked) {
                b.disabled = false;
            } else {
                b.disabled = true;
            }
        }
    }
}
-->
</script>

<h2 class="outstanding"><!--<a class="options" href="javascript:toggle(1)">-->Options<!--</a>--></h2>
<form method="GET">
<input type="hidden" name="_fo_combine_key_fo_searchkey_value_fo_searchvalue" value="1">
<input type="hidden" name="form_options" value="1">
<table class="forms">
<tr><td><h2>Select bugs</h2>
</td>
<td>
<nobr><select name="_fo_searchkey">
<option value="package">in package</option>
<option value="tag" selected>tagged</option>
<option value="severity">with severity</option>
<option value="src">in source package</option>
<option value="maint">in packages maintained by</option>
<option value="submitter">submitted by</option>
<option value="owner">owned by</option>
<option value="status">with status</option>
<option value="affects">which affect package</option>
<option value="correspondent">with mail from</option>
<option value="newest">newest bugs</option>
<option value="bugs">in bug</option>

</select>
<input type="text" name="_fo_searchvalue" value ="alpha">
<!-- 0 -->
</nobr>
<br>
<nobr><select name="_fo_searchkey">
<option value="package">in package</option>
<option value="tag">tagged</option>
<option value="severity">with severity</option>
<option value="src">in source package</option>
<option value="maint">in packages maintained by</option>
<option value="submitter">submitted by</option>
<option value="owner">owned by</option>
<option value="status">with status</option>
<option value="affects">which affect package</option>
<option value="correspondent">with mail from</option>
<option value="newest">newest bugs</option>
<option value="bugs">in bug</option>

</select>
<input type="text" name="_fo_searchvalue" value ="">
<!-- 1 -->
</nobr>

</td>
<td>
<p>The same search fields are ORed, different fields are ANDed.</p>
<p>Valid severities are critical, grave, serious, important, normal, minor, wishlist, fixed</p>
<p>Valid tags are patch, wontfix, moreinfo, unreproducible, fixed, potato, woody, sid, help, security, upstream, pending, sarge, sarge-ignore, experimental, d-i, confirmed, ipv6, lfs, fixed-in-experimental, fixed-upstream, l10n, etch, etch-ignore, lenny, lenny-ignore, squeeze, squeeze-ignore</p>
</td>
</tr>
<tr><td><h2>Include Bugs</h2></td>
<td><input type="hidden" name="_fo_concatenate_into_include_fo_includekey_fo_includevalue" value="1">
<nobr><select name="_fo_includekey">
<option value="subject">with subject containing</option>
<option value="tags">tagged</option>
<option value="severity">with severity</option>
<option value="pending">with pending state</option>
<option value="originator">with submitter containing</option>
<option value="forwarded">with forwarded containing</option>
<option value="owner">with owner containing</option>
<option value="package">with package</option>

</select>
<input type="text" name="_fo_includevalue" value ="">
<!-- 0 -->
</nobr>


</td>
<td></td>
</tr>
<tr><td><h2>Exclude Bugs</h2></td>
<td>
<input type="hidden" name="_fo_concatenate_into_exclude_fo_excludekey_fo_excludevalue" value="1">
<nobr><select name="_fo_excludekey">
<option value="subject">with subject containing</option>
<option value="tags">tagged</option>
<option value="severity">with severity</option>
<option value="pending">with pending state</option>
<option value="originator">with submitter containing</option>
<option value="forwarded">with forwarded containing</option>
<option value="owner">with owner containing</option>
<option value="package">with package</option>

</select>
<input type="text" name="_fo_excludevalue" value ="">
<!-- 0 -->
</nobr>



</td>
<td></td>
</tr>
<tr><td><h2>Categorize using</h2></td>
<td></td>
</tr>
<tr><td><h2>Order by</h2></td>
<td><select name="ordering"><option value="normal" selected>normal</option>
<option value="oldview">oldview</option>
<option value="raw">raw</option>
<option value="age">age</option>
</td>
<td></td>
</tr>
<tr><td><h2>Misc options</h2></td>
<td>
<input type="checkbox" name="repeatmerged" > Repeat Merged<br>
<input type="checkbox" name="bug-rev" > Reverse Bugs<br>
<input type="checkbox" name="pend-rev" > Reverse Pending<br>
<input type="checkbox" name="sev-rev" > Reverse Severity<br>
<select name="dist">
<option value="" selected>None</option>
<option value="testing">testing</option>
<option value="oldstable">oldstable</option>
<option value="experimental">experimental</option>
<option value="unstable">unstable</option>
<option value="stable">stable</option>
</select><br>
<select name="archive">
<option value="0" selected>Unarchived</option>
<option value="1">Archived</option>
<option value="both">Archived and Unarchived</option>
</select><br>
<a href="javascript:toggle_extra_status_visible()">Toggle all extra information</a>
</td>
</tr>
<tr><td><h2>Submit</h2></td><td colspan=2>
<input type="submit" name="submit" value="Submit">
</td></tr>
</table>


<hr>
<ADDRESS>Debian bug tracking system administrator &lt;<A HREF="mailto:owner@bugs.debian.org";>owner@bugs.debian.org</A>&gt;.
Last modified:
<!--timestamp-->Mon Oct  5 05:07:31 2009<!--end timestamp-->; 
Machine Name:
<!--machinename-->rietz.debian.org<!--machinename-->
<P>
<A HREF="http://www.debian.org/Bugs/";>Debian Bug tracking system</A><BR>
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.
</ADDRESS>
</body></html>
HTTP/1.1 200 OK

Date: Mon, 05 Oct 2009 05:14:27 GMT

Server: Apache

Connection: close

Content-Type: text/html; charset=utf-8



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD>
<TITLE>Bugs tagged i386 -- Debian Bug report logs</TITLE>
<link rel="stylesheet" href="/css/bugs.css" type="text/css"></HEAD>
<BODY onload="pagemain();">
<DIV id="status_mask"></DIV>
<H1>Debian Bug report logs: Bugs tagged i386</H1>
<HR><H2>No reports found!</H2></HR>
<script type="text/javascript">
<!--
toggle_extra_status_visible();
function pagemain() {
	toggle(1);
//	toggle(2);
	enable(1);
}

var visible_extra_status = 0;

function toggle_extra_status_visible() {
  all_divs = document.getElementsByTagName("div");
  for (var i = 0; i < all_divs.length; i++) {
      if (all_divs[i].className == "shortbugstatusextra") {
         if (all_divs[i].style.position == 'absolute' ) {
	    all_divs[i].style.position = "static";
      	    all_divs[i].style.display = "block";
	    all_divs[i].style.zIndex = 0;
	    all_divs[i].style.border = 0;
	    var subspans = all_divs[i].getElementsByTagName("span");
	    for (var j = 0; j < subspans.length; j++) {
   	    	subspans[j].style.display = "inline";
	    }
         }
	 else {
	    all_divs[i].style.position = "absolute";
      	    all_divs[i].style.display = "none"
	    all_divs[i].style.zIndex = 2;
	    all_divs[i].style.border = "#000 1px solid";
	    var subspans = all_divs[i].getElementsByTagName("span");
	    for (var j = 0; j < subspans.length; j++) {
   	    	subspans[j].style.display = "block";
	    }
         }
      }
  }
}

function extra_status_visible(id) {
  var m = document.getElementById("status_mask");
  if (visible_extra_status) {
     var t = document.getElementById("extra_status_"+visible_extra_status);
     t.style.display = "none";
     if (m) {
        m.style.display = "none";
     }
     if (visible_extra_status == id) {
     	visible_extra_status = 0;
        return;
     }
     visible_extra_status = 0;
  }
  var e = document.getElementById("extra_status_"+id);
  if (e) {
     e.style.display = "block";
     visible_extra_status = id;
     if (m) {
        m.onclick = function() { extra_status_visible(id); };
        m.style.display = "block";
     }
  }
}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function save_cat_cookies() {
  var cat = document.categories.categorisation.value;
  var exp = new Date();
  exp.setTime(exp.getTime() + 10 * 365 * 24 * 60 * 60 * 1000);
  var oldexp = new Date();
  oldexp.setTime(oldexp.getTime() - 1 * 365 * 24 * 60 * 60 * 1000);
  var lev;
  var done = 0;

  var u = document.getElementById("users");
  if (u != null) { u = u.value; }
  if (u == "") { u = null; }
  if (u != null) {
      setCookie("cat" + cat + "_users", u, exp, "/");
  } else {
      setCookie("cat" + cat + "_users", "", oldexp, "/");
  }

  var bits = new Array("nam", "pri", "ttl", "ord");
  for (var i = 0; i < 4; i++) {
      for (var j = 0; j < bits.length; j++) {
          var e = document.getElementById(bits[j] + i);
	  if (e) e = e.value;
	  if (e == null) { e = ""; }
	  if (j == 0 && e == "") { done = 1; }
	  if (done || e == "") {
              setCookie("cat" + cat + "_" + bits[j] + i, "", oldexp, "/");
	  } else {
              setCookie("cat" + cat + "_" + bits[j] + i, e, exp, "/");
	  }
      }
  }
}

function toggle(i) {
        var a = document.getElementById("a_" + i);
        if (a) {
             if (a.style.display == "none") {
                     a.style.display = "";
             } else {
                     a.style.display = "none";
             }
        }
}

function enable(x) {
    for (var i = 1; ; i++) {
        var a = document.getElementById("b_" + x + "_" + i);
        if (a == null) break;
        var ischecked = a.checked;
        for (var j = 1; ; j++) {
            var b = document.getElementById("b_" + x + "_"+ i + "_" + j);
            if (b == null) break;
            if (ischecked) {
                b.disabled = false;
            } else {
                b.disabled = true;
            }
        }
    }
}
-->
</script>

<h2 class="outstanding"><!--<a class="options" href="javascript:toggle(1)">-->Options<!--</a>--></h2>
<form method="GET">
<input type="hidden" name="_fo_combine_key_fo_searchkey_value_fo_searchvalue" value="1">
<input type="hidden" name="form_options" value="1">
<table class="forms">
<tr><td><h2>Select bugs</h2>
</td>
<td>
<nobr><select name="_fo_searchkey">
<option value="package">in package</option>
<option value="tag" selected>tagged</option>
<option value="severity">with severity</option>
<option value="src">in source package</option>
<option value="maint">in packages maintained by</option>
<option value="submitter">submitted by</option>
<option value="owner">owned by</option>
<option value="status">with status</option>
<option value="affects">which affect package</option>
<option value="correspondent">with mail from</option>
<option value="newest">newest bugs</option>
<option value="bugs">in bug</option>

</select>
<input type="text" name="_fo_searchvalue" value ="i386">
<!-- 0 -->
</nobr>
<br>
<nobr><select name="_fo_searchkey">
<option value="package">in package</option>
<option value="tag">tagged</option>
<option value="severity">with severity</option>
<option value="src">in source package</option>
<option value="maint">in packages maintained by</option>
<option value="submitter">submitted by</option>
<option value="owner">owned by</option>
<option value="status">with status</option>
<option value="affects">which affect package</option>
<option value="correspondent">with mail from</option>
<option value="newest">newest bugs</option>
<option value="bugs">in bug</option>

</select>
<input type="text" name="_fo_searchvalue" value ="">
<!-- 1 -->
</nobr>

</td>
<td>
<p>The same search fields are ORed, different fields are ANDed.</p>
<p>Valid severities are critical, grave, serious, important, normal, minor, wishlist, fixed</p>
<p>Valid tags are patch, wontfix, moreinfo, unreproducible, fixed, potato, woody, sid, help, security, upstream, pending, sarge, sarge-ignore, experimental, d-i, confirmed, ipv6, lfs, fixed-in-experimental, fixed-upstream, l10n, etch, etch-ignore, lenny, lenny-ignore, squeeze, squeeze-ignore</p>
</td>
</tr>
<tr><td><h2>Include Bugs</h2></td>
<td><input type="hidden" name="_fo_concatenate_into_include_fo_includekey_fo_includevalue" value="1">
<nobr><select name="_fo_includekey">
<option value="subject">with subject containing</option>
<option value="tags">tagged</option>
<option value="severity">with severity</option>
<option value="pending">with pending state</option>
<option value="originator">with submitter containing</option>
<option value="forwarded">with forwarded containing</option>
<option value="owner">with owner containing</option>
<option value="package">with package</option>

</select>
<input type="text" name="_fo_includevalue" value ="">
<!-- 0 -->
</nobr>


</td>
<td></td>
</tr>
<tr><td><h2>Exclude Bugs</h2></td>
<td>
<input type="hidden" name="_fo_concatenate_into_exclude_fo_excludekey_fo_excludevalue" value="1">
<nobr><select name="_fo_excludekey">
<option value="subject">with subject containing</option>
<option value="tags">tagged</option>
<option value="severity">with severity</option>
<option value="pending">with pending state</option>
<option value="originator">with submitter containing</option>
<option value="forwarded">with forwarded containing</option>
<option value="owner">with owner containing</option>
<option value="package">with package</option>

</select>
<input type="text" name="_fo_excludevalue" value ="">
<!-- 0 -->
</nobr>



</td>
<td></td>
</tr>
<tr><td><h2>Categorize using</h2></td>
<td></td>
</tr>
<tr><td><h2>Order by</h2></td>
<td><select name="ordering"><option value="normal" selected>normal</option>
<option value="oldview">oldview</option>
<option value="raw">raw</option>
<option value="age">age</option>
</td>
<td></td>
</tr>
<tr><td><h2>Misc options</h2></td>
<td>
<input type="checkbox" name="repeatmerged" > Repeat Merged<br>
<input type="checkbox" name="bug-rev" > Reverse Bugs<br>
<input type="checkbox" name="pend-rev" > Reverse Pending<br>
<input type="checkbox" name="sev-rev" > Reverse Severity<br>
<select name="dist">
<option value="" selected>None</option>
<option value="testing">testing</option>
<option value="oldstable">oldstable</option>
<option value="experimental">experimental</option>
<option value="unstable">unstable</option>
<option value="stable">stable</option>
</select><br>
<select name="archive">
<option value="0" selected>Unarchived</option>
<option value="1">Archived</option>
<option value="both">Archived and Unarchived</option>
</select><br>
<a href="javascript:toggle_extra_status_visible()">Toggle all extra information</a>
</td>
</tr>
<tr><td><h2>Submit</h2></td><td colspan=2>
<input type="submit" name="submit" value="Submit">
</td></tr>
</table>


<hr>
<ADDRESS>Debian bug tracking system administrator &lt;<A HREF="mailto:owner@bugs.debian.org";>owner@bugs.debian.org</A>&gt;.
Last modified:
<!--timestamp-->Mon Oct  5 05:14:28 2009<!--end timestamp-->; 
Machine Name:
<!--machinename-->rietz.debian.org<!--machinename-->
<P>
<A HREF="http://www.debian.org/Bugs/";>Debian Bug tracking system</A><BR>
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.
</ADDRESS>
</body></html>

Reply to: