author | Simon Howkins <simonh@symbian.org> |
Wed, 23 Sep 2009 17:41:26 +0100 | |
changeset 79 | ce6215be051a |
child 87 | 97b833888afe |
permissions | -rw-r--r-- |
79
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1 |
# Copyright (c) 2009 Symbian Foundation Ltd |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
2 |
# This component and the accompanying materials are made available |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
3 |
# under the terms of the License "Eclipse Public License v1.0" |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
4 |
# which accompanies this distribution, and is available |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
5 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
6 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
7 |
# Initial Contributors: |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
8 |
# Symbian Foundation Ltd - initial contribution. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
9 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
10 |
# Contributors: |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
11 |
# Arnaud Lenoir |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
12 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
13 |
# Description: |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
14 |
# Task 243 - Generate FCLs details between 2 PDKs to be included as part of the release notes |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
15 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
16 |
# Here is the location for the naming convention for the PDKs: http://developer.symbian.org/wiki/index.php/Build_and_Integration |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
17 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
18 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
19 |
# Configuration data and constants for the script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
20 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
21 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
22 |
my $default_pdk_loc='\\\\bishare\\releases\\'; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
23 |
print "default_pdk_loc=$default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
24 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
25 |
# Nb of arguments to be passed to the script to work. If that need to change, just modify nb_arg_to_pass! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
26 |
my $nb_arg_to_pass=2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
27 |
print "nb_arg_to_pass=$nb_arg_to_pass\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
28 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
29 |
# Name of the file that contains the data we need to extract for this script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
30 |
my $build_bom_zip_file_to_extract="build_BOM\.zip"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
31 |
my $build_logs_zip_file_to_extract="build_logs\.zip"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
32 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
33 |
# Name of the file we need to work on to extract the data necessary for the Release Notes from build_BOM.zip |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
34 |
my $name_of_file_to_compare="build-info\.xml"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
35 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
36 |
# File used to extract path and component name for a package from build_logs.zip |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
37 |
my $pckg_extraction_data_file_name = "PkgComponentAnalysisSummary\.csv"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
38 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
39 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
40 |
# When using the script as part of the build system, we don't have access to the zip files yet, therefore we need to have a look for the file directly |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
41 |
# This is working only when using pdkloc2 only. In any other cases we are not bothered!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
42 |
my $bom_dir="BOM"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
43 |
my $analysis_dir="analysis"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
44 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
45 |
# Pattern used to search for PDKs |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
46 |
my $pdk_start_pattern="PDK_"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
47 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
48 |
# Pattern used to extract info from the xml file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
49 |
my $starting_pattern_for_xml_extraction="<name>Sources</name>"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
50 |
my $ending_pattern_for_xml_extraction="</project>"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
51 |
# Pattern to extract data from the line in the file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
52 |
# Branch type. If not a branch type, we are not interested |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
53 |
my $branch_type_extraction_pattern="(MCL|FCL)"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
54 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
55 |
my $mcl_cste="MCL"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
56 |
my $fcl_cste="FCL"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
57 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
58 |
# package name |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
59 |
#/imgeditor/#:86a88f39b644</baseline> |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
60 |
# # is used to define the changeset number for mercurial. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
61 |
# Therefore if we have a look what is before "/#", we should always find the package name!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
62 |
my $package_extraction_pattern = "([^/]+)/?#"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
63 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
64 |
# When that "boolean value is set to 1 or true, then the line we read in the file can be search for the information we want to extract |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
65 |
# If $starting_pattern_for_xml_extraction true, then set extraction_from_xml_is_allowed to true/1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
66 |
# If $ending_pattern_for_xml_extraction false, then reset extraction_from_xml_is_allowed to false/0 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
67 |
# $ending_pattern_for_xml_extraction is called several times in the program, but this is not a problem as we don't set it to false/0 and therefore do nothing! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
68 |
my $extraction_from_xml_is_allowed=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
69 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
70 |
# Temporary location used to do the work |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
71 |
my $working_drive="c:"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
72 |
my $working_directory="temp"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
73 |
my $working_sub_directory="fcl_extraction"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
74 |
my $working_pdk1_directory="pdk1"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
75 |
my $working_pdk2_directory="pdk2"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
76 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
77 |
# Name of the file that we are creating to hold the information necessary for the Release Notes |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
78 |
my $name_of_file_to_publish="releaseNotes.wiki.txt"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
79 |
#Location for that file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
80 |
# This values need to be overwritten!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
81 |
my $location_of_file_to_publish="c:\\temp"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
82 |
my $path_to_file_to_publish="$location_of_file_to_publish\\$name_of_file_to_publish"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
83 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
84 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
85 |
# End configuration data for the script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
86 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
87 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
88 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
89 |
# Get parameters passed to the script. Save only the 2 first parameters as we need only 2 parameters for the script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
90 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
91 |
my $nb_arg_passed = scalar(@ARGV); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
92 |
print "nb_arg_passed=$nb_arg_passed\n"; # Find out the number of arguement passed |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
93 |
print "@ARGV\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
94 |
# Needs to be done here, otherwise lost if try to recover them later on. Why? |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
95 |
my $arg1_passed = $ARGV[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
96 |
my $arg2_passed = $ARGV[1]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
97 |
print "arg1_passed= $arg1_passed \t arg2_passed=$arg2_passed\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
98 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
99 |
# if enter help as unique argument, then we will launch the help becaue we only pass one argument. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
100 |
if ($nb_arg_passed != $nb_arg_to_pass) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
101 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
102 |
helpme(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
103 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
104 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
105 |
# Modules necessary to run this script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
106 |
use Getopt::Long; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
107 |
use strict; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
108 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
109 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
110 |
# Arguments / Data used for the script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
111 |
my $pdknb1 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
112 |
my $pdknb2 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
113 |
my $pdkloc1 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
114 |
my $pdkloc2 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
115 |
my $pdkname1 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
116 |
my $pdkname2 = ''; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
117 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
118 |
my $help = 0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
119 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
120 |
GetOptions(( |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
121 |
'pdknb1=s' => \$pdknb1, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
122 |
'pdknb2=s' => \$pdknb2, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
123 |
'pdkname1=s' => \$pdkname1, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
124 |
'pdkname2=s' => \$pdkname2, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
125 |
'pdkloc1=s' => \$pdkloc1, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
126 |
'pdkloc2=s' => \$pdkloc2, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
127 |
'help!' => \$help # Not working |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
128 |
)); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
129 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
130 |
print "\pdknb1=$pdknb1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
131 |
print "\pdknb2=$pdknb2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
132 |
print "\pdkname1=$pdkname1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
133 |
print "\pdkname2=$pdkname2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
134 |
print "\pdkloc1=$pdkloc1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
135 |
print "\pdkloc2=$pdkloc2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
136 |
print "\help=$help\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
137 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
138 |
my $count_arg=0; # Caculate the number of arguments we need for the script to work and that we know are correct (help doesn't count) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
139 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
140 |
# First PDK to check |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
141 |
my $pdk_path1=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
142 |
my $pdk_complete_name1=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
143 |
my $pdk_complete_path1=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
144 |
my $pdk_path1_now_in_use=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
145 |
my $pdk_values_to_search1=""; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
146 |
my $pdk_path1_exist=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
147 |
my $pdk_zip1_exit=0; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
148 |
my $pdk1_correct_name_to_use=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
149 |
my $loc1_contains_the_zip_file_we_need=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
150 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
151 |
# Second PDK to check |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
152 |
my $pdk_path2=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
153 |
my $pdk_complete_name2=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
154 |
my $pdk_complete_path2=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
155 |
my $pdk_path2_now_in_use=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
156 |
my $pdk_values_to_search2=""; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
157 |
my $pdk_path2_exist=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
158 |
my $pdk_zip2_exist=0; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
159 |
my $pdk2_correct_name_to_use=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
160 |
my $loc2_contains_the_zip_file_we_need=0; # Used to indicate that we have found the build_BOM.zip file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
161 |
my $loc2_contains_the_xml_csv_files_we_need=0; # Used to indicate that we have found the build-info.xml and PkgComponentAnalysisSummary.csv |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
162 |
my $nb_of_xml_csv_files_we_need=2; # Used to define the number of files we need to have a look at when we are not looking for zip files. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
163 |
my $nb_of_zip_files_we_need=2; # Used to define the number of files we need to have a look at when we are looking for zip files. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
164 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
165 |
# Default directory management |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
166 |
my @directories_list_default_location=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
167 |
my $nb_dir_in_default_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
168 |
my @pdk_dir_list_in_default_location=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
169 |
my $nb_pdks_in_default_loc=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
170 |
my @pdks_with_valid_zip_in_default_loc=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
171 |
my $nb_pdks_with_valid_zip_in_default_loc=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
172 |
my @find_pdk_for_corresponding_nb1=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
173 |
my $nb_of_pdk_for_corresponding_nb1=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
174 |
my @find_pdk_for_corresponding_nb2=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
175 |
my $nb_of_pdk_for_corresponding_nb2=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
176 |
my @find_pdk_for_corresponding_name1=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
177 |
my $nb_of_pdk_for_corresponding_name1=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
178 |
my @find_pdk_for_corresponding_name2=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
179 |
my $nb_of_pdk_for_corresponding_name2=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
180 |
my @read_files_in_loc=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
181 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
182 |
# Data / statistics to be displayed in the release notes |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
183 |
# We consider that pdk1 is the old version and pdk2 is the new version. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
184 |
# Note that for the moment, the scripts is not able to make sure that the old version of the pdk is set as pdk1 and the new version of the pdk is set as pdk2!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
185 |
# Can be done for pdknb and pdkname but not for pdkloc as for the moment, no way to find out the pdk version from the build-info.xmL!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
186 |
# Totals |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
187 |
my $total_packages_pdk1=0; # Nb of packages included in the pdk1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
188 |
my $total_packages_pdk2=0; # Nb of packages included in the pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
189 |
my $total_packages_added=0; # Nb of packages added in the pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
190 |
my $total_packages_removed=0; # Nb of packages removed from the pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
191 |
my $total_new_fcl=0; # Nb of packages that are now on fcl in pdk2 (means were mcl in pdk1 and are now fcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
192 |
my $total_no_more_fcl=0; # Nb of packages that are no more on fcl in pdk2 (means were fcl in pdk1 and are now mcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
193 |
my $total_still_fcl=0; # Nb of packages that are still on fcl in pdk2 (means were fcl in pdk1 and are still fcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
194 |
my $total_very_good_mcl=0; # Nb of packages that are very good on mcl in pdk1 and pdk2 (means were on mcl in pdk1 and are still mcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
195 |
# Tables |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
196 |
my @pdk1_sorting_table; # Table for pdk1 that is used to sort out and compare the 2 pdks |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
197 |
my @pdk2_sorting_table; # Table for pdk2 that is used to sort out and compare the 2 pdks |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
198 |
my @packages_added_table; # Table that contains the packages that have been added to pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
199 |
my @packages_removed_table; # Table that contains the packages that have been deleted from pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
200 |
my @new_fcl_table; # Table containing the packages that are now on fcl in pdk2 (means were mcl in pdk1 and are now fcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
201 |
my @no_more_fcl_table; # Table containing the packages that are no more on fcl in pdk2 (means were fcl in pdk1 and are now mcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
202 |
my @still_fcl_table; # Table containing the packages that are still on fcl in pdk2 (means were fcl in pdk1 and are still fcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
203 |
my @very_good_mcl_table; # Table containing the packages that are very good on mcl in pdk1 and pdk2 (means were on mcl in pdk1 and are still mcl in pdk2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
204 |
my %pckg_path_name_array; # Table containing the path for each packages |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
205 |
my %pckg_name_array; # Table containing the real meaning name for each packages, not the name of the package in the directory structure |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
206 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
207 |
# Check that we have only 2 values for the PDKs. If not 2, then not good! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
208 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
209 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
210 |
# Script code start here! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
211 |
if($pdknb1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
212 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
213 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
214 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
215 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
216 |
$pdk_path1 = $default_pdk_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
217 |
$pdk_complete_name1=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
218 |
$pdk_complete_path1=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
219 |
$pdk_path1_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
220 |
$pdk_values_to_search1=$pdknb1; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
221 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
222 |
if($pdknb2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
223 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
224 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
225 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
226 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
227 |
$pdk_path2 = $default_pdk_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
228 |
$pdk_complete_name2=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
229 |
$pdk_complete_path2=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
230 |
$pdk_path2_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
231 |
$pdk_values_to_search2=$pdknb2; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
232 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
233 |
if($pdkname1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
234 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
235 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
236 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
237 |
if(!$pdk_path1_now_in_use) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
238 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
239 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
240 |
$pdk_path1 = $default_pdk_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
241 |
$pdk_complete_path1=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
242 |
$pdk_path1_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
243 |
$pdk_values_to_search1=$pdkname1; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
244 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
245 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
246 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
247 |
print "You are a bad boy!!!!, you can't enter 2 parameters ending with the same number like pdknb1 and pdkname1! Start again with the right parameters!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
248 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
249 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
250 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
251 |
if($pdkname2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
252 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
253 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
254 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
255 |
if(!$pdk_path2_now_in_use) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
256 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
257 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
258 |
$pdk_path2 = $default_pdk_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
259 |
$pdk_complete_path2=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
260 |
$pdk_path2_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
261 |
$pdk_values_to_search2=$pdkname2; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
262 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
263 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
264 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
265 |
print "You are a bad boy!!!!, you can't enter 2 parameters ending with the same number like pdknb2 and pdkname2! Start again with the right parameters!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
266 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
267 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
268 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
269 |
if($pdkloc1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
270 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
271 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
272 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
273 |
if(!$pdk_path1_now_in_use) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
274 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
275 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
276 |
$pdk_path1 = $pdkloc1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
277 |
$pdk_path1_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
278 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
279 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
280 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
281 |
print "You are a bad boy!!!!, you can't enter 2 parameters ending with the same number like pdknb1 and pdkloc1! Start again with the right parameters!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
282 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
283 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
284 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
285 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
286 |
if($pdkloc2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
287 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
288 |
$count_arg++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
289 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
290 |
if(!$pdk_path2_now_in_use) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
291 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
292 |
# Get data for first pdk used for the comparison |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
293 |
$pdk_path2 = $pdkloc2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
294 |
$pdk_path2_now_in_use=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
295 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
296 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
297 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
298 |
print "You are a bad boy!!!!, you can't enter 2 parameters ending with the same number like pdknb2 and pdkloc2! Start again with the right parameters!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
299 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
300 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
301 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
302 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
303 |
print "count_arg=$count_arg\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
304 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
305 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
306 |
# If no parameters entered or help selected, display help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
307 |
if ($count_arg != $nb_arg_to_pass) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
308 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
309 |
#$help = 1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
310 |
helpme(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
311 |
print"\nThe script accepts $nb_arg_to_pass parameters only!\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
312 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
313 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
314 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
315 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
316 |
# If we reach this point, this means that we have the right numbers of arguments passed to the script. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
317 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
318 |
print "\nWe are on the right path!!!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
319 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
320 |
print "pdk_path1=$pdk_path1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
321 |
print "pdk_complete_name1=$pdk_complete_name1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
322 |
print "pdk_complete_path1=$pdk_complete_path1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
323 |
print "pdk_values_to_search1=$pdk_values_to_search1\n"; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
324 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
325 |
print "pdk_path2=$pdk_path2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
326 |
print "pdk_complete_name2=$pdk_complete_name2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
327 |
print "pdk_complete_path2=$pdk_complete_path2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
328 |
print "pdk_values_to_search2=$pdk_values_to_search2\n"; # Not necessary |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
329 |
print "\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
330 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
331 |
# Get directory listing of all directories in the default location $default_pdk_loc |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
332 |
extract_dir_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
333 |
extract_pdk_in_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
334 |
extract_pdk_with_valid_zip_in_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
335 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
336 |
# Compose path if necessary. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
337 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
338 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
339 |
my $find_val=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
340 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
341 |
if ($pdk_complete_path1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
342 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
343 |
if ($pdk_complete_name1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
344 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
345 |
print "We have the PDK number, we need to define if possible the PDK name and therefore the path to the PDK\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
346 |
# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
347 |
foreach $find_val (@pdks_with_valid_zip_in_default_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
348 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
349 |
#print $find_val, "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
350 |
if($find_val =~ /$pdknb1/i) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
351 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
352 |
$find_pdk_for_corresponding_nb1[$nb_of_pdk_for_corresponding_nb1++]=$find_val; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
353 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
354 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
355 |
print "Table find_pdk_for_corresponding_nb1 is:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
356 |
display_array_one_line_at_the_time(@find_pdk_for_corresponding_nb1); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
357 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
358 |
if($nb_of_pdk_for_corresponding_nb1==1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
359 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
360 |
print "There is only $nb_of_pdk_for_corresponding_nb1 PDK with the name corresponding to the PDK number given, we can keep going!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
361 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
362 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
363 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
364 |
print "There is $nb_of_pdk_for_corresponding_nb1 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
365 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
366 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
367 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
368 |
#extract PDK name if only one |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
369 |
$pdk1_correct_name_to_use = $find_pdk_for_corresponding_nb1[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
370 |
$pdk_path1 .= $find_pdk_for_corresponding_nb1[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
371 |
print "pdknb1 = $pdknb1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
372 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
373 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
374 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
375 |
print "We have the PDK Name therefore we can define the path to the PDK\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
376 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
377 |
# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
378 |
foreach $find_val (@pdks_with_valid_zip_in_default_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
379 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
380 |
#print $find_val, "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
381 |
if($find_val =~ /$pdkname1/i) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
382 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
383 |
$find_pdk_for_corresponding_name1[$nb_of_pdk_for_corresponding_name1++]=$find_val; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
384 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
385 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
386 |
print "Table find_pdk_for_corresponding_name1 is: \n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
387 |
display_array_one_line_at_the_time(@find_pdk_for_corresponding_name1); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
388 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
389 |
if($nb_of_pdk_for_corresponding_name1==1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
390 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
391 |
print "There is only $nb_of_pdk_for_corresponding_name1 PDK with the name corresponding to the PDK name given, we can keep going!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
392 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
393 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
394 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
395 |
print "There is $nb_of_pdk_for_corresponding_name1 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
396 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
397 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
398 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
399 |
#extract PDK name if only one |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
400 |
$pdk1_correct_name_to_use = $find_pdk_for_corresponding_name1[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
401 |
$pdk_path1 .= @find_pdk_for_corresponding_name1[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
402 |
print "pdkname1 = $pdkname1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
403 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
404 |
print "The PDK used is: $pdk1_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
405 |
print "pdk_path1 = $pdk_path1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
406 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
407 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
408 |
$find_val=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
409 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
410 |
if ($pdk_complete_path2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
411 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
412 |
if ($pdk_complete_name2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
413 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
414 |
print "We have the PDK number, we need to define if possible the PDK name and therefore the path to the PDK\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
415 |
# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
416 |
foreach $find_val (@pdks_with_valid_zip_in_default_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
417 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
418 |
#print $find_val, "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
419 |
if($find_val =~ /$pdknb2/i) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
420 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
421 |
$find_pdk_for_corresponding_nb2[$nb_of_pdk_for_corresponding_nb2++]=$find_val; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
422 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
423 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
424 |
print "Table find_pdk_for_corresponding_nb is:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
425 |
display_array_one_line_at_the_time(@find_pdk_for_corresponding_nb2); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
426 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
427 |
if($nb_of_pdk_for_corresponding_nb2==1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
428 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
429 |
print "There is only $nb_of_pdk_for_corresponding_nb2 PDK with the name corresponding to the PDK number given, we can keep going!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
430 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
431 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
432 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
433 |
print "There is $nb_of_pdk_for_corresponding_nb2 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
434 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
435 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
436 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
437 |
#extract PDK name if only one |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
438 |
$pdk2_correct_name_to_use = $find_pdk_for_corresponding_nb2[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
439 |
$pdk_path2 .= $find_pdk_for_corresponding_nb2[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
440 |
print "pdknb2 = $pdknb2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
441 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
442 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
443 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
444 |
print "We have the PDK Name therefore we can define the path to the PDK\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
445 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
446 |
# Have a look in the default directory if there is a PDK with that number. If none or more than one with the same id, returns the list of PDKs with that same number |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
447 |
foreach $find_val (@pdks_with_valid_zip_in_default_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
448 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
449 |
#print $find_val, "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
450 |
if($find_val =~ /$pdkname2/i) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
451 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
452 |
$find_pdk_for_corresponding_name2[$nb_of_pdk_for_corresponding_name2++]=$find_val; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
453 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
454 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
455 |
print "Table find_pdk_for_corresponding_name2 is:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
456 |
display_array_one_line_at_the_time(@find_pdk_for_corresponding_name2); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
457 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
458 |
if($nb_of_pdk_for_corresponding_name2==1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
459 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
460 |
print "There is only $nb_of_pdk_for_corresponding_name2 PDK with the name corresponding to the PDK name given, we can keep going!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
461 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
462 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
463 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
464 |
print "There is $nb_of_pdk_for_corresponding_name2 PDKs with the same name, please select one in the list above and run the perl script again with the right PDK name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
465 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
466 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
467 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
468 |
#extract PDK name if only one |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
469 |
$pdk2_correct_name_to_use = $find_pdk_for_corresponding_name2[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
470 |
$pdk_path2 .= @find_pdk_for_corresponding_name2[0]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
471 |
print "pdkname2 = $pdkname2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
472 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
473 |
print "The PDK used is: $pdk2_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
474 |
print "pdk_path2 = $pdk_path2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
475 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
476 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
477 |
# Find out if the locations are correct or not. We just need to make sure that the location contains the build_BOM.zip, if it's the case, then bingo! If not, exit the program. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
478 |
my $loc_var; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
479 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
480 |
if($pdkloc1) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
481 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
482 |
# Get the list of file in the location choosen. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
483 |
opendir(LOC1_DIR, $pdkloc1); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
484 |
@read_files_in_loc = readdir(LOC1_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
485 |
close(LOC1_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
486 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
487 |
#print "List of files in the directory: @read_files_in_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
488 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
489 |
foreach $loc_var (@read_files_in_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
490 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
491 |
if($loc_var =~ /$build_bom_zip_file_to_extract$/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
492 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
493 |
print "We found the file: $loc_var\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
494 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
495 |
$pdk1_correct_name_to_use = "PDK1"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
496 |
$pdk_path1 = $pdkloc1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
497 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
498 |
print "The PDK used is: $pdk1_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
499 |
print "pdk_path1 = $pdk_path1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
500 |
$loc1_contains_the_zip_file_we_need=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
501 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
502 |
# As we have found the file, we can probably break! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
503 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
504 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
505 |
if(!$loc1_contains_the_zip_file_we_need) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
506 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
507 |
print "We can't find the file $build_bom_zip_file_to_extract in the location $pdkloc2 and therefore we can't go any further!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
508 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
509 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
510 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
511 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
512 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
513 |
if($pdkloc2) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
514 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
515 |
# Have a look at the zip files in the location choosen. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
516 |
opendir(LOC2_DIR, $pdkloc2); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
517 |
@read_files_in_loc = readdir(LOC2_DIR); # Need to have a look at the sub directories too!!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
518 |
close(LOC2_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
519 |
print "List of files in the directory: @read_files_in_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
520 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
521 |
foreach $loc_var (@read_files_in_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
522 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
523 |
# Have a look for build_bom.zip and build_logs.zip |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
524 |
if( ($loc_var =~ /$build_bom_zip_file_to_extract$/) || ($loc_var =~ /$build_logs_zip_file_to_extract$/) ) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
525 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
526 |
print "We found the file: $loc_var\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
527 |
$loc2_contains_the_zip_file_we_need++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
528 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
529 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
530 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
531 |
if(!$loc2_contains_the_zip_file_we_need) # If we have the zip file, no need to have a look for the csv and xml files! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
532 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
533 |
my $local_var_path; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
534 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
535 |
print "We are checking for xml file\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
536 |
$local_var_path = "$pdkloc2\\$bom_dir"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
537 |
print "local_var_path = $local_var_path\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
538 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
539 |
opendir(LOCBOM_DIR, $local_var_path); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
540 |
@read_files_in_loc = readdir(LOCBOM_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
541 |
close(LOCBOM_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
542 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
543 |
print "List of files in the directory: @read_files_in_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
544 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
545 |
foreach $loc_var (@read_files_in_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
546 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
547 |
if($loc_var =~ /$name_of_file_to_compare$/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
548 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
549 |
print "We are in the case of the build and instead of looking for zip files, we need to have a look for $name_of_file_to_compare\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
550 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
551 |
print "We found the file: $loc_var\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
552 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
553 |
$loc2_contains_the_xml_csv_files_we_need++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
554 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
555 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
556 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
557 |
print "We are checking for csv file\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
558 |
$local_var_path = "$pdkloc2\\$analysis_dir"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
559 |
print "local_var_path = $local_var_path\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
560 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
561 |
opendir(LOCANALYSIS_DIR, $local_var_path); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
562 |
@read_files_in_loc = readdir(LOCANALYSIS_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
563 |
close(LOCANALYSIS_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
564 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
565 |
print "List of files in the directory: @read_files_in_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
566 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
567 |
foreach $loc_var (@read_files_in_loc) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
568 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
569 |
if($loc_var =~ /$pckg_extraction_data_file_name$/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
570 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
571 |
print "We are in the case of the build and instead of looking for zip files, we need to have a look for $pckg_extraction_data_file_name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
572 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
573 |
print "We found the file: $loc_var\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
574 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
575 |
$loc2_contains_the_xml_csv_files_we_need++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
576 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
577 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
578 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
579 |
if(($loc2_contains_the_zip_file_we_need==$nb_of_zip_files_we_need) || ($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need)) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
580 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
581 |
$pdk2_correct_name_to_use = "PDK2"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
582 |
$pdk_path2 = $pdkloc2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
583 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
584 |
print "The PDK used is: $pdk2_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
585 |
print "pdk_path2 = $pdk_path2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
586 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
587 |
if($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
588 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
589 |
$location_of_file_to_publish=$pdkloc2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
590 |
$path_to_file_to_publish="$location_of_file_to_publish\\$name_of_file_to_publish"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
591 |
print "location_of_file_to_publish=$location_of_file_to_publish\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
592 |
print "path_to_file_to_publish=$path_to_file_to_publish\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
593 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
594 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
595 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
596 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
597 |
if($loc2_contains_the_xml_csv_files_we_need<=$nb_of_xml_csv_files_we_need) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
598 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
599 |
print "We can't find the files $name_of_file_to_compare and\/or $pckg_extraction_data_file_name in the location $pdkloc2 and therefore we can't go any further!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
600 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
601 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
602 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
603 |
print "We can't find the files $build_bom_zip_file_to_extract in the location $pdkloc2 and therefore we can't go any further!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
604 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
605 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
606 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
607 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
608 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
609 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
610 |
print "If we are here, this means that both $build_bom_zip_file_to_extract have been found and we can start the real work to compare the 2 files to extract what we need!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
611 |
print "This is the value for the path we are looking at for pdk_path1: $pdk_path1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
612 |
print "This is the value for the path we are looking at for pdk_path2: $pdk_path2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
613 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
614 |
# When we are at this point, we know we have 2 build_BOM.zip files that we can compare them!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
615 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
616 |
my $system_cmd = ""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
617 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
618 |
my $working_dir="$working_drive\\$working_directory\\$working_sub_directory"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
619 |
my $working_dir1="$working_drive\\$working_directory\\$working_sub_directory\\$working_pdk1_directory"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
620 |
my $working_dir2="$working_drive\\$working_directory\\$working_sub_directory\\$working_pdk2_directory"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
621 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
622 |
# 1st step is to extract the 2 zip files to allow us to have access to build-info.xml |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
623 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
624 |
# Extract just one file from the zip file using "7z e -r -oOutput_Directory" |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
625 |
#7z e -r build_BOM.zip build-info.xml |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
626 |
# Where 7z is the unzip program |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
627 |
# Where e is for extraction of a file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
628 |
# Where -r is for recursive to make sure we have a look in the subdirectories |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
629 |
# Where -oOutput_Directory is the directory where we want the files to be unzipped |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
630 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
631 |
# Where $working_sub_directory is the directory where we will be carry the work to be done for the script. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
632 |
# Where $working_pdk1_directory is the subdirectory destination for the PDK1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
633 |
# Where $build_bom_zip_file_to_extract is the name of the zip file (in our case: build_BOM.zip) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
634 |
# Where $pdk_path1 is the place where the zip file to unzip is |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
635 |
# where $name_of_file_to_compare is the name of the file we want to extract from the zip file (in our case: build-info.xml) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
636 |
# Example: 7z e -r -oc:\temp\fcl_extraction\pdk1 C:\temp\Task243Test\PDK_1\build_BOM.zip build-info.xml |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
637 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
638 |
# Extract file from 1st PDK |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
639 |
$system_cmd = "7z e -r -o$working_dir1 $pdk_path1\\$build_bom_zip_file_to_extract $name_of_file_to_compare"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
640 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
641 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
642 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
643 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
644 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
645 |
# Extract the information contained in PkgComponentAnalysisSummary.csv for path a nd package name used by PDK1. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
646 |
$system_cmd = "7z e -r -o$working_dir1 $pdk_path1\\$build_logs_zip_file_to_extract $pckg_extraction_data_file_name"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
647 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
648 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
649 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
650 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
651 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
652 |
# Extract file from 2nd PDK |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
653 |
if($loc2_contains_the_xml_csv_files_we_need==$nb_of_xml_csv_files_we_need) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
654 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
655 |
my $local_file_path; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
656 |
print "We are copying the files $name_of_file_to_compare and $pckg_extraction_data_file_name from $pdk_path2 to $working_dir2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
657 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
658 |
print "Create directory $working_dir2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
659 |
$system_cmd = "mkdir $working_dir2"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
660 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
661 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
662 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
663 |
print "We are going to copy $name_of_file_to_compare to $working_dir2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
664 |
$local_file_path = "$pdk_path2\\$bom_dir\\$name_of_file_to_compare"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
665 |
$system_cmd = "xcopy $local_file_path $working_dir2 \/F"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
666 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
667 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
668 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
669 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
670 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
671 |
# Extract the information contained in PkgComponentAnalysisSummary.csv for path and package name used by PDK1. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
672 |
print "We are going to copy $pckg_extraction_data_file_name to $working_dir2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
673 |
$local_file_path = "$pdk_path2\\$analysis_dir\\$pckg_extraction_data_file_name"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
674 |
$system_cmd = "xcopy $local_file_path $working_dir2 \/F"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
675 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
676 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
677 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
678 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
679 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
680 |
print "We are looking for zip files, then we extract them\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
681 |
$system_cmd = "7z e -r -o$working_dir2 $pdk_path2\\$build_bom_zip_file_to_extract $name_of_file_to_compare"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
682 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
683 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
684 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
685 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
686 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
687 |
# Extract the information contained in PkgComponentAnalysisSummary.csv for path and package name used by PDK1. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
688 |
$system_cmd = "7z e -r -o$working_dir2 $pdk_path2\\$build_logs_zip_file_to_extract $pckg_extraction_data_file_name"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
689 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
690 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
691 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
692 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
693 |
# 2nd step is to extract the information we need from the 2 files build-info.xml |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
694 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
695 |
# Create 2 hash arrays that will contain the name of the package as key and the value associated as MCL or FCL |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
696 |
my %build_info_xml1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
697 |
my %build_info_xml2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
698 |
my @sorting_build_info_xml1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
699 |
my @sorting_build_info_xml2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
700 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
701 |
#my @display_hash_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
702 |
my $key; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
703 |
# Define the path for the files to work on |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
704 |
my $path_to_pdk1_file_to_work_on="$working_dir1\\$name_of_file_to_compare"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
705 |
my $path_to_pdk2_file_to_work_on="$working_dir2\\$name_of_file_to_compare"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
706 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
707 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
708 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
709 |
my $count_packages=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
710 |
my @not_sorted_table; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
711 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
712 |
# Keep only what we need and keep it safe somewhere. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
713 |
# pdk1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
714 |
%build_info_xml1 = extract_packages_and_branch_type_from_file($path_to_pdk1_file_to_work_on); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
715 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
716 |
print "%build_info_xml1:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
717 |
# Define the number of packages for pdk1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
718 |
$total_packages_pdk1 = keys %build_info_xml1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
719 |
print "\nThere is $total_packages_pdk1 packages for $pdk1_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
720 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
721 |
# 3rd a) step is to sort out the 2 files / table |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
722 |
# Sort out the tables to facilitate the checking of the different packages |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
723 |
@not_sorted_table = keys %build_info_xml1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
724 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
725 |
#print "\nnot_sorted_table:\n @not_sorted_table\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
726 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
727 |
# ascendant alphabetical sort |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
728 |
@pdk1_sorting_table = sort { lc($a) cmp lc($b) } @not_sorted_table; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
729 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
730 |
#print "\npdk1_sorting_table :\n @pdk1_sorting_table\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
731 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
732 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
733 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
734 |
# pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
735 |
%build_info_xml2 = extract_packages_and_branch_type_from_file($path_to_pdk2_file_to_work_on); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
736 |
print "%build_info_xml2:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
737 |
# Define the number of packages for pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
738 |
$total_packages_pdk2 = keys %build_info_xml2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
739 |
print "\nThere is $total_packages_pdk2 packages for $pdk2_correct_name_to_use\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
740 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
741 |
# 3rd b) step is to sort out the 2 files / table |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
742 |
# Sort out the tables to facilitate the checking of the different packages |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
743 |
@not_sorted_table = keys %build_info_xml2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
744 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
745 |
#print "\nnot_sorted_table:\n @not_sorted_table\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
746 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
747 |
# ascendant alphabetical sort |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
748 |
@pdk2_sorting_table = sort { lc($a) cmp lc($b) } @not_sorted_table; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
749 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
750 |
#print "\npdk2_sorting_table :\n @pdk2_sorting_table\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
751 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
752 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
753 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
754 |
# 4th step is to compare both data and export it to a file or something similar that is good for media wiki. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
755 |
# Compare both files to find out the difference between each packages FCL, MCL, added or deleted packages |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
756 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
757 |
my $tab_counter1=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
758 |
my $tab_counter2=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
759 |
my $compare_2_tables; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
760 |
my $value_package_pdk1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
761 |
my $value_package_pdk2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
762 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
763 |
while (($tab_counter1 < $total_packages_pdk1) && ($tab_counter2 < $total_packages_pdk2)) # or should it be || |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
764 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
765 |
#print "tab_counter1=$tab_counter1, total_packages_pdk1=$total_packages_pdk1\ntab_counter2=$tab_counter2, total_packages_pdk2=$total_packages_pdk2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
766 |
#print "packages in pdk1 is $pdk1_sorting_table[$tab_counter1] and in pdk2 is $pdk2_sorting_table[$tab_counter2]\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
767 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
768 |
# $a cmp $b |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
769 |
# if $a > $b value returned is 1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
770 |
# if $a = $b value returned is 0 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
771 |
# if $a < $b value returned is -1 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
772 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
773 |
$compare_2_tables = ( $pdk1_sorting_table[$tab_counter1] cmp $pdk2_sorting_table[$tab_counter2] ); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
774 |
#print "compare_2_tables=$compare_2_tables\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
775 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
776 |
if(!$compare_2_tables) # Compare if the the packages in the tables(index) are the same or not, if $compare_2_tables=0, then equal |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
777 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
778 |
#print "the package is the same in pdk1_sorting_table and pdk2_sorting_table\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
779 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
780 |
$value_package_pdk1 = $build_info_xml1{$pdk1_sorting_table[$tab_counter1]}; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
781 |
$value_package_pdk2 = $build_info_xml2{$pdk2_sorting_table[$tab_counter2]}; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
782 |
#print "value_package_pdk1=$value_package_pdk1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
783 |
#print "value_package_pdk2=$value_package_pdk2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
784 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
785 |
if(($value_package_pdk1 eq $mcl_cste) && ($value_package_pdk2 eq $fcl_cste)) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
786 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
787 |
#print "the package was MCL and is now FCL - NEW\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
788 |
$new_fcl_table[$total_new_fcl++] = $pdk1_sorting_table[$tab_counter1]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
789 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
790 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
791 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
792 |
if(($value_package_pdk1 eq $fcl_cste) && ($value_package_pdk2 eq $mcl_cste)) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
793 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
794 |
#print "the package was FCL and is now MCL - NO MORE\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
795 |
$no_more_fcl_table[$total_no_more_fcl++] = $pdk1_sorting_table[$tab_counter1]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
796 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
797 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
798 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
799 |
if(($value_package_pdk1 eq $fcl_cste) && ($value_package_pdk2 eq $fcl_cste)) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
800 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
801 |
#print "the package was FCL and is still FCL - STILL\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
802 |
$still_fcl_table[$total_still_fcl++] = $pdk1_sorting_table[$tab_counter1]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
803 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
804 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
805 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
806 |
#print "the package was MCL and is still MCL - VERY GOOD\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
807 |
$very_good_mcl_table[$total_very_good_mcl++] = $pdk1_sorting_table[$tab_counter1]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
808 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
809 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
810 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
811 |
$tab_counter1++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
812 |
$tab_counter2++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
813 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
814 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
815 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
816 |
# The values are not the same, therefore it must be an added or deleted package |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
817 |
if($compare_2_tables<0) # If $compare_2_tables=-1, then pdk1 is smaller than pdk2, which means that it has been deleted from pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
818 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
819 |
#print "the package $pdk1_sorting_table[$tab_counter1] has been deleted from pdk2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
820 |
$packages_removed_table[$total_packages_removed++]=$pdk1_sorting_table[$tab_counter1++]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
821 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
822 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
823 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
824 |
# If $compare_2_tables=1, then pdk1 is bigger than pdk2, which means that it has been added to pdk2 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
825 |
#print "the package $pdk2_sorting_table[$tab_counter2] has been added to pdk2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
826 |
$packages_added_table[$total_packages_added++]=$pdk2_sorting_table[$tab_counter2++]; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
827 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
828 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
829 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
830 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
831 |
# Build list of files path and name based on csv file generated by the build system (analysis part) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
832 |
extract_package_detail("$working_dir2\\$pckg_extraction_data_file_name"); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
833 |
extract_package_detail("$working_dir1\\$pckg_extraction_data_file_name"); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
834 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
835 |
print "\nPrint all the values related to our calculations\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
836 |
print "total_packages_pdk1=$total_packages_pdk1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
837 |
print "total_packages_pdk2=$total_packages_pdk2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
838 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
839 |
print "total_packages_added=$total_packages_added\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
840 |
print "packages_added_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
841 |
#display_array_one_line_at_the_time(@packages_added_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
842 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
843 |
print "total_packages_removed=$total_packages_removed\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
844 |
print "packages_removed_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
845 |
#display_array_one_line_at_the_time(@packages_removed_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
846 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
847 |
print "total_new_fcl=$total_new_fcl\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
848 |
print "new_fcl_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
849 |
#display_array_one_line_at_the_time(@new_fcl_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
850 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
851 |
print "total_no_more_fcl=$total_no_more_fcl\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
852 |
print "no_more_fcl_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
853 |
#display_array_one_line_at_the_time(@no_more_fcl_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
854 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
855 |
print "total_still_fcl=$total_still_fcl\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
856 |
print "still_fcl_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
857 |
#display_array_one_line_at_the_time(@still_fcl_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
858 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
859 |
print "total_very_good_mcl=$total_very_good_mcl\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
860 |
print "very_good_mcl_table=\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
861 |
#display_array_one_line_at_the_time(@very_good_mcl_table); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
862 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
863 |
# Checking that the packages have been assigned properly. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
864 |
# !!!! Need to verify the formula. Not sure that is correct!!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
865 |
print "Verification for the total packages between the 2 pdks\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
866 |
print "Formula used is: total_packages_pdk2 = total_packages_pdk1 + total_packages_added - total_packages_removed\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
867 |
print "$total_packages_pdk2 = $total_packages_pdk1 + $total_packages_added - $total_packages_removed\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
868 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
869 |
print "Formula used is: total_packages_pdk1 = total_very_good_mcl + total_new_fcl + total_no_more_fcl + total_still_fcl= total\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
870 |
print "$total_packages_pdk1 = $total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl = ", ($total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl), "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
871 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
872 |
print "Formula used is: total_packages_pdk2 = total_very_good_mcl + total_new_fcl + total_no_more_fcl + total_still_fcl + total_packages_added = total\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
873 |
print "$total_packages_pdk2 = $total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl + $total_packages_added - $total_packages_removed= ", ($total_very_good_mcl + $total_new_fcl + $total_no_more_fcl + $total_still_fcl + $total_packages_added - $total_packages_removed), "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
874 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
875 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
876 |
# 5th step is to create a txt file ready to be used for the release notes in a media wiki format. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
877 |
open(FCLCOMPARISONFILE, ">$path_to_file_to_publish"); # !!!!! First time we are accessing the file, therefore create it or replace it, AFTR THAT WE NEED TO APPEND IT ONLY!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
878 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
879 |
my $val; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
880 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
881 |
# Enter the beginning of the section for general information about the pdk and it's predecessor. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
882 |
print FCLCOMPARISONFILE <<"EOT"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
883 |
== Packages == |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
884 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
885 |
This section is about general information on the packages included in the platform. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
886 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
887 |
This is an analysis between '''$pdk2_correct_name_to_use''' and '''$pdk1_correct_name_to_use''' |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
888 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
889 |
EOT |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
890 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
891 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
892 |
print FCLCOMPARISONFILE "Number total of packages in $pdk1_correct_name_to_use is: '''$total_packages_pdk1'''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
893 |
print FCLCOMPARISONFILE "Number total of packages in $pdk2_correct_name_to_use is: '''$total_packages_pdk2'''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
894 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
895 |
print FCLCOMPARISONFILE "=== Packages added ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
896 |
print FCLCOMPARISONFILE "Number total of packages added in $pdk2_correct_name_to_use is: '''$total_packages_added'''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
897 |
foreach $val (@packages_added_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
898 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
899 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
900 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
901 |
print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
902 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
903 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
904 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
905 |
print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
906 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
907 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
908 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
909 |
print FCLCOMPARISONFILE "=== Packages removed ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
910 |
print FCLCOMPARISONFILE "''' Number total of packages removed in $pdk2_correct_name_to_use is: $total_packages_removed'''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
911 |
foreach $val (@packages_removed_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
912 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
913 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
914 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
915 |
print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
916 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
917 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
918 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
919 |
print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
920 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
921 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
922 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
923 |
# Enter the beginning of the section for the FCL |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
924 |
print FCLCOMPARISONFILE <<"EOT"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
925 |
== FCLs == |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
926 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
927 |
'''$pdk2_correct_name_to_use''' was built using the FCL versions of the packages listed below: for each one we list the changes in the FCL which are not in the MCL. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
928 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
929 |
The previous PDK also involved some FCLs, so we indicate which problems are now fixed in the MCL, and which FCLs are new to this build. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
930 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
931 |
Cloning the source from Mercurial is made more awkward by using a mixture of MCLs and FCLs, but we provide a tool to help - see [[How_to_build_the_Platform#Automatic_Mercurial_Clone]] for details. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
932 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
933 |
EOT |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
934 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
935 |
# Packages that were on MCL and that are now on FCL |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
936 |
foreach $val (@new_fcl_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
937 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
938 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
939 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
940 |
print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ($pckg_path_name_array{$val}) -- NEW ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
941 |
# TO DO!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
942 |
# Needs to be recovered from Mercurial. How???? |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
943 |
#[http://developer.symbian.org/bugs/show_bug.cgi?id=156 Bug 156]: Add a missing bld.inf, to renable compilation of the package |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
944 |
#[http://developer.symbian.org/bugs/show_bug.cgi?id=197 Bug 197]: PSAlgorithmInternalCRKeys.h is missing |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
945 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
946 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
947 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
948 |
print FCLCOMPARISONFILE "=== $val ($pckg_path_name_array{$val}) -- NEW ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
949 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
950 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
951 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
952 |
# Packages that were on FCL and that are now on FCL |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
953 |
foreach $val (@still_fcl_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
954 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
955 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
956 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
957 |
print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ($pckg_path_name_array{$val}) ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
958 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
959 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
960 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
961 |
print FCLCOMPARISONFILE "=== $val ($pckg_path_name_array{$val}) ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
962 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
963 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
964 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
965 |
print FCLCOMPARISONFILE "=== FCLs used in $pdk1_correct_name_to_use but not needed in $pdk2_correct_name_to_use ===\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
966 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
967 |
foreach $val (@no_more_fcl_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
968 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
969 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
970 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
971 |
print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
972 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
973 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
974 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
975 |
print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
976 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
977 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
978 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
979 |
# Packages were on MCL and they are still on MCL. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
980 |
foreach $val (@very_good_mcl_table) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
981 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
982 |
#print "Value for package $val is: $pckg_name_array{$val}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
983 |
if($pckg_name_array{$val}) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
984 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
985 |
#print "There is a real name for the package: ($pckg_name_array{$val})\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
986 |
#print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ($pckg_path_name_array{$val}) -- VERY GOOD ===\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
987 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
988 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
989 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
990 |
#print "There is not a real name for the package: ($pckg_name_array{$val})\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
991 |
#print FCLCOMPARISONFILE "=== $val ($pckg_path_name_array{$val}) -- VERY GOOD ===\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
992 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
993 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
994 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
995 |
close(FCLCOMPARISONFILE); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
996 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
997 |
#print "Path for each packages:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
998 |
#display_hash_array_one_line_at_the_time(%pckg_path_name_array); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
999 |
#print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1000 |
#print "Real name for each packages:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1001 |
#display_hash_array_one_line_at_the_time(%pckg_name_array); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1002 |
#print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1003 |
#print "Branch type for each packages:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1004 |
#display_hash_array_one_line_at_the_time(%build_info_xml2); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1005 |
#print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1006 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1007 |
# Used to verify the differences between build_info.xml and PkgComponentAnalysisSummary.csv because not the same number of packages. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1008 |
#print "Packages list from build-info.xml:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1009 |
#my @local_array_key_extraction; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1010 |
#my @local_array_key_extraction_sorted; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1011 |
#@local_array_key_extraction = keys (%build_info_xml2); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1012 |
#@local_array_key_extraction_sorted = sort { lc($a) cmp lc($b) } @local_array_key_extraction; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1013 |
#display_array_one_line_at_the_time(@local_array_key_extraction_sorted); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1014 |
#print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1015 |
#print "Packages list from csv file:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1016 |
#my @local_array_key_extraction; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1017 |
#my @local_array_key_extraction_sorted; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1018 |
#@local_array_key_extraction = keys (%pckg_name_array); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1019 |
#@local_array_key_extraction_sorted = sort { lc($a) cmp lc($b) } @local_array_key_extraction; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1020 |
#display_array_one_line_at_the_time(@local_array_key_extraction_sorted); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1021 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1022 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1023 |
# 6th step is to export that txt file the appropriate location. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1024 |
# That could be the location from where we launched the script! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1025 |
print "\nYou will find the file with all the information you need for the releases note, here: $path_to_file_to_publish\n\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1026 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1027 |
# Cleanup the mess!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1028 |
#pause_script(); # Temporary until script is finished!!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1029 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1030 |
$system_cmd = "rmdir /S /Q $working_dir"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1031 |
print "Exec: $system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1032 |
system($system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1033 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1034 |
## |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1035 |
### End of the program!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1036 |
## |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1037 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1038 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1039 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1040 |
# Functions section!!!!! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1041 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1042 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1043 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1044 |
# If no parameters entered or help selected, display help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1045 |
sub helpme |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1046 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1047 |
print "\nfct: helpme\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1048 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1049 |
print "Generate FCLs details between 2 PDKs to be included as part of the release notes\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1050 |
print "Default location for PDKs is: $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1051 |
print "Usage: perl fcls4releasenotes.pl --input_data1=x --input_data2=y\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1052 |
print "Where input_data1 and input_data2 could be pdknb1 or pdknb2 or pdkloc1 or pdkloc2 or pdkname1 or pdkname2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1053 |
print "Where pdknb is the PDK number, for example 2.0.e\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1054 |
print "Where pdkloc is the root location where your file $build_bom_zip_file_to_extract is. For ex: \\\\bishare\\releases\\PDK_2.0.e\\ or c:\\temp\\myPDK\\\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1055 |
print "Where pdkname is the full name of the PDK, like for ex PDK_candidate_2.0.d_flat\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1056 |
print "\nNotes:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1057 |
print "\tParameter names with 1 at the end (pdknb1, pdkname1, pdkloc1) are set for the oldest PDK to use (PDK1)\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1058 |
print "\tParameter names with 2 at the end (pdknb2, pdkname2, pdkloc2) are set for the newest PDK to use (PDK2)\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1059 |
print "\tIf you try to use for example pdknb2 and pdkname2 or pdkloc1 and pdknb1 the result is not guaranted to be correct!!!! as one will be set as PDK1 and the other as PDK2, but which order????\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1060 |
print "\tThe difference is done as follow PDK2 - PDK1\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1061 |
print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1062 |
print "\nTypical command lines from script location:\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1063 |
print "\t<perl fcls4releasenotes.pl --pdknb1=2.0.e --pdkloc2=c:\\temp\\myPDK\\>\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1064 |
print "\t<perl fcls4releasenotes.pl --pdkname1=PDK_2.0.e --pdknb2=2.0.e>\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1065 |
print "\t<perl fcls4releasenotes.pl --pdknb2=2.0.d --pdknb1=2.0.e>\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1066 |
print "\t<perl fcls4releasenotes.pl help>\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1067 |
#print "\t<perl fcls4releasenotes.pl validpdks>\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1068 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1069 |
list_pdks_at_default_location(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1070 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1071 |
exit(0); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1072 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1073 |
# End section related to help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1074 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1075 |
# Extract list of PDKs that are in the default location. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1076 |
sub list_pdks_at_default_location |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1077 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1078 |
print "\nfct: list_pdks_at_default_location\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1079 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1080 |
# Do a dir of the default location |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1081 |
print "List of directories in the default location $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1082 |
extract_dir_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1083 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1084 |
# Extract all the PDKs that have the pattern PDK_ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1085 |
print "All available PDKS in the default location $default_pdk_loc that have the pattern $pdk_start_pattern\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1086 |
extract_pdk_in_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1087 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1088 |
# Extract all the PDKs that have the file build_BOM.zip |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1089 |
print "All available PDKS in the default location $default_pdk_loc that contains the zip file $build_bom_zip_file_to_extract\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1090 |
extract_pdk_with_valid_zip_in_default_loc(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1091 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1092 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1093 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1094 |
# Generates list of directories in the default location used for the storage of the PDKs |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1095 |
sub extract_dir_default_loc |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1096 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1097 |
print "\nfct: extract_dir_default_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1098 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1099 |
# Get the list of directories in the default location |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1100 |
opendir(DEFAULT_DIR, $default_pdk_loc); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1101 |
@directories_list_default_location = readdir(DEFAULT_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1102 |
close(DEFAULT_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1103 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1104 |
$nb_dir_in_default_loc = scalar(@directories_list_default_location); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1105 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1106 |
print "nb_dir_in_default_loc=$nb_dir_in_default_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1107 |
#display_array_one_line_at_the_time(@directories_list_default_location); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1108 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1109 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1110 |
# Establish the list of directories that are an actual PDK |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1111 |
sub extract_pdk_in_default_loc |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1112 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1113 |
print "\nfct: extract_pdk_in_default_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1114 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1115 |
my $var; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1116 |
$nb_pdks_in_default_loc=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1117 |
print "pdk_start_pattern = $pdk_start_pattern\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1118 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1119 |
foreach $var (@directories_list_default_location) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1120 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1121 |
if($var =~ /^$pdk_start_pattern+/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1122 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1123 |
#print "$var\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1124 |
$pdk_dir_list_in_default_location[$nb_pdks_in_default_loc++] = $var; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1125 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1126 |
#else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1127 |
#{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1128 |
#print "Not a PDK!!!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1129 |
#} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1130 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1131 |
print "There is $nb_pdks_in_default_loc PDKs in the default location $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1132 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1133 |
print "This is the list of PDKs that are in the default location $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1134 |
#display_array_one_line_at_the_time(@pdk_dir_list_in_default_location); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1135 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1136 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1137 |
# Establish the list of PDK directories with a valid zip file to do the test |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1138 |
sub extract_pdk_with_valid_zip_in_default_loc |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1139 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1140 |
print "\nfct: extract_pdk_with_valid_zip_in_default_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1141 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1142 |
my $var1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1143 |
my $var2; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1144 |
my $path_to_find_zip = ""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1145 |
my @read_pdk_directory=(); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1146 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1147 |
$nb_pdks_with_valid_zip_in_default_loc=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1148 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1149 |
print "build_bom_zip_file_to_extract=$build_bom_zip_file_to_extract\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1150 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1151 |
foreach $var1 (@pdk_dir_list_in_default_location) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1152 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1153 |
$path_to_find_zip=$default_pdk_loc; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1154 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1155 |
$path_to_find_zip .= $var1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1156 |
#print "path_to_find_zip=$path_to_find_zip\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1157 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1158 |
# Get the list of directories in the default location |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1159 |
opendir(PDK_DIR, $path_to_find_zip); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1160 |
@read_pdk_directory = readdir(PDK_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1161 |
close(PDK_DIR); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1162 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1163 |
foreach $var2 (@read_pdk_directory) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1164 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1165 |
if($var2 =~ /$build_bom_zip_file_to_extract$/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1166 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1167 |
#print "$var2\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1168 |
$pdks_with_valid_zip_in_default_loc[$nb_pdks_with_valid_zip_in_default_loc++] = $var1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1169 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1170 |
#else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1171 |
#{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1172 |
#print "Doesn't contain $build_bom_zip_file_to_extract!!!!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1173 |
#} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1174 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1175 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1176 |
print "There is $nb_pdks_with_valid_zip_in_default_loc PDKs with a valid $build_bom_zip_file_to_extract zip in the default location $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1177 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1178 |
print "This is the list of PDKs that have a zip file called $build_bom_zip_file_to_extract in the default location $default_pdk_loc\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1179 |
display_array_one_line_at_the_time(@pdks_with_valid_zip_in_default_loc); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1180 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1181 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1182 |
# Function created to pause the script to allow analysis and debug of the script. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1183 |
# Will require the user to press enter to carry on the execution of the script. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1184 |
sub pause_script |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1185 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1186 |
print "\nfct: pause_script\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1187 |
my $local_system_cmd = "pause"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1188 |
print "Exec: $local_system_cmd\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1189 |
system($local_system_cmd); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1190 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1191 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1192 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1193 |
# This function is used to extract the name of the package and the type |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1194 |
sub extract_packages_and_branch_type_from_file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1195 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1196 |
# 1 Parameters passed, the path to the file to be viewed |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1197 |
my ($file_to_work_on) = @_; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1198 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1199 |
print "\nfct: extract_packages_and_branch_type_from_file\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1200 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1201 |
print "$file_to_work_on\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1202 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1203 |
my %local_hash_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1204 |
#my @local_hash_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1205 |
my $local_key; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1206 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1207 |
my $package=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1208 |
my $type_of_branch=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1209 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1210 |
#@hash_array_to_display = %local_hash_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1211 |
#print "%local_hash_array before starting = @hash_array_to_display\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1212 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1213 |
# Open file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1214 |
open(FILETOWORKON , $file_to_work_on); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1215 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1216 |
# Extract data from file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1217 |
my @local_array = <FILETOWORKON>; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1218 |
#print "local_array= @local_array\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1219 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1220 |
# Close file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1221 |
close(FILETOWORKON); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1222 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1223 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1224 |
my $extracted_line; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1225 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1226 |
# Go line by line |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1227 |
foreach $extracted_line (@local_array) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1228 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1229 |
#print "\nextracted_line is: $extracted_line"; # no need to add \\n as it's part of the line displayed. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1230 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1231 |
if ($extracted_line =~ /$starting_pattern_for_xml_extraction/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1232 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1233 |
#print "The line extracted is our starting pattern $starting_pattern_for_xml_extraction\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1234 |
$extraction_from_xml_is_allowed=1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1235 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1236 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1237 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1238 |
if ($extracted_line =~ /$ending_pattern_for_xml_extraction/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1239 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1240 |
#print "The line extracted is our ending pattern $ending_pattern_for_xml_extraction\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1241 |
$extraction_from_xml_is_allowed=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1242 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1243 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1244 |
#print "extraction_from_xml_is_allowed=$extraction_from_xml_is_allowed\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1245 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1246 |
if($extraction_from_xml_is_allowed) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1247 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1248 |
#print "We are looking to extract the package and branch type from the line extracted\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1249 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1250 |
# Decode the line |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1251 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1252 |
# Decode the branch type |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1253 |
if($extracted_line =~ /$branch_type_extraction_pattern/) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1254 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1255 |
$type_of_branch=$1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1256 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1257 |
# Decode the package because there is a branch type in the line extracted! |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1258 |
if ($extracted_line =~ m,$package_extraction_pattern,) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1259 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1260 |
$package=$1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1261 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1262 |
#print "package is $package and type_of_branch is $type_of_branch\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1263 |
$local_hash_array{$package}=$type_of_branch; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1264 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1265 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1266 |
else |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1267 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1268 |
#print "The extracted line doesn't contain $look_for_mcl or $look_for_fcl, therefore we need to skip it!\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1269 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1270 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1271 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1272 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1273 |
# Check the contain of the hash array to make sure that we have extracted the data as expected. To check against the actual file. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1274 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1275 |
# Option 1: Display all in one line |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1276 |
#@hash_array_to_display = %local_hash_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1277 |
# Print "%local_hash_array when extraction is finished = @hash_array_to_display\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1278 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1279 |
# Option 2: Print 1 key with 1 value by line |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1280 |
#foreach $local_key (keys(%local_hash_array)) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1281 |
#{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1282 |
# print "$local_key = $local_hash_array{$local_key}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1283 |
#} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1284 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1285 |
# Return hash array containing all the packages and branch type associated |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1286 |
return (%local_hash_array); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1287 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1288 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1289 |
# Function used to extract all the data from the csv file about the different packages (name, path and real name) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1290 |
sub extract_package_detail |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1291 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1292 |
# 1 Parameters passed, the path to the file to be viewed |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1293 |
my ($file_to_work_on) = @_; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1294 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1295 |
print "\nfct: extract_package_detail\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1296 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1297 |
print "$file_to_work_on\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1298 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1299 |
my @local_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1300 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1301 |
# Open file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1302 |
open(FILETOWORKON , $file_to_work_on); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1303 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1304 |
# Extract data from file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1305 |
my @local_array = <FILETOWORKON>; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1306 |
#print "build_bom_local_array= @build_bom_local_array\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1307 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1308 |
# Close file |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1309 |
close(FILETOWORKON); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1310 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1311 |
my $extracted_line; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1312 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1313 |
# Create a table with the path for each package using a hash array |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1314 |
my $pckg_name_extraction_pattern = "^sf\/[\\w]*\/([\\w]*)"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1315 |
my $pckg_path_extraction_pattern = "^(sf[\W\w]*[^,]+),"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1316 |
my $pckg_real_name_extraction_pattern = ",[\\s]+([\\w\\s]*),[\\s]+[\\w\\s]*\$"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1317 |
my $pckg_name=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1318 |
my $pckg_path=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1319 |
my $pckg_real_name=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1320 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1321 |
#Typical lines to decode |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1322 |
#sf/app/helps,SFL,sf/app/helps/symhelp/helpmodel/group/bld.inf,OK, Help Apps, Help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1323 |
#sf/app/java,SFL,sf/app/java/java_plat/group/bld.inf,OK, , |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1324 |
#sf/app/helps,SFL,sf/app/helps/symhelp/helpmodel/group/bld.inf,OK, Help Apps, Help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1325 |
#sf/app/helps, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1326 |
#SFL, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1327 |
#sf/app/helps/symhelp/helpmodel/group/bld.inf, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1328 |
#OK, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1329 |
# Help Apps, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1330 |
# Help |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1331 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1332 |
#sf/app/java,SFL,sf/app/java/java_plat/group/bld.inf,OK, , |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1333 |
#sf/app/java, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1334 |
#SFL, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1335 |
#sf/app/java/java_plat/group/bld.inf, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1336 |
#OK, |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1337 |
# , |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1338 |
# |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1339 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1340 |
# Go line by line |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1341 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1342 |
foreach $extracted_line (@local_array) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1343 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1344 |
#print "\nextracted_line is: $extracted_line"; # no need to add \\n as it's part of the line displayed. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1345 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1346 |
if($extracted_line =~ m;$pckg_name_extraction_pattern;) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1347 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1348 |
$pckg_name = $1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1349 |
#print "Pckg name is: $pckg_name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1350 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1351 |
#print "Is $pckg_name already exist in the hash array?: $pckg_path_name_array{$pckg_name}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1352 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1353 |
if(!$pckg_path_name_array{$pckg_name}) # Check if package is not already in the table to avoid duplicates |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1354 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1355 |
#print "$pckg_name is not in the hash array, we need to add it\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1356 |
if($extracted_line =~ m;$pckg_path_extraction_pattern;) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1357 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1358 |
$pckg_path = $1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1359 |
#print "Pckg path is: $pckg_path\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1360 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1361 |
if($extracted_line =~ m;$pckg_real_name_extraction_pattern;) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1362 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1363 |
$pckg_real_name = $1; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1364 |
#print "Pckg real name is: $pckg_real_name\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1365 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1366 |
# fill the tables |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1367 |
$pckg_path_name_array{$pckg_name} = $pckg_path; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1368 |
$pckg_name_array{$pckg_name} = $pckg_real_name; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1369 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1370 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1371 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1372 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1373 |
my $local_value=""; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1374 |
my @local_array_sorted; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1375 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1376 |
@local_array=keys (%pckg_path_name_array); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1377 |
@local_array_sorted = sort { lc($a) cmp lc($b) } @local_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1378 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1379 |
# print "\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1380 |
# my $counter_to_remove=0; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1381 |
# foreach $local_value (@local_array_sorted) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1382 |
# { |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1383 |
#print "$counter_to_remove: The path for package $local_value is: $pckg_path_name_array{$local_value}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1384 |
#print "$counter_to_remove:The real name for package $local_value is: $pckg_name_array{$local_value}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1385 |
#print "$counter_to_remove: local_array_sorted[$counter_to_remove]:$local_array_sorted[$counter_to_remove]\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1386 |
#print "$local_array_sorted[$counter_to_remove]\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1387 |
#$counter_to_remove++; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1388 |
# } |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1389 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1390 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1391 |
# Function used to display one line at the time for an array |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1392 |
sub display_array_one_line_at_the_time |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1393 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1394 |
my (@table_to_display_one_line_at_the_time) = @_; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1395 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1396 |
#print "\nfct: display_array_one_line_at_the_time\n"; # Not displayed because you could think that is part of the table. As well it's easier to copy the name of the table and the contain wihtout the need to remove something. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1397 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1398 |
my $line_to_display; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1399 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1400 |
foreach $line_to_display (@table_to_display_one_line_at_the_time) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1401 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1402 |
print "$line_to_display\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1403 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1404 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1405 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1406 |
# Function used to display one line at the time for an hash array |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1407 |
sub display_hash_array_one_line_at_the_time |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1408 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1409 |
my (%hash_array_to_display_one_line_at_the_time) = @_; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1410 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1411 |
my @local_keys_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1412 |
my @local_keys_array_sorted; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1413 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1414 |
#print "\nfct: display_hash_array_one_line_at_the_time\n"; # Not displayed because you could think that is part of the table. As well it's easier to copy the name of the table and the contain wihtout the need to remove something. |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1415 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1416 |
my $line_to_display; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1417 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1418 |
@local_keys_array = keys (%hash_array_to_display_one_line_at_the_time); |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1419 |
@local_keys_array_sorted = sort { lc($a) cmp lc($b) } @local_keys_array; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1420 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1421 |
foreach $line_to_display (@local_keys_array_sorted) |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1422 |
{ |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1423 |
print "$line_to_display = $hash_array_to_display_one_line_at_the_time{$line_to_display}\n"; |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1424 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1425 |
} |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1426 |
|
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1427 |
# PDKs with build_bom.zip file in the default PDKs location 14-09-2009 |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1428 |
#Z:\Releases\PDK_2.0.e |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1429 |
#Z:\Releases\PDK_candidate_2.0.d_flat |
ce6215be051a
Update release automation scripts
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1430 |
#Z:\Releases\PDK_candidate_2.0e_FCL_27.78 |