uh_parser/RaptorRecipe.pm
changeset 252 f593b7acdb37
parent 191 890789575604
child 258 08436a227940
equal deleted inserted replaced
251:3487e8b7ed38 252:f593b7acdb37
   235 	}
   235 	}
   236 }
   236 }
   237 
   237 
   238 sub on_end_buildlog_recipe
   238 sub on_end_buildlog_recipe
   239 {
   239 {
   240 	$::allbldinfs->{$recipe_info->{bldinf}} = 1;
   240 	if ($recipe_info->{bldinf})
       
   241 	{
       
   242 		$::allbldinfs->{$recipe_info->{bldinf}} = 1;
       
   243 	}
       
   244 	else
       
   245 	{
       
   246 		$::allbldinfs->{'/unknown/unknown'} = 1;
       
   247 	}
   241 	
   248 	
   242 	if ($recipe_info->{exit} =~ /failed/i || $recipe_info->{exit} =~ /retry/i && $recipe_info->{forcesuccess} =~ /FORCESUCCESS/i)
   249 	if ($recipe_info->{exit} =~ /failed/i || $recipe_info->{exit} =~ /retry/i && $recipe_info->{forcesuccess} =~ /FORCESUCCESS/i)
   243 	{
   250 	{
       
   251 		#print "2 normalizing bldinf: $recipe_info->{bldinf} \n";
   244 		# normalize bldinf path
   252 		# normalize bldinf path
   245 		$recipe_info->{bldinf} = lc($recipe_info->{bldinf});
   253 		$recipe_info->{bldinf} = lc($recipe_info->{bldinf});
   246 		$recipe_info->{bldinf} =~ s,^[A-Za-z]:,,;
   254 		$recipe_info->{bldinf} =~ s,^[A-Za-z]:,,;
   247 		$recipe_info->{bldinf} =~ s,[\\],/,g;
   255 		$recipe_info->{bldinf} =~ s,[\\],/,g;
   248 		
   256 		
   249 		my $package = '';
   257 		my $package = '';
   250 		if ($recipe_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
   258 		if ($recipe_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[a-zA-Z]+),)
   251 		{
   259 		{
   252 			$package = $1;
   260 			$package = $1;
   253 			$package =~ s,/,_,;
   261 			$package =~ s,/,_,;
   254 		}
   262 		}
   255 		else
   263 		else
   256 		{
   264 		{
   257 			print "WARNING: can't understand bldinf attribute of recipe: $recipe_info->{bldinf}. Won't dump to failed recipes file.\n";
   265 			#print "WARNING: can't understand bldinf attribute of recipe: $recipe_info->{bldinf}. Won't dump to failed recipes file.\n";
       
   266 			$package = 'unknown_unknown';
   258 		}
   267 		}
   259 		
   268 		
   260 		# also normalize mmp path if this exists
   269 		# also normalize mmp path if this exists
   261 		if ($recipe_info->{mmp})
   270 		if ($recipe_info->{mmp})
   262 		{
   271 		{
   275 			{
   284 			{
   276 				print "Writing recipe file $filename\n";
   285 				print "Writing recipe file $filename\n";
   277 				open(FILE, ">$filename");
   286 				open(FILE, ">$filename");
   278 				close(FILE);
   287 				close(FILE);
   279 			}
   288 			}
   280 			
   289 
   281 			my $dumped = process($characters, $recipe_info->{config}, $recipe_info->{bldinf}, $recipe_info->{mmp}, $recipe_info->{phase}, $recipe_info->{name}, "$package.txt");
   290 			my $bldinf_arg = '/unknown/unknown';
       
   291 			$bldinf_arg = $recipe_info->{bldinf} if ($recipe_info->{bldinf});	
       
   292 			my $dumped = process($characters, $recipe_info->{config}, $bldinf_arg, $recipe_info->{mmp}, $recipe_info->{phase}, $recipe_info->{name}, "$package.txt");
   282 			
   293 			
   283 			if ($dumped)
   294 			if ($dumped)
   284 			{
   295 			{
   285 				open(FILE, ">>$filename");
   296 				open(FILE, ">>$filename");
   286 				print FILE "---failure_item_$::failure_item_number\---\n";
   297 				print FILE "---failure_item_$::failure_item_number\---\n";