status-report-scripts parseBZbugList,1.46,1.47
Christian Iseli (c4chris)
fedora-extras-commits at redhat.com
Wed Jul 26 16:23:30 UTC 2006
Author: c4chris
Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23931
Modified Files:
parseBZbugList
Log Message:
Check comps.xml files.
Index: parseBZbugList
===================================================================
RCS file: /cvs/fedora/status-report-scripts/parseBZbugList,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- parseBZbugList 25 Jul 2006 14:40:21 -0000 1.46
+++ parseBZbugList 26 Jul 2006 16:23:27 -0000 1.47
@@ -56,7 +56,7 @@
my %opt;
my @options = ( "help", "repourl=s", "bzid=s", "o=s", "d=s", "cvs=s",
- "currel=i", "firstrel=i" );
+ "comps=s", "currel=i", "firstrel=i" );
$main::repourl = "http://mirrors.kernel.org/fedora";
$main::discarded
@@ -102,6 +102,8 @@
my @EXTRAS_R;
my %SRPMS;
my @CORE_DROPPED_SRPMS;
+my @COMPS;
+my @COMPS_M;
my %NAME;
my %OWN;
my %OWN_DUP;
@@ -194,6 +196,7 @@
}
&grabRepoList("$main::repourl/core/development/source/SRPMS/", \%CORE_D);
&grabRepoList("$main::repourl/extras/development/SRPMS/", \%EXTRAS_D);
+$EXTRAS_R[$main::currel + 1] = \%EXTRAS_D;
for my $i ($main::firstrel .. $main::currel) {
$CORE_R[$i] = {};
if ($i >= 5) {
@@ -213,6 +216,18 @@
foreach my $k (keys %FC_INTEGRATED) {
$SRPMS{$k} = 1;
}
+# Check comps files
+for my $i ($main::firstrel .. ($main::currel + 1)) {
+ print STDERR "Looking for $main::compsDir/comps-fe$i.xml.in\n";
+ if (-s "$main::compsDir/comps-fe$i.xml.in") {
+ $COMPS[$i] = {};
+ $COMPS_M[$i] = {};
+ print STDERR "Grab $i\n";
+ &grabCompsList("$main::compsDir/comps-fe$i.xml.in", $COMPS[$i]);
+ print STDERR "Check $i\n";
+ &checkComps($EXTRAS_R[$i], $COMPS[$i], $COMPS_M[$i], $i);
+ }
+}
# Take a look at CVS stuff
if (-d $main::cvsDir) {
$main::cvsDir =~ s/\/+$//;
@@ -430,6 +445,7 @@
&displayCVSWiki();
&displayMaintainersWiki();
&displayDroppedWiki();
+&displayCompsWiki;
print "----\nCategoryExtras\n";
print STDERR "\n\nFE Package Status of ",
&UnixDate("today", "%b %e, %Y"), "\n";
@@ -447,6 +463,7 @@
&displayCVSMail();
&displayMaintainersMail();
&displayDroppedMail();
+&displayCompsMail;
exit 0;
@@ -591,6 +608,33 @@
}
}
+sub displayCompsWiki {
+ print "== About comps.xml files ==\n\n";
+ my $rel = $main::currel + 1;
+ while (defined $COMPS[$rel]) {
+ if ($rel > $main::currel) {
+ print "\n=== FE devel ===\n\n";
+ } else {
+ print "\n=== FE $rel ===\n\n";
+ }
+ my $cnt = $COUNT_LIST{"InComps$rel"};
+ print "We have $cnt packages in comps-fe$rel file.[[BR]]\n";
+ $cnt = $COUNT_LIST{"CompsMiss$rel"};
+ if ($cnt > 0) {
+ print "\n=== Packages not present in comps-fe$rel ===\n";
+ print "\nWe have $cnt packages missing:\n";
+ &displayPkgListByOwnerWiki($PKG_LIST{"CompsMiss$rel"});
+ }
+ $cnt = $COUNT_LIST{"CompsOver$rel"};
+ if ($cnt > 0) {
+ print "\n=== Packages listed in comps-fe$rel but not available ===\n";
+ print "\nWe have $cnt packages missing:\n";
+ &displayPkgListByOwnerWiki($PKG_LIST{"CompsOver$rel"});
+ }
+ $rel -= 1;
+ }
+}
+
sub displayOwnerCntWiki {
my ($a, $c, $aref, $count, $mark, $buglist) = @_;
if (defined $count) {
@@ -728,6 +772,24 @@
}
}
+sub displayCompsMail {
+ print STDERR "\nComps.xml files stats:\n";
+ my $rel = $main::currel + 1;
+ while (defined $COMPS[$rel]) {
+ my $cnt = $COUNT_LIST{"InComps$rel"};
+ print STDERR " - $cnt packages in comps-fe$rel file\n";
+ $cnt = $COUNT_LIST{"CompsMiss$rel"};
+ if ($cnt > 0) {
+ print STDERR " - $cnt packages missing from comps-fe$rel file\n";
+ }
+ $cnt = $COUNT_LIST{"CompsOver$rel"};
+ if ($cnt > 0) {
+ print STDERR " - $cnt packages in comps-fe$rel but not in repo\n";
+ }
+ $rel -= 1;
+ }
+}
+
sub checkAcceptClosed {
my ($BZ) = @_;
my @BL;
@@ -977,6 +1039,17 @@
close IN;
}
+sub grabCompsList {
+ my ($f, $h) = @_;
+ local *IN;
+ open IN, "$f" or die "Failed to open $f : $!";
+ while ( <IN> ) {
+ next unless /<packagereq[^>]*>([^<]+)<\/packagereq>/;
+ $h->{$1} = 1;
+ }
+ close IN;
+}
+
sub toLine {
my ($s) = @_;
my $p1 = 0;
@@ -1328,3 +1401,27 @@
print STDERR " - $COUNT_LIST{'Dropped'} packages were dropped from core",
" since FC $main::firstrel\n";
}
+
+sub checkComps {
+ my ($rh, $ch, $mh, $tag) = @_;
+ foreach my $k (keys %$rh) {
+ $mh->{$k} = -1 unless defined $ch->{$k};
+ }
+ foreach my $k (keys %$ch) {
+ $mh->{$k} = 1 unless defined $rh->{$k};
+ }
+ my @A = keys %$ch;
+ $COUNT_LIST{"InComps$tag"} = $#A + 1;
+ undef @A;
+ foreach my $k (keys %$mh) {
+ push @A, $k if $mh->{$k} == -1;
+ }
+ $COUNT_LIST{"CompsMiss$tag"} = $#A + 1;
+ $PKG_LIST{"CompsMiss$tag"} = \@A;
+ my @B;
+ foreach my $k (keys %$mh) {
+ push @B, $k if $mh->{$k} == 1;
+ }
+ $COUNT_LIST{"CompsOver$tag"} = $#B + 1;
+ $PKG_LIST{"CompsOver$tag"} = \@B;
+}
More information about the fedora-extras-commits
mailing list