status-report-scripts parseBZbugList,1.44,1.45

Christian Iseli (c4chris) fedora-extras-commits at redhat.com
Fri Jul 14 22:21:17 UTC 2006


Author: c4chris

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

Modified Files:
	parseBZbugList 
Log Message:
Grab BZ login info from firefox's cookies file.  Link top-25 count with tickets.  Look for dead.package file first.  Report dropped core packages also for devel.


Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- parseBZbugList	5 Jul 2006 13:58:30 -0000	1.44
+++ parseBZbugList	14 Jul 2006 22:21:14 -0000	1.45
@@ -39,9 +39,7 @@
 
 # Cookies and BZ URLs to retrieve tickets
 my $BZ_cooky = "# HTTP Cookie File
-bugzilla.redhat.com	FALSE	/bugzilla	FALSE	2145917104	COLUMNLIST	opendate%20changeddate%20bug_severity%20assigned_to%20reporter%20bug_status%20resolution%20component%20blockedby%20short_desc
-bugzilla.redhat.com	FALSE	/bugzilla	FALSE	2145917173	Bugzilla_logincookie	496436
-bugzilla.redhat.com	FALSE	/bugzilla	FALSE	2145917173	Bugzilla_login	156481";
+bugzilla.redhat.com	FALSE	/bugzilla	FALSE	2145917104	COLUMNLIST	opendate%20changeddate%20bug_severity%20assigned_to%20reporter%20bug_status%20resolution%20component%20blockedby%20short_desc\n";
 my @BZ_URLs;
 # FE-NEW blockers
 push @BZ_URLs, 
@@ -114,7 +112,9 @@
 my %OWNER_LIST;
 my %COUNT_LIST;
 my %OWNER_STAT;
+my %BZOWN_BUGS;
 my %BZOWN_CNT;
+my %BZREV_BUGS;
 my %BZREV_CNT;
 my %INFRASTRUCTURE = (
   "buildsystem" => 1,
@@ -237,7 +237,9 @@
       $DISCARD{$_} = 1 unless defined $CORE_D{$_};
       next;
     }
-    if (-f "$main::cvsDir/$_/devel/$_.spec") {
+    if (-f "$main::cvsDir/$_/devel/dead.package") {
+      $DISCARD{$_} = 1 unless defined $CORE_D{$_};
+    } elsif (-f "$main::cvsDir/$_/devel/$_.spec") {
       if (defined($CORE_D{$_})) {
 	push @PL, $_;
       }
@@ -246,8 +248,6 @@
       if (defined($CORE_D{$_})) {
 	push @PL, $_;
       }
-    } elsif (-f "$main::cvsDir/$_/devel/dead.package") {
-      $DISCARD{$_} = 1 unless defined $CORE_D{$_};
     } elsif (-f "$main::cvsDir/$_/devel/README") {
       $DISCARD{$_} = 1 unless defined $CORE_D{$_};
     } elsif (-f "$main::cvsDir/$_/devel/README.CVS") {
@@ -265,6 +265,10 @@
 my ($tfh, $tfn) = tempfile();
 print $tfh $BZ_cooky;
 close $tfh;
+system
+  "grep Bugzilla_login"
+  . " $ENV{'HOME'}/.mozilla/firefox/*default*/cookies.txt"
+  . " >>$tfn";
 foreach my $url (@BZ_URLs) {
   local *IN;
   open IN, "wget --load-cookies $tfn -nv -O - \"$url\"|"
@@ -574,7 +578,7 @@
 }
 
 sub displayOwnerCntWiki {
-  my ($a, $c, $aref, $count, $mark) = @_;
+  my ($a, $c, $aref, $count, $mark, $buglist) = @_;
   if (defined $count) {
     $count -= 1;
   } else {
@@ -597,6 +601,13 @@
     }
     my $aa = $c->{$$a[$i]};
     $aa = $$aa[$aref] if defined $aref;
+    if (defined $buglist) {
+      my $h = $buglist->{$$a[$i]};
+      my @A = sort(keys %$h);
+      $aa =
+	"[https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id="
+	. join(",", @A) . " $aa]";
+    }
     if ($sponsor == 1) {
       print "||<style=\"background-color: #80FF80;\"> $n||$aa||\n";
     } else {
@@ -728,30 +739,42 @@
     unless ($SRPMS{$pkg} == 1 || defined($OWN{$pkg})) {
       $pkg = lcfirst $$a[10];
     }
-    if ($SRPMS{$pkg} == 1) {
-      $BZREV_CNT{$$a[4]} += 1;
-      $BZOWN_CNT{$$a[5]} += 1;
-      $COUNT_LIST{"acceptedClosed"} += 1;
-      if (!defined($CORE_D{$pkg}) && !defined($OWN{$pkg})) {
-	push @BLO, $b;
-	$COUNT_LIST{"missingOwner"} += 1;
-      }
-    } else {
-      if (Date_Cmp($$a[2], $fourDaysAgo) < 0) {
-	# print "Missing pkg: ", join(" ", @$a), "\n";
+    unless (defined $BZREV_BUGS{$$a[4]}) {
+      $BZREV_BUGS{$$a[4]} = {};
+    }
+    $BZREV_BUGS{$$a[4]}->{$b} = 1;
+    unless (defined $BZOWN_BUGS{$$a[5]}) {
+      $BZOWN_BUGS{$$a[5]} = {};
+    }
+    $BZOWN_BUGS{$$a[5]}->{$b} = 1;
+    $COUNT_LIST{"acceptedClosed"} += 1;
+    if (Date_Cmp($$a[2], $fourDaysAgo) < 0) {
+      #print STDERR "Date_Cmp  $$a[2] < $fourDaysAgo\n";
+      if ($SRPMS{$pkg} == 1) {
+	if (!defined($CORE_D{$pkg}) && !defined($OWN{$pkg})) {
+	  push @BLO, $b;
+	  $COUNT_LIST{"missingOwner"} += 1;
+	}
+      } else {
 	push @BL, $b;
 	$COUNT_LIST{"missing"} += 1;
-      }
-      if (defined $OWN{$pkg}) {
-	$BZREV_CNT{$$a[4]} += 1;
-	$BZOWN_CNT{$$a[5]} += 1;
-	$COUNT_LIST{"acceptedClosed"} += 1;
-      } else {
-	push @BLO, $b;
-	$COUNT_LIST{"missingOwner"} += 1;
+	unless (defined $OWN{$pkg}) {
+	  push @BLO, $b;
+	  $COUNT_LIST{"missingOwner"} += 1;
+	}
       }
     }
   }
+  foreach my $k (keys %BZREV_BUGS) {
+    my $h = $BZREV_BUGS{$k};
+    my @A = keys %$h;
+    $BZREV_CNT{$k} = $#A + 1;
+  }
+  foreach my $k (keys %BZOWN_BUGS) {
+    my $h = $BZOWN_BUGS{$k};
+    my @A = keys %$h;
+    $BZOWN_CNT{$k} = $#A + 1;
+  }
   my @TR = sort {$BZREV_CNT{$b} <=> $BZREV_CNT{$a}} keys %BZREV_CNT;
   my @TO = sort {$BZOWN_CNT{$b} <=> $BZOWN_CNT{$a}} keys %BZOWN_CNT;
   $BUG_LIST{"acceptedNoDevel"} = \@BL;
@@ -768,11 +791,11 @@
   print "\n=== Top 25 BZ review requests submitters ===\n";
   print "Sponsors are highlighted in green.\n";
   &displayOwnerCntWiki($OWNER_LIST{"BZOwner"},
-		       \%BZOWN_CNT, undef, 25, 1);
+		       \%BZOWN_CNT, undef, 25, 1, \%BZOWN_BUGS);
   print "\n=== Top 25 BZ review requests reviewers ===\n";
   print "Sponsors are highlighted in green.\n";
   &displayOwnerCntWiki($OWNER_LIST{"BZReviewer"},
-		       \%BZREV_CNT, undef, 25, 1);
+		       \%BZREV_CNT, undef, 25, 1, \%BZREV_BUGS);
   print "\n\n=== Potential problems ===\n";
   if ($COUNT_LIST{"missing"} > 0) {
     print "\nWe have $COUNT_LIST{'missing'} accepted, closed packages where I'm unable to ",
@@ -1253,7 +1276,7 @@
 
 sub checkDropped {
   my %D;
-  for (my $i = $main::currel - 1; $i >= $main::firstrel; $i--) {
+  for (my $i = $main::currel; $i >= $main::firstrel; $i--) {
     foreach my $k (keys %{$CORE_R[$i]}) {
       unless ($SRPMS{$k} or $D{$k}) {
 	$CORE_DROPPED_SRPMS[$i]->{$k} = 1;
@@ -1270,10 +1293,11 @@
   return if $COUNT_LIST{'Dropped'} == 0;
   print "== About dropped packages ==\n\n";
   print "We have a total of $COUNT_LIST{'Dropped'} dropped packages.\n";
-  for (my $i = $main::currel - 1; $i >= $main::firstrel; $i--) {
+  for (my $i = $main::currel; $i >= $main::firstrel; $i--) {
     my @A = keys %{$CORE_DROPPED_SRPMS[$i]};
     if ($#A >= 0) {
       my $n = $i + 1;
+      $n = "devel" if $n > $main::currel;
       print "\n=== FC packages dropped between release $i and $n ===\n";
       my $cnt = $#A + 1;
       print "\nWe have $cnt packages dropped from core:{{{\n";




More information about the fedora-extras-commits mailing list