status-report-scripts parseBZbugList,1.5,1.6

Christian Iseli (c4chris) fedora-extras-commits at redhat.com
Wed Apr 19 09:53:36 UTC 2006


Author: c4chris

Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1452

Modified Files:
	parseBZbugList 
Log Message:
Display more info.  Handle NEEDSPONSOR.


Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- parseBZbugList	19 Apr 2006 09:52:35 -0000	1.5
+++ parseBZbugList	19 Apr 2006 09:53:34 -0000	1.6
@@ -21,7 +21,9 @@
 my $FE_NEW = 163776;
 my $FE_REVIEW = 163778;
 my $FE_ACCEPT = 163779;
+my $FE_NEEDSPONSOR = 177841;
 my %BZN;
+my %BZS;
 my %BZR;
 my %BZA;
 my %CORE;
@@ -117,6 +119,7 @@
     $F[8] =~ s/[:.,>]?\s.*$//g;
   }
   my $block = 0;
+  my $sponsor = 0;
   my $bzb;
   foreach my $b (@B) {
     if ($b == $FE_NEW) {
@@ -131,12 +134,20 @@
       $block += 1;
       $bzb = \%BZA;
     }
+    if ($b == $FE_NEEDSPONSOR) {
+      $sponsor = 1;
+    }
   }
   if ($block > 1) {
     print "Warning: bug $F[0] blocks several FE_ blockers.\n";
     next;
   }
-  $bzb->{$F[0]} = \@F if $block == 1;
+  if ($block == 1) {
+    $bzb->{$F[0]} = \@F;
+    if ($sponsor == 1 && $bzb == \%BZN) {
+      $BZS{$F[0]} = \@F;
+    }
+  }
 }
 print "=== About owners file ===\n\n";
 &checkOwners;
@@ -146,13 +157,18 @@
 print "\n\n=== About FE-ACCEPT packages ===\n";
 &checkAcceptClosed(\%BZA);
 &checkAcceptOpen(\%BZA);
+print "\n\n=== About FE-REVIEW packages ===\n";
+&countOpen(\%BZR, "FE-REVIEW");
+&checkNotClosed(\%BZR, "FE-REVIEW");
+&checkLowActivity(\%BZR, "FE-REVIEW");
 print "\n\n=== About FE-NEW packages ===\n";
+&countOpen(\%BZN, "FE-NEW");
 &checkNotClosed(\%BZN, "FE-NEW");
 &checkLowActivity(\%BZN, "FE-NEW");
 #&checkNoActivity(\%BZN, "FE-NEW");
-print "\n\n=== About FE-REVIEW packages ===\n";
-&checkNotClosed(\%BZR, "FE-REVIEW");
-&checkLowActivity(\%BZR, "FE-REVIEW");
+print "\n\n=== About FE-NEEDSPONSOR packages ===\n";
+&countOpen(\%BZS, "FE-NEEDSPONSOR");
+&checkLowActivity(\%BZS, "FE-NEEDSPONSOR");
 
 exit 0;
 
@@ -191,16 +207,20 @@
     $n =~ s/\./ dot /g;
     printf "%-50s: %d\n", $n, $O{$TO[$i]};
   }
+  if ($#NP >= 0) {
+    $cnt = $#NP + 1;
+    print "\nWe have $cnt packages not available in extras devel:\n";
+    foreach my $p (sort @NP) {
+      my $a = $OWN{$p};
+      my ($owner) = $$a[3] =~ /^([^@]+)/;
+      printf "%-40s %s\n", $p, $owner;
+    }
+  }
   if ($#OE >= 0) {
     $cnt = $#OE + 1;
     print "\nWe have $cnt orphaned packages available in extras devel:\n";
     print &toLine(join(" ", sort @OE)), "\n";
   }
-  if ($#NP >= 0) {
-    $cnt = $#NP + 1;
-    print "\nWe have $cnt packages not available in extras devel:\n";
-    print &toLine(join(" ", sort @NP)), "\n";
-  }
   if ($#NPC >= 0) {
     $cnt = $#NPC + 1;
     print "\nWe have $cnt packages that moved to core:\n";
@@ -262,16 +282,14 @@
     }
   }
   if ($miss > 0) {
-    print "\nWe have $miss accepted, closed packages where I'm unable to find
-the package in the development repo:\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @BL), "\n";
+    print "\nWe have $miss accepted, closed packages where I'm unable to ",
+      "find the package in the development repo:\n";
+    &displayBL(\@BL, $BZ);
   }
   if ($missO > 0) {
-    print "\nWe have $missO accepted, closed packages where I'm unable to find
-the package in the owners file:\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @BLO), "\n";
+    print "\nWe have $missO accepted, closed packages where I'm unable to ",
+      "find the package in the owners file:\n";
+    &displayBL(\@BLO, $BZ);
   }
   my @TR = sort {$R{$b} <=> $R{$a}} keys %R;
   my @TO = sort {$O{$b} <=> $O{$a}} keys %O;
@@ -317,36 +335,39 @@
       push @LATE, $b;
     }
   }
-  print "\nWe have $cnt accepted, open package reviews where the package
-appears to already be in the repo...\n";
-  print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-    join(",", @BL), "\n";
+  print "\nWe have $cnt accepted, open package reviews where the package ",
+    "appears to already be in the repo...\n";
+  &displayBL(\@BL, $BZ);
   if ($#LATE >= 0) {
     $cnt = $#LATE + 1;
     print "\nWe have $cnt accepted, open package reviews older than 4 weeks\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @LATE), "\n";
+    &displayBL(\@LATE, $BZ);
   }
 }
 
-sub checkNotClosed {
+sub countOpen {
   my ($BZ, $cur) = @_;
-  my @BL;
   my $cnt = 0;
   foreach my $b (sort(keys %$BZ)) {
     my $a = $BZ->{$b};
-    if ($$a[5] eq "\"CLOSED\"") {
-      push @BL, $b;
-      next;
-    }
+    next if $$a[5] eq "\"CLOSED\"";
     $cnt += 1;
   }
   print "\nWe have $cnt open tickets in $cur\n";
+}
+
+sub checkNotClosed {
+  my ($BZ, $cur) = @_;
+  my @BL;
+  foreach my $b (sort(keys %$BZ)) {
+    my $a = $BZ->{$b};
+    next unless $$a[5] eq "\"CLOSED\"";
+    push @BL, $b;
+  }
   return if $#BL < 0;
-  $cnt = $#BL + 1;
+  my $cnt = $#BL + 1;
   print "\nWe have $cnt closed tickets still blocking $cur\n";
-  print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-    join(",", @BL), "\n";
+  &displayBL(\@BL, $BZ);
 }
 
 sub checkLowActivity {
@@ -367,14 +388,12 @@
   if ($#LATE >= 0) {
     my $cnt = $#LATE + 1;
     print "\nWe have $cnt $cur tickets with no activity in eight weeks\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @LATE), "\n";
+    &displayBL(\@LATE, $BZ);
   }
   if ($#BL >= 0) {
     my $cnt = $#BL + 1;
     print "\nWe have $cnt $cur tickets with no activity in four weeks\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @BL), "\n";
+    &displayBL(\@BL, $BZ);
   }
 }
 
@@ -392,8 +411,7 @@
   if ($#BL >= 0) {
     my $cnt = $#BL + 1;
     print "\nWe have $cnt $cur tickets 8 weeks old with no comments\n";
-    print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
-      join(",", @BL), "\n";
+    &displayBL(\@BL, $BZ);
   }
 }
 
@@ -406,6 +424,7 @@
                   [$main::extras]
    -core <url>    Fedora core SRPMS repo
                   [$main::core]
+   -d <file>      list of discarded packages
    -o <file>      owners.list file\n";
   exit 1;
 }
@@ -440,3 +459,14 @@
   }
   return $s;
 }
+
+sub displayBL {
+  my ($BL, $BZ) = @_;
+  print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
+    join(",", @$BL), "\n";
+  foreach my $b (@$BL) {
+    my $a = $BZ->{$b};
+    my ($owner) = $$a[4] =~ /^.([^@]+)/;
+    printf "  %-40s %s\n", $$a[8], $owner;
+  }
+}




More information about the fedora-extras-commits mailing list