22 my $report; |
22 my $report; |
23 my $header_list; |
23 my $header_list; |
24 my $destfile; |
24 my $destfile; |
25 my $pkg_destfile; |
25 my $pkg_destfile; |
26 my $del_ok_issues = 1; # This variable determines whether to delete OK issues first. |
26 my $del_ok_issues = 1; # This variable determines whether to delete OK issues first. |
27 my $del_comp_issues = 0; # This variable determines whether to delete Compilation errors. |
27 my $del_comp_issues = 1; # This variable determines whether to delete Compilation errors. |
28 my $del_boost_issues = 1; # This variable determines whether to delete issues for Boost API headers. |
28 my $del_boost_issues = 0; # This variable determines whether to delete issues for Boost API headers. |
29 my $tsv_file; # If defined then sub-reports per package will be generated. |
29 my $tsv_file; # If defined then sub-reports per package will be generated. |
30 my $n; |
30 my $n; |
31 my $m; |
31 my $m; |
32 my $p; |
32 my $p; |
33 my $file_name; |
33 my $file_name; |
|
34 my $type_id; |
|
35 my $identity_description; |
34 my $delete_node; |
36 my $delete_node; |
35 my @lines; |
37 my @lines; |
36 my $line; |
38 my $line; |
37 my @pkgs; |
39 my @pkgs; |
38 my $nopkg; |
40 my $nopkg; |
191 # Create the list of packages that link to remaining header files and generate sub-report for Removed header files. |
193 # Create the list of packages that link to remaining header files and generate sub-report for Removed header files. |
192 $nopkg = 0; |
194 $nopkg = 0; |
193 $n = 0; |
195 $n = 0; |
194 while ($n < $header_num) { |
196 while ($n < $header_num) { |
195 $file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0]; |
197 $file_name = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0]; |
|
198 $type_id = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'issue'}->[0]->{'typeid'}->[0]; |
|
199 $identity_description = $current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'issue'}->[0]->{'identitydescription'}->[0]; |
196 $pkg_found = 0; |
200 $pkg_found = 0; |
197 open FILE, "<$tsv_file" or die("Failed to read $tsv_file: $!\n"); |
201 open FILE, "<$tsv_file" or die("Failed to read $tsv_file: $!\n"); |
198 while ($line = <FILE>) |
202 while ($line = <FILE>) |
199 { |
203 { |
200 chomp $line; |
204 chomp $line; |
201 ($hdr_to_pkg,$package) = split /\t/,$line; |
205 ($hdr_to_pkg,$package) = split /\t/,$line; |
202 $hdr_to_pkg =~ s/\//\\/g; |
206 $hdr_to_pkg =~ s/\//\\/g; |
203 $hdr_to_pkg =~ s/\\epoc32\\include\\//; |
207 $hdr_to_pkg =~ s/\\epoc32\\include\\//; |
204 if (lc($file_name) eq lc($hdr_to_pkg)) { |
208 if ((lc($file_name) eq lc($hdr_to_pkg)) && (!(($type_id eq "0") && ($identity_description eq "File")))) { |
205 print "Package found: $package for header file: $file_name \n"; |
209 print "Package found: $package for header file: $file_name \n"; |
206 $pkg_found = 1; |
210 $pkg_found = 1; |
207 $pkgs_num = @pkgs; |
211 $pkgs_num = @pkgs; |
208 if ($pkgs_num == 0) { # Add the first package name by default. |
212 if ($pkgs_num == 0) { # Add the first package name by default. |
209 push @pkgs, $package; |
213 push @pkgs, $package; |
223 last; |
227 last; |
224 } |
228 } |
225 } |
229 } |
226 close FILE; |
230 close FILE; |
227 if ($pkg_found == 0) { |
231 if ($pkg_found == 0) { |
228 print "Package not found for header file: $file_name \n"; |
232 print "Removed header file: $file_name \n"; |
229 $nopkg++; |
233 $nopkg++; |
230 $n++; |
234 $n++; |
231 } else { # Delete the node. |
235 } else { # Delete the node. |
232 splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1); |
236 splice(@{$current_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}},$n, 1); |
233 $header_num--; |
237 $header_num--; |
261 $n = 0; |
265 $n = 0; |
262 $header_num = @{$temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}}; |
266 $header_num = @{$temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}}; |
263 print "Processing header files for $current_pkg... \n"; |
267 print "Processing header files for $current_pkg... \n"; |
264 while ($n < $header_num) { |
268 while ($n < $header_num) { |
265 $file_name = $temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0]; |
269 $file_name = $temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'shortname'}->[0]; |
|
270 $type_id = $temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'issue'}->[0]->{'typeid'}->[0]; |
|
271 $identity_description = $temp_report->{'bbcresults'}->{'issuelist'}->[0]->{'headerfile'}->[$n]->{'issue'}->[0]->{'identitydescription'}->[0]; |
266 $pkg_found = 0; |
272 $pkg_found = 0; |
267 open FILE, "<$tsv_file" or die("Failed to read $tsv_file: $!\n"); |
273 open FILE, "<$tsv_file" or die("Failed to read $tsv_file: $!\n"); |
268 while ($line = <FILE>) |
274 while ($line = <FILE>) |
269 { |
275 { |
270 chomp $line; |
276 chomp $line; |
271 ($hdr_to_pkg,$package) = split /\t/,$line; |
277 ($hdr_to_pkg,$package) = split /\t/,$line; |
272 $hdr_to_pkg =~ s/\//\\/g; |
278 $hdr_to_pkg =~ s/\//\\/g; |
273 $hdr_to_pkg =~ s/\\epoc32\\include\\//; |
279 $hdr_to_pkg =~ s/\\epoc32\\include\\//; |
274 if ((lc($file_name) eq lc($hdr_to_pkg)) && ($current_pkg eq $package)) { |
280 if ((lc($file_name) eq lc($hdr_to_pkg)) && ($current_pkg eq $package) && (!(($type_id eq "0") && ($identity_description eq "File")))) { |
275 $pkg_found = 1; |
281 $pkg_found = 1; |
276 print "$file_name added to $package \n"; |
282 print "$file_name added to $package \n"; |
277 } |
283 } |
278 } |
284 } |
279 close FILE; |
285 close FILE; |