r9581 - /scripts/qa/DebianQA/Classification.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Mon Nov 19 04:39:32 UTC 2007
Author: tincho-guest
Date: Mon Nov 19 04:39:32 2007
New Revision: 9581
URL: http://svn.debian.org/wsvn/?sc=1&rev=9581
Log:
More useful data for classification, removal of debug
Modified:
scripts/qa/DebianQA/Classification.pm
Modified: scripts/qa/DebianQA/Classification.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Classification.pm?rev=9581&op=diff
==============================================================================
--- scripts/qa/DebianQA/Classification.pm (original)
+++ scripts/qa/DebianQA/Classification.pm Mon Nov 19 04:39:32 2007
@@ -32,15 +32,32 @@
# ...
# },
# notes => [ ... ],
-# svnpath => "...",
-# upstream_url => "...",
-# bugs => [ ... ], # Already extracted data for ease of use
+# hilight => {
+# archive => 1,
+# bugs => 1, ...
+# },
+# svn_path => "...",
+# upstream_url => "...", # Already extracted data for ease of use
#
# bts => {},
# archive => {},
# svn => {},
# watch => {} # Copies from the caches
# }
+
+my %error_hilight = (
+ archive_waiting => "archive",
+ needs_upload => "archive",
+ never_uploaded => "archive",
+ has_bugs => "bugs",
+ not_finished => "svn",
+ repo_ancient => "svn",
+ needs_upgrade => "upstream",
+ upstream_ancient => "upstream",
+ watch_error => "upstream",
+# native => "",
+);
+
sub classify(@) {
my @pkglist = @_;
my $data = read_cache(consolidated => "");
@@ -94,29 +111,30 @@
if($archive_latest =~ /new|incoming/) {
$status{archive_waiting} = 1;
}
- my @bugs = sort keys %{$data->{bts}{$pkg}};
- if(@bugs) {
+ if(%{$data->{bts}{$pkg}}) {
$status{has_bugs} = 1;
}
-
+ my %hilight;
+ foreach(keys %$status) {
+ die "Internal error: $_ is not a valid status" unless(
+ $error_hilight{$_});
+ $hilight{$error_hilight{$_}} = 1;
+ }
$res{$pkg} = {
watch => $data->{watch}{$pkg},
archive => $data->{archive}{$pkg},
svn => $data->{svn}{$pkg},
bts => $data->{bts}{$pkg},
#
- svnpath => $data->{svn}{$pkg}{dir},
+ svn_path => $data->{svn}{$pkg}{dir},
upstream_url => $data->{watch}{$pkg}{upstream_url},
- bugs => \@bugs,
+ #
status => \%status,
- notes => \@notes
+ notes => \@notes,
+ hilight => \%hilight
};
-
- use Data::Dumper;
- print "$pkg\n";
- print Dumper $res{$pkg};
- print "\n";
}
+ return $res;
}
1;
More information about the Pkg-perl-cvs-commits
mailing list