14 # Raptor parser module. |
14 # Raptor parser module. |
15 # Extract releaseable (whatlog) information |
15 # Extract releaseable (whatlog) information |
16 |
16 |
17 package releaseables; |
17 package releaseables; |
18 |
18 |
|
19 use File::Path; |
|
20 |
19 use strict; |
21 use strict; |
20 |
22 |
21 our $reset_status = {}; |
23 our $reset_status = {}; |
22 my $buildlog_status = {}; |
24 my $buildlog_status = {}; |
23 my $whatlog_status = {}; |
25 my $whatlog_status = {}; |
219 |
221 |
220 for my $bldinf (keys %{$whatlog_info}) |
222 for my $bldinf (keys %{$whatlog_info}) |
221 { |
223 { |
222 for my $config (keys %{$whatlog_info->{$bldinf}}) |
224 for my $config (keys %{$whatlog_info->{$bldinf}}) |
223 { |
225 { |
224 my $normalized = lc($bldinf); |
226 my $normalized = $bldinf; |
225 $normalized =~ s,^[A-Za-z]:,,; |
227 RaptorCommon::normalize_bldinf_path(\$normalized); |
226 $normalized =~ s,[\\],/,g; |
228 |
227 |
229 my $package = RaptorCommon::get_package_subpath($normalized); |
228 $normalized =~ m,^/sf/([^/]+)/([^/]+)/,; |
230 |
229 my $layer = $1; |
231 mkpath("$::releaseablesdir/$package"); |
230 my $package = $2; |
232 |
231 |
233 my $filename = "$::releaseablesdir/$package/info.tsv"; |
232 mkdir("$::releaseablesdir/$layer"); |
234 $package =~ s,/,_,g; |
233 mkdir("$::releaseablesdir/$layer/$package"); |
235 my $filenamemissing = "$::raptorbitsdir/$package\_missing.txt" if ($::missing); |
234 |
|
235 my $filename = "$::releaseablesdir/$layer/$package/info.tsv"; |
|
236 my $filenamemissing = "$::raptorbitsdir/$layer\_$package\_missing.txt" if ($::missing); |
|
237 |
236 |
238 print "Writing info file $filename\n" if (!-f$filename); |
237 print "Writing info file $filename\n" if (!-f$filename); |
239 open(FILE, ">>$filename"); |
238 open(FILE, ">>$filename"); |
240 |
239 |
241 for my $filetype (keys %{$whatlog_info->{$bldinf}->{$config}}) |
240 for my $filetype (keys %{$whatlog_info->{$bldinf}->{$config}}) |