status-report-scripts parseBZbugList,1.3,1.4
Christian Iseli (c4chris)
fedora-extras-commits at redhat.com
Wed Apr 19 09:51:38 UTC 2006
Author: c4chris
Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1355
Modified Files:
parseBZbugList
Log Message:
Add more checks.
Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- parseBZbugList 19 Apr 2006 09:50:45 -0000 1.3
+++ parseBZbugList 19 Apr 2006 09:51:36 -0000 1.4
@@ -5,11 +5,16 @@
use Date::Manip;
my %opt;
-my @options = ( "help", "core=s", "extras=s", "bzid=s", "o=s" );
+my @options = ( "help", "core=s", "extras=s", "bzid=s", "o=s", "d=s" );
+
+$main::core = "http://mirrors.kernel.org/fedora/core/development/SRPMS/";
+$main::extras = "http://mirrors.kernel.org/fedora/extras/development/SRPMS/";
if( ! GetOptions( \%opt, @options ) ) { &usage(); }
# Override any default settings with arguments that the user has supplied
+$main::core = $opt{"core"} if defined $opt{"core"};
+$main::extras = $opt{"extras"} if defined $opt{"extras"};
&usage() if defined $opt{'help'};
@@ -24,6 +29,7 @@
my %SRPMS;
my %NAME;
my %OWN;
+my %DISCARD;
if (defined $opt{"bzid"}) {
local *IN;
open IN, $opt{"bzid"} or die "Couldn't open $opt{'bzid'} : $!";
@@ -34,6 +40,15 @@
}
close IN;
}
+if (defined $opt{"d"}) {
+ local *IN;
+ open IN, $opt{"d"} or die "Couldn't open $opt{'d'} : $!";
+ while ( <IN> ) {
+ s/\s+$//;
+ $DISCARD{$_} = 1;
+ }
+ close IN;
+}
if (defined $opt{"o"}) {
local *IN;
open IN, $opt{"o"} or die "Couldn't open $opt{'o'} : $!";
@@ -42,15 +57,16 @@
next if /^#/;
s/\s+$//;
my @F = split /\|/;
+ next if defined $DISCARD{$F[1]};
$OWN{$F[1]} = \@F;
}
close IN;
}
-if (defined $opt{"extras"}) {
- &grabRepoList($opt{"extras"}, \%EXTRAS);
+if ($main::extras ne "") {
+ &grabRepoList($main::extras, \%EXTRAS);
}
-if (defined $opt{"core"}) {
- &grabRepoList($opt{"core"}, \%CORE);
+if ($main::core ne "") {
+ &grabRepoList($main::core, \%CORE);
}
%SRPMS = %EXTRAS;
foreach my $k (keys %CORE) {
@@ -124,13 +140,19 @@
}
print "=== About owners file ===\n\n";
&checkOwners;
+my $fourDaysAgo = DateCalc("4 days ago", "today");
+my $fourWeeksAgo = DateCalc("4 weeks ago", "today");
+my $eightWeeksAgo = DateCalc("8 weeks ago", "today");
print "\n\n=== About FE-ACCEPT packages ===\n";
&checkAcceptClosed(\%BZA);
&checkAcceptOpen(\%BZA);
print "\n\n=== About FE-NEW packages ===\n";
&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");
exit 0;
@@ -224,9 +246,11 @@
$missO += 1;
}
} else {
- # print "Missing pkg: ", join(" ", @$a), "\n";
- push @BL, $b;
- $miss += 1;
+ if (Date_Cmp($$a[2], $fourDaysAgo) < 0) {
+ # print "Missing pkg: ", join(" ", @$a), "\n";
+ push @BL, $b;
+ $miss += 1;
+ }
if (defined $OWN{$pkg}) {
$R{$$a[3]} += 1;
$O{$$a[4]} += 1;
@@ -239,13 +263,13 @@
}
if ($miss > 0) {
print "\nWe have $miss accepted, closed packages where I'm unable to find
-the package in the development repo:\n\n";
+the package in the development repo:\n";
print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
join(",", @BL), "\n";
}
if ($missO > 0) {
print "\nWe have $missO accepted, closed packages where I'm unable to find
-the package in the owners file:\n\n";
+the package in the owners file:\n";
print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
join(",", @BLO), "\n";
}
@@ -273,6 +297,7 @@
sub checkAcceptOpen {
my ($BZ) = @_;
my @BL;
+ my @LATE;
my $cnt = 0;
foreach my $b (sort(keys %$BZ)) {
my $a = $BZ->{$b};
@@ -288,12 +313,20 @@
$cnt += 1;
push @BL, $b;
}
+ if (Date_Cmp($$a[2], $fourWeeksAgo) < 0) {
+ push @LATE, $b;
+ }
}
print "\nWe have $cnt accepted, open package reviews where the package
appears to already be in the repo...\n";
- print "\nAll open packages already available:\n";
print "https://bugzilla.redhat.com/bugzilla/buglist.cgi?bug_id=",
join(",", @BL), "\n";
+ 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";
+ }
}
sub checkNotClosed {
@@ -311,12 +344,64 @@
join(",", @BL), "\n";
}
+sub checkLowActivity {
+ my ($BZ, $cur) = @_;
+ my @BL;
+ my @LATE;
+ foreach my $b (sort(keys %$BZ)) {
+ my $a = $BZ->{$b};
+ next if $$a[5] eq "\"CLOSED\"";
+ if (Date_Cmp($$a[2], $fourWeeksAgo) < 0) {
+ if (Date_Cmp($$a[2], $eightWeeksAgo) < 0) {
+ push @LATE, $b;
+ } else {
+ push @BL, $b;
+ }
+ }
+ }
+ 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";
+ }
+ 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";
+ }
+}
+
+sub checkNoActivity {
+ my ($BZ, $cur) = @_;
+ my @BL;
+ foreach my $b (sort(keys %$BZ)) {
+ my $a = $BZ->{$b};
+ next if $$a[5] eq "\"CLOSED\"";
+ next if $$a[1] ne $$a[2];
+ if (Date_Cmp($$a[2], $eightWeeksAgo) < 0) {
+ push @BL, $b;
+ }
+ }
+ 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";
+ }
+}
+
sub usage {
print STDERR "Usage: $0 [options] <bugs list>
where options are:
-help this help note
- -bzid <file> list associating bz ticket number with package name
- -srpms <file> list of SRPMS\n";
+ -bzid <file> list associating bz ticket number with package name
+ -extras <url> Fedora extras SRPMS repo
+ [$main::extras]
+ -core <url> Fedora core SRPMS repo
+ [$main::core]
+ -o <file> owners.list file\n";
exit 1;
}
More information about the scm-commits
mailing list