From 02c3bfcf18adb3599788f37d2d314cac5f51535a Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 18 Aug 2009 19:01:37 -0700 Subject: [PATCH] add in support for missing binary packages which are actually source packages --- Debbugs/Status.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 6e21f99c..b518a8ec 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -1203,8 +1203,10 @@ sub bug_presence { $allowed_distributions{$tag} = 1; } } - foreach my $arch (make_list(exists $param{arch}?$param{arch}:undef)) { - for my $package (split /\s*,\s*/, $status{package}) { + my @archs = make_list(exists $param{arch}?$param{arch}:()); + GET_SOURCE_VERSIONS: + foreach my $arch (@archs) { + for my $package (split /\s*,\s*/, $status{package}) { my @versions = (); my $source = 0; if ($package =~ /^src:(.+)$/) { @@ -1235,6 +1237,15 @@ sub bug_presence { @sourceversions{@temp} = (1) x @temp; } } + # this should really be split out into a subroutine, + # but it'd touch so many things currently, that we fake + # it; it's needed to properly handle bugs which are + # erroneously assigned to the binary package, and we'll + # probably have it go away eventually. + if (not keys %sourceversions) { + push @archs, undef; + goto GET_SOURCE_VERSIONS; + } } # TODO: This should probably be handled further out for efficiency and -- 2.39.5