Fix: some heuristically determined components are wrong. Fix: recipe failures without bldinf attribute are lost
--- a/uh_parser/RaptorError.pm Thu May 06 12:47:02 2010 +0100
+++ b/uh_parser/RaptorError.pm Thu May 06 18:06:35 2010 +0100
@@ -190,7 +190,7 @@
my $package = '';
# if bldinf attribute is not available then heuristically attempt to determine the package
if (!$raptor_error_info->{bldinf} &&
- $characters =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][^/^\\]*[/\\]),s)
+ $characters =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][a-zA-Z]+[/\\]?),s)
{
$raptor_error_info->{bldinf} = "$1... (guessed)";
}
@@ -204,7 +204,7 @@
$raptor_error_info->{bldinf} =~ s,^[A-Za-z]:,,;
$raptor_error_info->{bldinf} =~ s,[\\],/,g;
- if ($raptor_error_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($raptor_error_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[a-zA-Z]+),)
{
$package = $1;
$package =~ s,/,_,;
--- a/uh_parser/RaptorRecipe.pm Thu May 06 12:47:02 2010 +0100
+++ b/uh_parser/RaptorRecipe.pm Thu May 06 18:06:35 2010 +0100
@@ -237,24 +237,33 @@
sub on_end_buildlog_recipe
{
- $::allbldinfs->{$recipe_info->{bldinf}} = 1;
+ if ($recipe_info->{bldinf})
+ {
+ $::allbldinfs->{$recipe_info->{bldinf}} = 1;
+ }
+ else
+ {
+ $::allbldinfs->{'/unknown/unknown'} = 1;
+ }
if ($recipe_info->{exit} =~ /failed/i || $recipe_info->{exit} =~ /retry/i && $recipe_info->{forcesuccess} =~ /FORCESUCCESS/i)
{
+ #print "2 normalizing bldinf: $recipe_info->{bldinf} \n";
# normalize bldinf path
$recipe_info->{bldinf} = lc($recipe_info->{bldinf});
$recipe_info->{bldinf} =~ s,^[A-Za-z]:,,;
$recipe_info->{bldinf} =~ s,[\\],/,g;
my $package = '';
- if ($recipe_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($recipe_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[a-zA-Z]+),)
{
$package = $1;
$package =~ s,/,_,;
}
else
{
- print "WARNING: can't understand bldinf attribute of recipe: $recipe_info->{bldinf}. Won't dump to failed recipes file.\n";
+ #print "WARNING: can't understand bldinf attribute of recipe: $recipe_info->{bldinf}. Won't dump to failed recipes file.\n";
+ $package = 'unknown_unknown';
}
# also normalize mmp path if this exists
@@ -277,8 +286,10 @@
open(FILE, ">$filename");
close(FILE);
}
-
- my $dumped = process($characters, $recipe_info->{config}, $recipe_info->{bldinf}, $recipe_info->{mmp}, $recipe_info->{phase}, $recipe_info->{name}, "$package.txt");
+
+ my $bldinf_arg = '/unknown/unknown';
+ $bldinf_arg = $recipe_info->{bldinf} if ($recipe_info->{bldinf});
+ my $dumped = process($characters, $recipe_info->{config}, $bldinf_arg, $recipe_info->{mmp}, $recipe_info->{phase}, $recipe_info->{name}, "$package.txt");
if ($dumped)
{
--- a/uh_parser/RaptorUnreciped.pm Thu May 06 12:47:02 2010 +0100
+++ b/uh_parser/RaptorUnreciped.pm Thu May 06 18:06:35 2010 +0100
@@ -168,7 +168,7 @@
my $package = '';
my $guessed_bldinf = '';
# if bldinf attribute is not available then heuristically attempt to determine the package
- if ($line =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][^/^\\]*[/\\]),s)
+ if ($line =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][a-zA-Z]+[/\\]?),s)
{
$guessed_bldinf = "$1... (guessed)";
}
@@ -182,7 +182,7 @@
$guessed_bldinf =~ s,^[A-Za-z]:,,;
$guessed_bldinf =~ s,[\\],/,g;
- if ($guessed_bldinf =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($guessed_bldinf =~ m,/((os|mw|app|tools|ostools|adaptation)/[a-zA-Z]+),)
{
$package = $1;
$package =~ s,/,_,;
--- a/uh_parser/RaptorWarning.pm Thu May 06 12:47:02 2010 +0100
+++ b/uh_parser/RaptorWarning.pm Thu May 06 18:06:35 2010 +0100
@@ -122,7 +122,7 @@
my $package = '';
# if bldinf attribute is not available then heuristically attempt to determine the package
if (!$raptor_warning_info->{bldinf} &&
- $characters =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][^/^\\]*[/\\]),s)
+ $characters =~ m,.*?([/\\]sf[/\\](os|mw|app|tools|ostools|adaptation)[/\\][a-zA-Z]+[/\\]?),s)
{
$raptor_warning_info->{bldinf} = "$1... (guessed)";
}
@@ -136,7 +136,7 @@
$raptor_warning_info->{bldinf} =~ s,^[A-Za-z]:,,;
$raptor_warning_info->{bldinf} =~ s,[\\],/,g;
- if ($raptor_warning_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($raptor_warning_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[a-zA-Z]+),)
{
$package = $1;
$package =~ s,/,_,;
--- a/uh_parser/uh.pl Thu May 06 12:47:02 2010 +0100
+++ b/uh_parser/uh.pl Thu May 06 18:06:35 2010 +0100
@@ -172,7 +172,7 @@
}
if ($failure->{component})
{
- if ($failure->{component} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($failure->{component} =~ m,/((os|mw|app|tools|ostools|adaptation|unknown)/[a-zA-Z]+),)
{
$failure_package = $1;
}
@@ -487,7 +487,7 @@
$bldinf =~ s,[\\],/,g;
my $package = '';
- if ($bldinf =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ if ($bldinf =~ m,/((os|mw|app|tools|ostools|adaptation|unknown)/[a-zA-Z]+),)
{
$package = $1;
}
@@ -499,5 +499,14 @@
$allpackages->{$package} = 1;
}
- return sort {$a cmp $b} keys %{$allpackages};
-}
\ No newline at end of file
+ # sort packages, but set unknown first
+ my @sorted = ();
+ if (defined $allpackages->{'unknown/unknown'})
+ {
+ push @sorted, 'unknown/unknown';
+ undef $allpackages->{'unknown/unknown'};
+ }
+ push @sorted, sort {$a cmp $b} keys %{$allpackages};
+
+ return @sorted;
+}