50 my $starting_pattern_for_xml_extraction="<name>Sources</name>"; |
50 my $starting_pattern_for_xml_extraction="<name>Sources</name>"; |
51 my $ending_pattern_for_xml_extraction="</project>"; |
51 my $ending_pattern_for_xml_extraction="</project>"; |
52 # Pattern to extract data from the line in the file |
52 # Pattern to extract data from the line in the file |
53 # Branch type. If not a branch type, we are not interested |
53 # Branch type. If not a branch type, we are not interested |
54 my $branch_type_extraction_pattern="(MCL|FCL)"; |
54 my $branch_type_extraction_pattern="(MCL|FCL)"; |
|
55 my $license_type_extraction_pattern="(SFL|OSS)"; |
55 |
56 |
56 my $mcl_cste="MCL"; |
57 my $mcl_cste="MCL"; |
57 my $fcl_cste="FCL"; |
58 my $fcl_cste="FCL"; |
58 |
59 |
59 # package name |
60 # package name |
204 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) |
205 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) |
205 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) |
206 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) |
206 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) |
207 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) |
207 my %pckg_path_name_array; # Table containing the path for each packages |
208 my %pckg_path_name_array; # Table containing the path for each packages |
208 my %pckg_name_array; # Table containing the real meaning name for each packages, not the name of the package in the directory structure |
209 my %pckg_name_array; # Table containing the real meaning name for each packages, not the name of the package in the directory structure |
|
210 my %pckg_license_array; # Table containing the type of license (oss or sfl) for each packages |
|
211 my %pckg_branch_array; # Table containing the type of branch (MCL or FCL) for each packages |
209 |
212 |
210 if($pdknb1) |
213 if($pdknb1) |
211 { |
214 { |
212 $pdk_path1 = $default_pdk_loc; |
215 $pdk_path1 = $default_pdk_loc; |
213 $pdk_complete_name1=1; |
216 $pdk_complete_name1=1; |
651 #print "the package was MCL and is still MCL - VERY GOOD\n"; |
654 #print "the package was MCL and is still MCL - VERY GOOD\n"; |
652 $very_good_mcl_table[$total_very_good_mcl++] = $pdk1_sorting_table[$tab_counter1]; |
655 $very_good_mcl_table[$total_very_good_mcl++] = $pdk1_sorting_table[$tab_counter1]; |
653 } |
656 } |
654 } |
657 } |
655 } |
658 } |
|
659 # Build up the list of branch for each package to be used to regenerate links at the end |
|
660 $pckg_branch_array{$pdk2_sorting_table[$tab_counter2]} = $value_package_pdk2; # copy the value from 2 script parameters at it should be the newest version |
|
661 #print "package & branch: $pdk2_sorting_table[$tab_counter2] is $value_package_pdk2\n"; |
|
662 |
656 $tab_counter1++; |
663 $tab_counter1++; |
657 $tab_counter2++; |
664 $tab_counter2++; |
658 } |
665 } |
659 else |
666 else |
660 { |
667 { |
661 # The values are not the same, therefore it must be an added or deleted package |
668 # The values are not the same, therefore it must be an added or deleted package |
662 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 |
669 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 |
663 { |
670 { |
|
671 # Build up the list of branch for each package to be used to regenerate links at the end |
|
672 $pckg_branch_array{$pdk1_sorting_table[$tab_counter1]} = $value_package_pdk1; # copy the value from 2 script parameters at it should be the newest version |
|
673 |
664 $packages_removed_table[$total_packages_removed++]=$pdk1_sorting_table[$tab_counter1++]; |
674 $packages_removed_table[$total_packages_removed++]=$pdk1_sorting_table[$tab_counter1++]; |
665 } |
675 } |
666 else |
676 else |
667 { |
677 { |
|
678 # Build up the list of branch for each package to be used to regenerate links at the end |
|
679 $pckg_branch_array{$pdk2_sorting_table[$tab_counter2]} = $value_package_pdk2; # copy the value from 2 script parameters at it should be the newest version |
|
680 |
668 # If $compare_2_tables=1, then pdk1 is bigger than pdk2, which means that it has been added to pdk2 |
681 # If $compare_2_tables=1, then pdk1 is bigger than pdk2, which means that it has been added to pdk2 |
669 $packages_added_table[$total_packages_added++]=$pdk2_sorting_table[$tab_counter2++]; |
682 $packages_added_table[$total_packages_added++]=$pdk2_sorting_table[$tab_counter2++]; |
670 } |
683 } |
671 } |
684 } |
672 } |
685 } |
684 print "total_new_fcl=$total_new_fcl\n"; |
697 print "total_new_fcl=$total_new_fcl\n"; |
685 print "total_no_more_fcl=$total_no_more_fcl\n"; |
698 print "total_no_more_fcl=$total_no_more_fcl\n"; |
686 print "total_still_fcl=$total_still_fcl\n"; |
699 print "total_still_fcl=$total_still_fcl\n"; |
687 print "total_very_good_mcl=$total_very_good_mcl\n"; |
700 print "total_very_good_mcl=$total_very_good_mcl\n"; |
688 print "\n"; |
701 print "\n"; |
|
702 print "Licence type for a package=\n"; |
|
703 #display_hash_array_one_line_at_the_time(%pckg_license_array); |
|
704 print "\n"; |
|
705 print "Branch type for a package=\n"; |
|
706 #display_hash_array_one_line_at_the_time(%pckg_branch_array); |
|
707 print "\n"; |
689 # Checking that the packages have been assigned properly. |
708 # Checking that the packages have been assigned properly. |
690 # !!!! Need to verify the formula. Not sure that is correct!!!!!! |
709 # !!!! Need to verify the formula. Not sure that is correct!!!!!! |
691 print "Verification for the total packages between the 2 pdks\n"; |
710 print "Verification for the total packages between the 2 pdks\n"; |
692 print "Formula used is: total_packages_pdk2 = total_packages_pdk1 + total_packages_added - total_packages_removed\n"; |
711 print "Formula used is: total_packages_pdk2 = total_packages_pdk1 + total_packages_added - total_packages_removed\n"; |
693 print "$total_packages_pdk2 = $total_packages_pdk1 + $total_packages_added - $total_packages_removed\n"; |
712 print "$total_packages_pdk2 = $total_packages_pdk1 + $total_packages_added - $total_packages_removed\n"; |
723 print FCLCOMPARISONFILE "Number total of packages added in $pdk2_correct_name_to_use is: '''$total_packages_added'''\n\n"; |
742 print FCLCOMPARISONFILE "Number total of packages added in $pdk2_correct_name_to_use is: '''$total_packages_added'''\n\n"; |
724 foreach $val (@packages_added_table) |
743 foreach $val (@packages_added_table) |
725 { |
744 { |
726 if($pckg_name_array{$val}) |
745 if($pckg_name_array{$val}) |
727 { |
746 { |
728 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
747 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
729 } |
748 } |
730 else |
749 else |
731 { |
750 { |
732 print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
751 print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
733 } |
752 } |
734 } |
753 } |
735 |
754 |
736 print FCLCOMPARISONFILE "=== Packages removed ===\n\n"; |
755 print FCLCOMPARISONFILE "=== Packages removed ===\n\n"; |
737 print FCLCOMPARISONFILE "Number total of packages removed in $pdk2_correct_name_to_use is: '''$total_packages_removed'''\n\n"; |
756 print FCLCOMPARISONFILE "Number total of packages removed in $pdk2_correct_name_to_use is: '''$total_packages_removed'''\n\n"; |
738 foreach $val (@packages_removed_table) |
757 foreach $val (@packages_removed_table) |
739 { |
758 { |
740 if($pckg_name_array{$val}) |
759 if($pckg_name_array{$val}) |
741 { |
760 { |
742 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
761 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
743 } |
762 } |
744 else |
763 else |
745 { |
764 { |
746 print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
765 print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
747 } |
766 } |
748 } |
767 } |
749 |
768 |
750 # Enter the beginning of the section for the FCL |
769 # Enter the beginning of the section for the FCL |
751 print FCLCOMPARISONFILE <<"EOT"; |
770 print FCLCOMPARISONFILE <<"EOT"; |
753 |
772 |
754 '''$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. |
773 '''$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. |
755 |
774 |
756 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. |
775 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. |
757 |
776 |
758 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. |
777 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]] for details. |
759 |
778 |
760 EOT |
779 EOT |
761 |
780 |
762 # Packages that were on MCL and that are now on FCL |
781 # Packages that were on MCL and that are now on FCL |
763 foreach $val (@new_fcl_table) |
782 foreach $val (@new_fcl_table) |
764 { |
783 { |
765 if($pckg_name_array{$val}) |
784 if($pckg_name_array{$val}) |
766 { |
785 { |
767 print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ($pckg_path_name_array{$val}) -- NEW ===\n\n"; |
786 print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) -- NEW ===\n\n"; |
768 # TO DO!!!! |
787 # TO DO!!!! |
769 # Needs to be recovered from Mercurial. How???? |
788 # Needs to be recovered from Mercurial. How???? |
770 #[http://developer.symbian.org/bugs/show_bug.cgi?id=156 Bug 156]: Add a missing bld.inf, to renable compilation of the package |
789 #[http://developer.symbian.org/bugs/show_bug.cgi?id=156 Bug 156]: Add a missing bld.inf, to renable compilation of the package |
771 #[http://developer.symbian.org/bugs/show_bug.cgi?id=197 Bug 197]: PSAlgorithmInternalCRKeys.h is missing |
790 #[http://developer.symbian.org/bugs/show_bug.cgi?id=197 Bug 197]: PSAlgorithmInternalCRKeys.h is missing |
772 } |
791 } |
773 else |
792 else |
774 { |
793 { |
775 print FCLCOMPARISONFILE "=== $val ($pckg_path_name_array{$val}) -- NEW ===\n\n"; |
794 print FCLCOMPARISONFILE "=== $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) -- NEW ===\n\n"; |
776 } |
795 } |
777 } |
796 } |
778 |
797 |
779 # Packages that were on FCL and that are now on FCL |
798 # Packages that were on FCL and that are now on FCL |
780 foreach $val (@still_fcl_table) |
799 foreach $val (@still_fcl_table) |
781 { |
800 { |
782 if($pckg_name_array{$val}) |
801 if($pckg_name_array{$val}) |
783 { |
802 { |
784 print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ($pckg_path_name_array{$val}) ===\n\n"; |
803 print FCLCOMPARISONFILE "=== $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) ===\n\n"; |
785 } |
804 } |
786 else |
805 else |
787 { |
806 { |
788 print FCLCOMPARISONFILE "=== $val ($pckg_path_name_array{$val}) ===\n\n"; |
807 print FCLCOMPARISONFILE "=== $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) ===\n\n"; |
789 } |
808 } |
790 } |
809 } |
791 |
810 |
792 print FCLCOMPARISONFILE "=== FCLs used in $pdk1_correct_name_to_use but not needed in $pdk2_correct_name_to_use ===\n\n"; |
811 print FCLCOMPARISONFILE "=== FCLs used in $pdk1_correct_name_to_use but not needed in $pdk2_correct_name_to_use ===\n\n"; |
793 |
812 |
794 foreach $val (@no_more_fcl_table) |
813 foreach $val (@no_more_fcl_table) |
795 { |
814 { |
796 if($pckg_name_array{$val}) |
815 if($pckg_name_array{$val}) |
797 { |
816 { |
798 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ($pckg_path_name_array{$val}) '''\n\n"; |
817 print FCLCOMPARISONFILE "''' $pckg_name_array{$val} ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
799 } |
818 } |
800 else |
819 else |
801 { |
820 { |
802 print FCLCOMPARISONFILE "''' $val ($pckg_path_name_array{$val}) '''\n\n"; |
821 print FCLCOMPARISONFILE "''' $val ([https://developer.symbian.org/$pckg_license_array{$val}/$pckg_branch_array{$val}/$pckg_path_name_array{$val}/graph $pckg_path_name_array{$val}]) '''\n\n"; |
803 } |
822 } |
804 } |
823 } |
805 |
824 |
806 close(FCLCOMPARISONFILE); |
825 close(FCLCOMPARISONFILE); |
807 |
826 |
1049 |
1068 |
1050 if(!$pckg_path_name_array{$pckg_name}) # Check if package is not already in the table to avoid duplicates |
1069 if(!$pckg_path_name_array{$pckg_name}) # Check if package is not already in the table to avoid duplicates |
1051 { |
1070 { |
1052 my $pckg_path="''nonstandard path''"; |
1071 my $pckg_path="''nonstandard path''"; |
1053 my $pckg_real_name=""; |
1072 my $pckg_real_name=""; |
|
1073 my $pckg_license_type=""; |
1054 |
1074 |
1055 if($extracted_line =~ m;$pckg_path_extraction_pattern;) |
1075 if($extracted_line =~ m;$pckg_path_extraction_pattern;) |
1056 { |
1076 { |
1057 $pckg_path = $1; |
1077 $pckg_path = $1; |
1058 } |
1078 } |
1059 if($extracted_line =~ m;$pckg_real_name_extraction_pattern;) |
1079 if($extracted_line =~ m;$pckg_real_name_extraction_pattern;) |
1060 { |
1080 { |
1061 $pckg_real_name = $1; |
1081 $pckg_real_name = $1; |
1062 } |
1082 } |
|
1083 if($extracted_line =~ m;$license_type_extraction_pattern;) # Extract data about the type of license OSS or SFL |
|
1084 { |
|
1085 $pckg_license_type = $1; |
|
1086 } |
1063 # fill the tables |
1087 # fill the tables |
1064 $pckg_path_name_array{$pckg_name} = $pckg_path; |
1088 $pckg_path_name_array{$pckg_name} = $pckg_path; |
1065 $pckg_name_array{$pckg_name} = $pckg_real_name; |
1089 $pckg_name_array{$pckg_name} = $pckg_real_name; |
|
1090 $pckg_license_type =~ tr/A-Z/a-z/; # Convert from uppercase to lowercase otherwise don't work to access the website. |
|
1091 $pckg_license_array{$pckg_name} = $pckg_license_type; |
1066 } |
1092 } |
1067 } |
1093 } |
1068 } |
1094 } |
1069 |
1095 |
1070 my @local_array_sorted; |
1096 my @local_array_sorted; |