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

Re: http://bugs.debian.org/release-critical has terrible handling of bugs filed against source packages



Hi Peter,

Don Armstrong wrote:
> On Thu, 19 Jan 2012, Jonathan Nieder wrote:
>> peter green wrote:

>>> Of the pages linked from http://bugs.debian.org/release-critical
>> [...]
>>> debian/all.html does not show bugs against source packages
>>> debian/main.html does not show bugs against source packages
>>> debian/source.html does not show ANYTHING AT ALL!
>>> debian/contrib.html does not show any bugs against source packages
>>> (I do not know whether it is failing to report them or whether they
>>> don't exist)

You can find the scripts that generate these pages here:

 http://bugs.debian.org/debbugs-source/bugscan/  (bzr)
 http://git.debian.org/?p=users/jrnieder-guest/debbugs/bugscan.git (gitweb)
 git://git.debian.org/~jrnieder-guest/debbugs/bugscan.git (git)

The relevant script is "dohtml":

	makepage "debian" "$title" "$htmldir/debian/all.html" "$time"
	makepage "debian/main" "$title" $htmldir/debian/main.html "$time"
	makepage "debian/contrib" "$title" $htmldir/debian/contrib.html "$time"
	makepage "debian/non-free" "$title" $htmldir/debian/non-free.html "$time"
	makepage "debian/source" "$title" $htmldir/debian/source.html "$time"

The makepage function runs the ./bugreport script, which uses the condition
"$scanlib::section{$p} =~ m/^$filter/" to decide what page each bug belongs on.
The readsources and readpackages functions in scanlib.pm look like this:

	for $sect (@bugcfg::sections) {
		open(P, "zcat $root/$sect/source/Sources.gz|")
			or die open "open: $sect sourcelist: $!\n";
		while (<P>) {
			chomp;
			next unless m/^Package:\s/;
			s/^Package:\s*//;             # Strip the fieldname
			$section{$_} = "$archive/$sect";
		}
		close (P);
	}

If we want $section{$p} to match "debian/source", that would presumably involve
changing the

	$section{$_} = "$archive/$sect"

line to something like

	$section{$_} = "$archive/source"

However, that would lose the distinction between the main, contrib,
and non-free archive sections, and it would clobber the section for
the corresponding binary package when they share a name.  In a way, we
want the section for source packages to simultaneously be
"$archive/$sect" and "$archive/source".

Maybe something like the following hack would be a good starting point
for investigating.

diff --git a/scanlib.pm b/scanlib.pm
index 60e4cf47..29bcd130 100644
--- a/scanlib.pm
+++ b/scanlib.pm
@@ -61,6 +61,7 @@ sub readsources() {
 			next unless m/^Package:\s/;
 			s/^Package:\s*//;			# Strip the fieldname
 			$section{$_} = "$archive/$sect";
+			$section{"src:$_"} = "$archive/$sect";
 		}
 		close (P);
 	}


Reply to: