Check that a package is really present in a distribution before putting
authorSteinar H. Gunderson <sesse@rietz>
Sun, 11 Mar 2007 01:36:32 +0000 (01:36 +0000)
committerSteinar H. Gunderson <sesse@rietz>
Sun, 11 Mar 2007 01:36:32 +0000 (01:36 +0000)
it in relinfo. This is a temporary thing until debbugs fixes that itself.

scanlib.pm

index bda4277..65adb63 100644 (file)
@@ -200,6 +200,18 @@ sub scanspooldir() {
 
                                next if (!$disttags{$dist});
 
+                               # This is needed for now
+                               my $exists = 0;
+                               for my $arch (@bugcfg::architectures) {
+                                       for my $pkg (split /[,\s]+/, $bug->{'package'}) {
+                                               my @versions = Debbugs::Packages::getversions($pkg, $dist, $arch);
+                                               $exists = 1 if (scalar @versions > 0);
+                                       }
+                                       last if $exists;
+                               }
+
+                               next if !$exists;
+
                                my $presence = Debbugs::Status::bug_presence(
                                        bug => $f, 
                                        status => $bug,