Author: af
Date: Fri Nov 29 15:49:27 2013
New Revision: 1546588

URL: http://svn.apache.org/r1546588
Log:
123729: More cleanup in make_installer.pl

Modified:
    openoffice/trunk/main/solenv/bin/make_installer.pl
    openoffice/trunk/main/solenv/bin/modules/installer/converter.pm
    openoffice/trunk/main/solenv/bin/modules/installer/pathanalyzer.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm
    openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm
    openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm
    openoffice/trunk/main/solenv/bin/modules/installer/worker.pm

Modified: openoffice/trunk/main/solenv/bin/make_installer.pl
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/make_installer.pl?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/make_installer.pl (original)
+++ openoffice/trunk/main/solenv/bin/make_installer.pl Fri Nov 29 15:49:27 2013
@@ -1929,7 +1929,9 @@ for (;1;last) 
 
                if ( $installer::globals::patch_user_dir )
                {
-                       
installer::scriptitems::replace_userdir_variable($profileitemsinproductlanguageresolvedarrayref);
+                       installer::scriptitems::replace_userdir_variable(
+                $profileitemsinproductlanguageresolvedarrayref,
+                $allvariableshashref);
                }
 
                
installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($profilesinproductlanguageresolvedarrayref,
 $dirsinproductarrayref);

Modified: openoffice/trunk/main/solenv/bin/modules/installer/converter.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/converter.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/converter.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/converter.pm Fri Nov 29 
15:49:27 2013
@@ -305,18 +305,17 @@ sub make_path_conform
 
 sub copy_collector
 {
-       my ( $oldcollector ) = @_;
+       my ($oldcollector) = @_;
 
        my @newcollector = ();
 
-       for ( my $i = 0; $i <= $#{$oldcollector}; $i++ )
+       foreach my $oldhash (@$oldcollector)
        {
                my %newhash = ();
-               my $key;
        
-               foreach $key (keys %{${$oldcollector}[$i]})
+               while (my ($key, $value) = each %$oldhash)
                {
-                       $newhash{$key} = ${$oldcollector}[$i]->{$key};
+                       $newhash{$key} = $value;
                }
                                
                push(@newcollector, \%newhash);

Modified: openoffice/trunk/main/solenv/bin/modules/installer/pathanalyzer.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/pathanalyzer.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/pathanalyzer.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/pathanalyzer.pm Fri Nov 
29 15:49:27 2013
@@ -46,6 +46,14 @@ sub get_path_from_fullqualifiedname
        }       
 }
 
+
+
+
+=head2
+
+    Despite its name, this function seems just to return the basename of the 
given filename.
+    
+=cut
 sub make_absolute_filename_to_relative_filename
 {
        my ($longfilenameref) = @_;

Modified: openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/scppatchsoname.pm Fri 
Nov 29 15:49:27 2013
@@ -100,31 +100,10 @@ sub replace_productname_in_file
 
        change_length_of_string(\$unicode_productname, $replacestring);
 
-       my $found1 = $onefile =~ s/$replacestring/$unicode_productname/sg;
-
-       my $found2 = 0;
-
-       if ( $styles =~ /\bPATCH_SO_NAME_Z\b/ )
-       {
-               # searching for "z" 
-
-               $onestring = "z" . chr(0);
-               $replacestring = "";
-               for ( my $i = 1; $i <= 80; $i++ ) { $replacestring .= 
$onestring; }
-
-               my $productname2 = $variableshashref->{'PRODUCTNAME'} . " " . 
$variableshashref->{'PRODUCTVERSION'};
-               if ( exists($onefilehash->{'FileDescriptionZ'}) ) { 
$productname2 = $onefilehash->{'FileDescriptionZ'}; }
-               my $unicode_productname2 = convert_to_unicode($productname2);
-
-               change_length_of_string_with_letter(\$unicode_productname2, 
$replacestring, $onestring);
-
-               $found2 = $onefile =~ s/$replacestring/$unicode_productname2/sg;
-       }
+       my $found = $onefile =~ s/$replacestring/$unicode_productname/sg;
 
        installer::files::save_binary_file($onefile, $destpath);
 
-       my $found = $found1 + $found2;
-       
        return $found;
 }
 

Modified: openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm Fri Nov 
29 15:49:27 2013
@@ -29,29 +29,35 @@ use installer::logger;
 use installer::pathanalyzer;
 use installer::systemactions;
 
+use strict;
+
 
########################################################################################
 # Replacing all zip list variables in setup script and files with flag 
scpzip_replace
 
########################################################################################
 
-sub replace_all_ziplistvariables_in_file
+sub replace_all_ziplistvariables_in_file ($$)
 {
-       my ( $fileref, $variableshashref ) = @_;
+       my ($lines, $variables) = @_;
 
-       for ( my $i = 0; $i <= $#{$fileref}; $i++ )
+    my $count = scalar @$lines;
+       for (my $lineno=0; $lineno<$count; ++$lineno)
        {
-               my $line = ${$fileref}[$i];
-
-               if ( $line =~ /^.*\$\{\w+\}.*$/ )       # only occurence of 
${abc}
-               {                       
-                       my $key;
-
-                       foreach $key (keys %{$variableshashref})
-                       {
-                               my $value = $variableshashref->{$key};
-                               $key = '${' . $key . '}';
-                               $line =~ s/\Q$key\E/$value/g;                   
-                               ${$fileref}[$i] = $line;
+        my $line = $lines->[$lineno];
+               if ($line =~ /\$\{/)  # early rejection of lines that don't 
need replacements
+               {
+            while (my ($key,$value) = each %$variables)
+                       {
+                               my $pattern = '${' . $key . '}';
+                               my $replacement_count = ($line =~ 
s/\Q$pattern\E/$value/g);
+                if ($key eq "PRODUCTADDON" && $replacement_count>0)
+                {
+                    $installer::logger::Lang->printf(
+                        "replaced PRODUCTADDON %d times in line %d\n",
+                        $replacement_count,
+                        $lineno);
+                }
                        }
+            $lines->[$lineno] = $line;
                }
        }
 }
@@ -63,7 +69,7 @@ sub replace_all_ziplistvariables_in_file
 
 sub replace_all_ziplistvariables_in_rtffile ($$)
 {
-       my ($lines, $variablesref) = @_;
+       my ($lines, $variables) = @_;
 
     my $line_count = scalar @$lines;
        for (my $i=0; $i<=$line_count; ++$i)

Modified: openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/scriptitems.pm Fri Nov 
29 15:49:27 2013
@@ -37,6 +37,8 @@ use File::Spec;
 use SvnRevision;
 use ExtensionsLst;
 
+use strict;
+
 ################################################################
 # Resolving the GID for the directories defined in setup script
 ################################################################
@@ -45,8 +47,6 @@ sub resolve_all_directory_names
 {
        my ($directoryarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::resolve_all_directory_names
 : $#{$directoryarrayref}"); }
-
        # After this procedure the hash shall contain the complete language 
        # dependent path, not only the language dependent HostName.
 
@@ -160,8 +160,6 @@ sub remove_delete_only_files_from_produc
 {
        my ($productarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_delete_only_files_from_productlists
 : $#{$productarrayref}"); }
-
        my @newitems = ();
 
        for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
@@ -189,8 +187,6 @@ sub remove_notinsuite_files_from_product
 {
        my ($productarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_notinsuite_files_from_productlists
 : $#{$productarrayref}"); }
-
        my @newitems = ();
 
        for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
@@ -223,8 +219,6 @@ sub remove_office_start_language_files
 {
        my ($productarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_notinsuite_files_from_productlists
 : $#{$productarrayref}"); }
-
        my @newitems = ();
 
        for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
@@ -257,8 +251,6 @@ sub remove_uninstall_regitems_from_scrip
 {
        my ($registryarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_uninstall_regitems_from_script
 : $#{$registryarrayref}"); }
-
        my @newitems = ();
 
        for ( my $i = 0; $i <= $#{$registryarrayref}; $i++ )
@@ -310,8 +302,6 @@ sub resolving_all_languages_in_productli
 {
        my ($productarrayref, $languagesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::resolving_all_languages_in_productlists
 : $#{$productarrayref} : $#{$languagesarrayref}"); }
-
        my @itemsinalllanguages = ();
 
        my ($key, $value);
@@ -894,8 +884,6 @@ sub changing_name_of_language_dependent_
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::changing_name_of_language_dependent_keys
 : $#{$itemsarrayref}"); }
-
        # Changing key for multilingual items from "Name ( )" to "Name" or 
"HostName ( )" to "HostName"
 
        for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
@@ -962,8 +950,6 @@ sub replace_setup_variables
 {
        my ($itemsarrayref, $languagestringref, $hashref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::replace_setup_variables : 
$#{$itemsarrayref} : $$languagestringref : $hashref->{'PRODUCTNAME'}"); }
-
        my $languagesstring = $$languagestringref;
        $languagesstring =~ s/\_/ /g;   # replacing underscore with whitespace
        # $languagesstring is "01 49" instead of "en-US de"
@@ -1027,19 +1013,24 @@ sub replace_setup_variables
 # the standard destination of user directory defined in scp2 ($SYSUSERCONFIG).
 
################################################################################
 
-sub replace_userdir_variable
+sub replace_userdir_variable ($$)
 {
-       my ($itemsarrayref) = @_;
+       my ($itemsarrayref, $allvariableshashref) = @_;
        
        my $userdir = "";
-       if ( $allvariableshashref->{'LOCALUSERDIR'} ) { $userdir = 
$allvariableshashref->{'LOCALUSERDIR'}; }
-       else { $userdir = $installer::globals::simpledefaultuserdir; } 
+       if ($allvariableshashref->{'LOCALUSERDIR'})
+    {
+        $userdir = $allvariableshashref->{'LOCALUSERDIR'};
+    }
+       else
+    {
+        $userdir = $installer::globals::simpledefaultuserdir;
+    }
        
-       if ( $userdir ne "" )
+       if ($userdir ne "")
        {
-               for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
+               foreach my $oneitem (@$itemsarrayref)
                {
-                       my $oneitem = ${$itemsarrayref}[$i];            
                        $oneitem->{'Value'} =~ s/\$SYSUSERCONFIG/$userdir/;
                }
        }
@@ -1056,8 +1047,6 @@ sub remove_non_existent_languages_in_pro
 {
        my ($itemsarrayref, $languagestringref, $searchkey, $itemtype) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_non_existent_languages_in_productlists
 : $#{$itemsarrayref} : $$languagestringref : $searchkey : $itemtype"); }
-
        # Removing of all non existent files, for instance asian fonts
 
        installer::logger::include_header_into_logfile("Removing for this 
language $$languagestringref:");
@@ -1105,8 +1094,6 @@ sub get_Directoryname_From_Directorygid
 {
        my ($dirsarrayref ,$searchgid, $onelanguage, $oneitemgid) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_Directoryname_From_Directorygid
 : $#{$dirsarrayref} : $searchgid : $onelanguage"); }
-
        my $directoryname = "";
        my $onedirectory;
        my $foundgid = 0;
@@ -1158,8 +1145,6 @@ sub get_Destination_Directory_For_Item_F
 {
        my ($itemarrayref, $dirsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist
 : $#{$itemarrayref} : $#{$dirsarrayref}"); }
-
        for ( my $i = 0; $i <= $#{$itemarrayref}; $i++ )
        {
                my $oneitem = ${$itemarrayref}[$i];
@@ -1221,8 +1206,6 @@ sub get_sourcepath_from_filename_and_inc
 {
        my ($searchfilenameref, $includepatharrayref, $write_logfile) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic
 : $$searchfilenameref : $#{$includepatharrayref} : $write_logfile"); }
-
        my ($onefile, $includepath, $infoline);
 
        my $foundsourcefile = 0;
@@ -1279,8 +1262,6 @@ sub get_sourcepath_from_filename_and_inc
 {
        my ($searchfilenameref, $unused, $write_logfile) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_sourcepath_from_filename_and_includepath
 : $$searchfilenameref : $#{$includepatharrayref} : $write_logfile"); }
-
        my ($onefile, $includepath, $infoline);
 
        my $foundsourcefile = 0;
@@ -1391,8 +1372,6 @@ sub get_Source_Directory_For_Files_From_
 {
        my ($filesarrayref, $includepatharrayref, $dirsref, $item) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist
 : $#{$filesarrayref} : $#{$includepatharrayref} : $item"); }
-
        installer::logger::include_header_into_logfile("$item:");
 
        my $infoline = "";
@@ -1487,8 +1466,6 @@ sub remove_Files_For_Languagepacks
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_Files_For_Languagepacks
 : $#{$filesarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -1523,8 +1500,6 @@ sub remove_Files_Without_Sourcedirectory
 {
        my ($filesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_Files_Without_Sourcedirectory
 : $#{$filesarrayref}"); }
-
        my $infoline;
        
        my $error_occured = 0;
@@ -1635,8 +1610,6 @@ sub add_License_Files_into_Installdir
 {
        my ($filesarrayref, $dirsarrayref, $languagesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::add_License_Files_into_Installdir
 : $#{$filesarrayref} : $#{$languagesarrayref}"); }
-
        my $infoline;
        
        my @newfilesarray = ();
@@ -1908,8 +1881,6 @@ sub remove_scpactions_without_name
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_scpactions_without_name
 : $#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -1944,8 +1915,6 @@ sub change_keys_of_scpactions
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::change_keys_of_scpactions 
: $#{$itemsarrayref}"); }
-
        for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
        {
                my $oneitem = ${$itemsarrayref}[$i];
@@ -1989,8 +1958,6 @@ sub remove_Xpdonly_Items
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_Xpdonly_Items : 
$#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -2027,8 +1994,6 @@ sub remove_Languagepacklibraries_from_In
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_Languagepacklibraries_from_Installset
 : $#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -2065,8 +2030,6 @@ sub remove_patchonlyfiles_from_Installse
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_patchonlyfiles_from_Installset
 : $#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -2103,8 +2066,6 @@ sub remove_tabonlyfiles_from_Installset
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_tabonlyfiles_from_Installset
 : $#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -2141,8 +2102,6 @@ sub remove_installedproductonlyfiles_fro
 {
        my ($itemsarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_installedproductonlyfiles_from_Installset
 : $#{$itemsarrayref}"); }
-
        my $infoline;
        
        my @newitemsarray = ();
@@ -2178,8 +2137,6 @@ sub quoting_illegal_filenames
 {
        my ($filesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::rename_illegal_filenames 
: $#{$filesarrayref}"); }
-       
        # This function has to be removed as soon as possible!
        
        installer::logger::include_header_into_logfile("Renaming illegal 
filenames:");
@@ -2243,8 +2200,6 @@ sub collect_directories_from_filesarray
 {
        my ($filesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::collect_directories_from_filesarray
 : $#{$filesarrayref}"); }
-
        my @alldirectories = ();
        my %alldirectoryhash = ();
 
@@ -2349,12 +2304,10 @@ sub collect_directories_from_filesarray
 # Collecting directories: Part 2
 ##################################
 
-sub collect_directories_with_create_flag_from_directoryarray
+sub collect_directories_with_create_flag_from_directoryarray ($$)
 {
        my ($directoryarrayref, $alldirectoryhash) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::collect_directories_with_create_flag_from_directoryarray
 : $#{$directoryarrayref}"); }
-
        my $alreadyincluded = 0;
        my @alldirectories = ();
 
@@ -2362,7 +2315,7 @@ sub collect_directories_with_create_flag
        {
                my $onedir = ${$directoryarrayref}[$i];
                my $styles = "";
-               $newdirincluded = 0;
+               my $newdirincluded = 0;
                
                if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
        
@@ -2467,19 +2420,17 @@ sub collect_directories_with_create_flag
                push(@alldirectories, $alldirectoryhash->{$destdir});
        }
 
-       return (\@alldirectories, \%alldirectoryhash);  
+       return (\@alldirectories, $alldirectoryhash);   
 }
 
 #################################################
 # Determining the destination file of a link
 #################################################
 
-sub get_destination_file_path_for_links
+sub get_destination_file_path_for_links ($$)
 {
        my ($linksarrayref, $filesarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_destination_file_path_for_links
 : $#{$linksarrayref} : $#{$filesarrayref}"); }
-
        my $infoline;
 
        for ( my $i = 0; $i <= $#{$linksarrayref}; $i++ )
@@ -2521,30 +2472,27 @@ sub get_destination_file_path_for_links
 # Determining the destination link of a link
 #################################################
 
-sub get_destination_link_path_for_links
+sub get_destination_link_path_for_links ($)
 {
        my ($linksarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_destination_link_path_for_links
 : $#{$linksarrayref}"); }
-
        my $infoline;
 
-       for ( my $i = 0; $i <= $#{$linksarrayref}; $i++ )
+       foreach my $onelink (@$linksarrayref)
        {
                my $shortcutid = "";
-               my $onelink = ${$linksarrayref}[$i];
-               if ( $onelink->{'ShortcutID'} ) { $shortcutid = 
$onelink->{'ShortcutID'}; }
+               if ($onelink->{'ShortcutID'})
+        {
+            $shortcutid = $onelink->{'ShortcutID'};
+        }
 
-               if (!( $shortcutid eq "" ))
+               if ($shortcutid ne "")
                {
                        my $foundlink = 0;
 
-                       for ( my $j = 0; $j <= $#{$linksarrayref}; $j++ )
+                       foreach my $destlink (@$linksarrayref)
                        {
-                               my $destlink = ${$linksarrayref}[$j];
-                               $shortcutgid = $destlink->{'gid'};
-                               
-                               if ( $shortcutgid eq $shortcutid )
+                               if ($destlink->{'gid'} eq $shortcutid)
                                {
                                        $foundlink = 1;
                                        $onelink->{'destinationfile'} = 
$destlink->{'destination'};             # making key 'destinationfile'
@@ -2552,7 +2500,7 @@ sub get_destination_link_path_for_links
                                }                               
                        }
                        
-                       if (!($foundlink))
+                       if ( ! $foundlink)
                        {
                 $installer::logger::Lang->printf("Warning: ShortcutID %s for 
Link %s not found!\n",
                     $shortcutid,
@@ -2572,8 +2520,6 @@ sub remove_workstation_only_items
 {
        my ($itemarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::remove_workstation_only_items
 : $#{$itemarrayref}"); }
-       
        my @newitemarray = ();
        
        for ( my $i = 0; $i <= $#{$itemarrayref}; $i++ )
@@ -2602,8 +2548,6 @@ sub resolve_links_with_flag_relative
 {
        my ($linksarrayref) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::resolve_links_with_flag_relative
 : $#{$linksarrayref}"); }
-
        # Before this step is:
        # destination=program/libsalhelperC52.so.3, this will be the name of 
the link
        # destinationfile=program/libsalhelperC52.so.3, this will be the linked 
file or name
@@ -2665,7 +2609,7 @@ sub insert_for_item ($$$)
        $hash->{$item} = $gid_list;
 }
 
-sub build_modulegids_table
+sub build_modulegids_table ($$)
 {
        my ($modulesref, $itemname) = @_;
 
@@ -2673,9 +2617,9 @@ sub build_modulegids_table
 
        # build map of item names to list of respective module gids
        # containing these items
-       for my $onemodule (@{$modulesref})
+       foreach my $onemodule (@{$modulesref})
        {
-               next if ( ! defined $onemodule->{$itemname} );
+               next if ! defined $onemodule->{$itemname};
                # these are the items contained in this module
                # eg. Files = (gid_a_b_c,gid_d_e_f)
                my $module_gids = $onemodule->{$itemname};
@@ -2698,38 +2642,46 @@ sub build_modulegids_table
 # This function is a helper of function "assigning_modules_to_items"
 ########################################################################
 
-sub get_string_of_modulegids_for_itemgid
+sub get_string_of_modulegids_for_itemgid ($$)
 {
-       my ($module_lookup_table, $modulesref, $itemgid, $itemname) = @_;
+       my ($module_lookup_table, $itemgid) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::get_string_of_modulegids_for_itemgid
 : $#{$modulesref} : $itemgid : $itemname"); }
-
-       my $allmodules = "";
        my $haslanguagemodule = 0;
        my %foundmodules = ();
 
        # print STDERR "lookup '" . lc($itemgid) . "'\n";
        my $gid_list = $module_lookup_table->{lc($itemgid)};
 
-       for my $gid (@{$gid_list})
+       foreach my $gid (@{$gid_list})
        {
                $foundmodules{$gid} = 1;
-               $allmodules = $allmodules . "," . $gid;
                # Is this module a language module? This info should be stored 
at the file.
-               if ( exists($installer::globals::alllangmodules{$gid}) ) { 
$haslanguagemodule = 1; }
+               if ( exists($installer::globals::alllangmodules{$gid}) )
+        {
+            $haslanguagemodule = 1;
+        }
        }
        
-       $allmodules =~ s/^\s*\,//;      # removing leading comma
+       my $allmodules = join(",", keys %foundmodules);
 
        # Check: All modules or no module must have flag LANGUAGEMODULE
        if ( $haslanguagemodule )
        {
-               my $isreallylanguagemodule = 
installer::worker::key_in_a_is_also_key_in_b(\%foundmodules, 
\%installer::globals::alllangmodules);
-               if ( ! $isreallylanguagemodule ) { 
installer::exiter::exit_program("ERROR: \"$itemgid\" is assigned to modules 
with flag \"LANGUAGEMODULE\" and also to modules without this flag! Modules: 
$allmodules", "get_string_of_modulegids_for_itemgid");  }
+               my $isreallylanguagemodule = 
installer::worker::key_in_a_is_also_key_in_b(
+            \%foundmodules,
+            \%installer::globals::alllangmodules);
+               if ( ! $isreallylanguagemodule )
+        {
+            installer::exiter::exit_program(
+                sprintf(
+                    "ERROR: \"\" is assigned to modules with flag "
+                    . "\"LANGUAGEMODULE\" and also to modules without this 
flag! Modules: %s",
+                    $itemgid,
+                    $allmodules),
+                "get_string_of_modulegids_for_itemgid");
+        }
        }
 
-       # print STDERR "get_string_for_itemgid ($itemgid, $itemname) => 
$allmodules, $haslanguagemodule\n";
-
        return ($allmodules, $haslanguagemodule);
 }
 
@@ -2742,9 +2694,6 @@ sub assigning_modules_to_items
 {
        my ($modulesref, $itemsref, $itemname) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::assigning_modules_to_items
 : $#{$modulesref} : $#{$itemsref} : $itemname"); }
-       
-       my $infoline = "";
        my $languageassignmenterror = 0;
        my @languageassignmenterrors = ();
 
@@ -2760,34 +2709,48 @@ sub assigning_modules_to_items
                
                if ( $itemgid eq "" ) 
                {
-                       installer::exiter::exit_program("ERROR in item 
collection: No gid for item $oneitem->{'Name'}", "assigning_modules_to_items");
+                       installer::exiter::exit_program(
+                sprintf("ERROR in item collection: No gid for item %s", 
$oneitem->{'Name'}),
+                "assigning_modules_to_items");
                }
 
                # every item can belong to many modules
                                
-               my ($modulegids, $haslanguagemodule) = 
get_string_of_modulegids_for_itemgid($module_lookup_table, $modulesref, 
$itemgid, $itemname);
+               my ($modulegids, $haslanguagemodule) = 
get_string_of_modulegids_for_itemgid(
+            $module_lookup_table,
+            $itemgid);
 
                if ($modulegids eq "")
                {
-                       installer::exiter::exit_program("ERROR in file 
collection: No module found for $itemname $itemgid", 
"assigning_modules_to_items");
+                       installer::exiter::exit_program(
+                sprintf("ERROR in file collection: No module found for %s %s",
+                    $itemname,
+                    $itemgid),
+                "assigning_modules_to_items");
                }
 
                $oneitem->{'modules'} = $modulegids;
                $oneitem->{'haslanguagemodule'} = $haslanguagemodule;
                
                # Important check: "ismultilingual" and "haslanguagemodule" 
must have the same value !
-               if (( $oneitem->{'ismultilingual'} ) && ( ! 
$oneitem->{'haslanguagemodule'} ))
+               if ($oneitem->{'ismultilingual'} && ! 
$oneitem->{'haslanguagemodule'})
                {
-                       $infoline = "Error: \"$oneitem->{'gid'}\" is multi 
lingual, but not in language pack (Assigned module: $modulegids)!\n";
+                       my $infoline = sprintf(
+                "Error: \"%s\" is multi lingual, but not in language pack 
(Assigned module: %s)\n",
+                $oneitem->{'gid'},
+                $modulegids);
             $installer::logger::Global->print($infoline);
-                       push( @languageassignmenterrors, $infoline );
+                       push(@languageassignmenterrors, $infoline);
                        $languageassignmenterror = 1;
                }
-               if (( $oneitem->{'haslanguagemodule'} ) && ( ! 
$oneitem->{'ismultilingual'} ))
+               elsif ($oneitem->{'haslanguagemodule'} && ! 
$oneitem->{'ismultilingual'})
                {
-                       $infoline = "Error: \"$oneitem->{'gid'}\" is in 
language pack, but not multi lingual (Assigned module: $modulegids)!\n";
+                       my $infoline = sprintf(
+                "Error: \"%s\" is in language pack, but not multi lingual 
(Assigned module: %s)\n",
+                $oneitem->{'gid'},
+                $modulegids);
             $installer::logger::Global->print($infoline);
-                       push( @languageassignmenterrors, $infoline );
+                       push(@languageassignmenterrors, $infoline);
                        $languageassignmenterror = 1;
                }
        }
@@ -2808,8 +2771,6 @@ sub add_rootpath_to_directories
 {
        my ($dirsref, $rootpath) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::add_rootpath_to_directories
 : $#{$dirsref} : $rootpath"); }
-
        for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
        {
                my $onedir = ${$dirsref}[$i];
@@ -2839,8 +2800,6 @@ sub add_rootpath_to_files
 {
        my ($filesref, $rootpath) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::add_rootpath_to_files : 
$#{$filesref} : $rootpath"); }
-       
        for ( my $i = 0; $i <= $#{$filesref}; $i++ )
        {
                my $onefile = ${$filesref}[$i];
@@ -2854,8 +2813,6 @@ sub add_rootpath_to_links
 {
        my ($linksref, $rootpath) = @_;
 
-       if ( $installer::globals::debug ) { 
installer::logger::debuginfo("installer::scriptitems::add_rootpath_to_links : 
$#{$linksref} : $rootpath"); }
-       
        for ( my $i = 0; $i <= $#{$linksref}; $i++ )
        {
                my $onelink = ${$linksref}[$i];
@@ -3126,4 +3083,27 @@ sub filter_layerlinks_from_unixlinks
        return \@alllinks;
 }
 
+
+
+
+=head2 print_script_item($item)
+
+    For debugging.
+    Print the contents of the given script item to $installer::logger::Lang.
+    
+=cut
+sub print_script_item ($)
+{
+    my ($item) = @_;
+
+    $installer::logger::Lang->printf("script item %s\n", 
$item->{'uniquename'});
+    foreach my $key (sort keys %$item)
+    {
+        my $value = $item->{$key};
+        $value = "<undef>" unless defined $value;
+        $installer::logger::Lang->printf("    %20s -> %s\n", $key, $value);
+    }
+}
+
+
 1;

Modified: openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/setupscript.pm Fri Nov 
29 15:49:27 2013
@@ -31,6 +31,8 @@ use installer::remover;
 use installer::scriptitems;
 use installer::ziplist;
 
+use strict;
+
 #######################################################
 # Set setup script name, if not defined as parameter
 #######################################################
@@ -74,9 +76,9 @@ sub set_setupscript_name
 # Reading script variables from installation object of script file
 #####################################################################
 
-sub get_all_scriptvariables_from_installation_object
+sub get_all_scriptvariables_from_installation_object ($$)
 {
-       my ($scriptref) = @_;
+       my ($scriptref, $script_filename) = @_;
        
        my @installobjectvariables;
 
@@ -521,13 +523,9 @@ sub replace_preset_properties
        my @presetproperties = ();
        push(@presetproperties, "SOLARISBRANDPACKAGENAME");
        push(@presetproperties, "SYSTEMINTUNIXPACKAGENAME");
-       # push(@presetproperties, "UNIXPACKAGENAME");
-       # push(@presetproperties, "WITHOUTDOTUNIXPACKAGENAME");
-       # push(@presetproperties, "UNIXPRODUCTNAME");
-       # push(@presetproperties, "WITHOUTDOTUNIXPRODUCTNAME");
        
 
-       foreach $property ( @presetproperties )
+       foreach my $property (@presetproperties)
        {
                my $presetproperty = "PRESET" . $property;
                if (( exists($allvariables->{$presetproperty}) ) && ( 
$allvariables->{$presetproperty} ne "" ))

Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/assembly.pm Fri 
Nov 29 15:49:27 2013
@@ -28,6 +28,8 @@ use installer::globals;
 use installer::worker;
 use installer::windows::idtglobal;
 
+use strict;
+
 ##############################################################
 # Returning the first module of a file from the
 # comma separated list of modules.
@@ -224,9 +226,9 @@ sub create_msiassembly_table
 # Returning the name for the table MsiAssemblyName
 
####################################################################################
 
-sub get_msiassemblyname_name
+sub get_msiassemblyname_name ($)
 {
-       ( $number ) = @_;
+       my ($number) = @_;
        
        my $name = "";
        
@@ -315,12 +317,9 @@ sub add_assembly_condition_into_componen
        my $componenttablename = $basedir . $installer::globals::separator . 
"Componen.idt";
        my $componenttable = installer::files::read_file($componenttablename);
        my $changed = 0;
-       my $infoline = "";
 
-       for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ )
+       foreach my $onefile (@$installer::globals::msiassemblyfiles)
        {
-               my $onefile = ${$installer::globals::msiassemblyfiles}[$i];
-               
                my $filecomponent = get_msiassembly_component($onefile);
        
                for ( my $j = 0; $j <= $#{$componenttable}; $j++ )
@@ -342,13 +341,17 @@ sub add_assembly_condition_into_componen
                                        
                                        # $condition = "MsiNetAssemblySupport";
                                        $condition = "DOTNET_SUFFICIENT=1";
-                                       $oneline = $component . "\t" . 
$componentid . "\t" . $directory . "\t" . $attributes . "\t" . $condition . 
"\t" . $keypath . "\n";
+                                       $oneline = join("\t",
+                        $component,
+                        $componentid,
+                        $directory,
+                        $attributes,
+                        $condition,
+                        $keypath) . "\n";
                                        ${$componenttable}[$j] = $oneline;
                                        $changed = 1;
-                                       $infoline = "Changing 
$componenttablename :\n"; 
-                                       
$installer::logger::Lang->print($infoline);
-                                       $infoline = $oneline; 
-                                       
$installer::logger::Lang->print($infoline);
+                                       
$installer::logger::Lang->print("Changing %s :\n", $componenttablename);
+                                       
$installer::logger::Lang->print($oneline);
                                        last;                   
                                }               
                        }
@@ -359,8 +362,7 @@ sub add_assembly_condition_into_componen
        {
                # Saving the file
                installer::files::save_file($componenttablename 
,$componenttable);
-               $infoline = "Saved idt file: $componenttablename\n"; 
-               $installer::logger::Lang->print($infoline);
+               $installer::logger::Lang->print("Saved idt file: %s\n", 
$componenttablename);
        }
 }
 

Modified: 
openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm Fri 
Nov 29 15:49:27 2013
@@ -49,6 +49,9 @@ sub get_component_guid ($)
        # Returning a ComponentID, that is assigned in scp project
        if ( exists($installer::globals::componentid{$componentname}) )
        {
+        $installer::logger::Lang->printf("reusing guid %s for component %s\n",
+            $installer::globals::componentid{$componentname},
+            $componentname);
                $returnvalue = "\{" . 
$installer::globals::componentid{$componentname} . "\}";
        }
        
@@ -59,52 +62,50 @@ sub get_component_guid ($)
 # Returning the directory for a file component.
 ##############################################################
 
-sub get_file_component_directory
+sub get_file_component_directory ($$$)
 {
        my ($componentname, $filesref, $dirref) = @_; 
 
-       my ($onefile, $component, $onedir, $hostname, $uniquedir);
+       my ($component,  $uniquedir);
        my $found = 0;
 
-       for ( my $i = 0; $i <= $#{$filesref}; $i++ )
+       foreach my $onefile (@$filesref)
        {
-               $onefile =      ${$filesref}[$i];
-               $component = $onefile->{'componentname'};
-               
-               if ( $component eq $componentname )
+               if ($onefile->{'componentname'} eq $componentname)
                {
-                       $found = 1;
-                       last;
-               }       
+            return get_file_component_directory_for_file($onefile, $dirref);
+               }
        }
        
-       if (!($found))
-       {
-               # This component can be ignored, if it exists in a version with 
extension "_pff" (this was renamed in file::get_sequence_for_file() )
-               my $ignore_this_component = 0;
-               my $origcomponentname = $componentname;
-               my $componentname = $componentname . "_pff";
-               
-               for ( my $j = 0; $j <= $#{$filesref}; $j++ )
-               {
-                       $onefile =      ${$filesref}[$j];
-                       $component = $onefile->{'componentname'};
+
+    # This component can be ignored, if it exists in a version with
+    # extension "_pff" (this was renamed in file::get_sequence_for_file() )
+    my $ignore_this_component = 0;
+    my $origcomponentname = $componentname;
+    my $componentname_pff = $componentname . "_pff";
                
-                       if ( $component eq $componentname )
-                       {
-                               $ignore_this_component = 1;
-                               last;
-                       }       
-               }
+    foreach my $onefile (@$filesref)
+    {
+        if ($onefile->{'componentname'} eq $componentname_pff)
+        {
+            return "IGNORE_COMP";
+        }      
+    }
                
-               if ( $ignore_this_component ) { return "IGNORE_COMP"; }
-               else { installer::exiter::exit_program("ERROR: Did not find 
component \"$origcomponentname\" in file collection", 
"get_file_component_directory"); }
-       }
+    installer::exiter::exit_program(
+        "ERROR: Did not find component \"$origcomponentname\" in file 
collection",
+        "get_file_component_directory");
+}
+
 
-       my $localstyles = "";
-       
-       if ( $onefile->{'Styles'} ) { $localstyles = $onefile->{'Styles'}; }
 
+
+sub get_file_component_directory_for_file ($$)
+{
+    my ($onefile, $dirref) = @_;
+
+       my $localstyles = $onefile->{'Styles'} // "";
+       
        if ( $localstyles =~ /\bFONT\b/ )       # special handling for font 
files
        {
                return $installer::globals::fontsfolder;
@@ -126,7 +127,8 @@ sub get_file_component_directory
        $destination =~ s/\Q$installer::globals::separator\E\s*$//;
        
        # This path has to be defined in the directory collection at "HostName" 
-       
+
+    my $uniquedir = undef;
        if ($destination eq "")         # files in the installation root
        {
                $uniquedir = "INSTALLLOCATION";
@@ -135,24 +137,23 @@ sub get_file_component_directory
        {
                $found = 0;
        
-               for ( my $i = 0; $i <= $#{$dirref}; $i++ )
+               foreach my $directory (@$dirref)
                {
-                       $onedir =       ${$dirref}[$i];
-                       $hostname = $onedir->{'HostName'};
-               
-                       if ( $hostname eq $destination )
+                       if ($directory->{'HostName'} eq $destination )
                        {
                                $found = 1;
+                $uniquedir = $directory->{'uniquename'};
                                last;
                        }       
                }
 
-               if (!($found))
+               if ( ! $found)
                {
-                       installer::exiter::exit_program("ERROR: Did not find 
destination $destination in directory collection", 
"get_file_component_directory");
+                       installer::exiter::exit_program(
+                "ERROR: Did not find destination $destination in directory 
collection",
+                "get_file_component_directory");
                }
        
-               $uniquedir = $onedir->{'uniquename'};
                
                if ( $uniquedir eq $installer::globals::officeinstalldirectory )
                {
@@ -226,7 +227,8 @@ sub get_file_component_attributes
                $attributes = 0;        # Assembly files cannot run from source
        }
                
-       if (( $onefile->{'Dir'} =~ /\bPREDEFINED_OSSHELLNEWDIR\b/ ) || ( 
$onefile->{'needs_user_registry_key'} ))
+       if ((defined $onefile->{'Dir'} && $onefile->{'Dir'} =~ 
/\bPREDEFINED_OSSHELLNEWDIR\b/)
+        || $onefile->{'needs_user_registry_key'})
        {
                $attributes = 4;        # Files in shellnew dir and in non 
advertised startmenu entries must have user registry key as KeyPath
        }
@@ -324,37 +326,47 @@ sub get_component_keypath ($$)
 {
        my ($componentname, $itemsref) = @_;
 
-       my $oneitem;
        my $found = 0;
        my $infoline = "";
 
-       for ( my $i = 0; $i <= $#{$itemsref}; $i++ )
+       foreach my $oneitem (@$itemsref)
        {
-               $oneitem =      ${$itemsref}[$i];
-               my $component = $oneitem->{'componentname'};
-               
+        my $component = $oneitem->{'componentname'};
+
+               if ( ! defined $component)
+        {
+            installer::scriptitems::print_script_item($oneitem);
+            installer::logger::PrintError("item in get_component_keypath has 
no 'componentname'\n");
+            return "";
+        }
                if ( $component eq $componentname )
                {
+            my $keypath = $oneitem->{'uniquename'};    # "uniquename", not 
"Name" 
+       
+            # Special handling for components in
+            # PREDEFINED_OSSHELLNEWDIR. These components need as
+            # KeyPath a RegistryItem in HKCU
+            if ($oneitem->{'userregkeypath'})
+            {
+                $keypath = $oneitem->{'userregkeypath'};
+            }
+
+            # saving it in the file and registry collection
+            $oneitem->{'keypath'} = $keypath;
+       
+            return $keypath
+               }
+
+               if ($oneitem->{'componentname'} eq $componentname)
+               {
                        $found = 1;
                        last;
                }
        }
-       
-       if (!($found))
-       {
-               installer::exiter::exit_program("ERROR: Did not find component 
in file/registry collection, function get_component_keypath", 
"get_component_keypath");
-       }
 
-       my $keypath = $oneitem->{'uniquename'}; # "uniquename", not "Name" 
-       
-       # Special handling for components in PREDEFINED_OSSHELLNEWDIR. These 
components
-       # need as KeyPath a RegistryItem in HKCU
-       if ( $oneitem->{'userregkeypath'} ) { $keypath = 
$oneitem->{'userregkeypath'}; }
-
-       # saving it in the file and registry collection
-       $oneitem->{'keypath'} = $keypath;
-       
-       return $keypath
+    installer::exiter::exit_program(
+        "ERROR: Did not find component in file/registry collection, function 
get_component_keypath",
+        "get_component_keypath");
 }
 
 ###################################################################

Modified: openoffice/trunk/main/solenv/bin/modules/installer/worker.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/worker.pm?rev=1546588&r1=1546587&r2=1546588&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/worker.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/worker.pm Fri Nov 29 
15:49:27 2013
@@ -733,9 +733,11 @@ sub remove_all_items_with_special_flag
                if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'} };
                if ( $styles =~ /\b$flag\b/ )
                {
-                       my $infoline = "Attention: Removing from collector: 
$oneitem->{'Name'} !\n";
-                       $installer::logger::Lang->print($infoline);
-                       if ( $flag eq "BINARYTABLE_ONLY" ) { 
push(@installer::globals::binarytableonlyfiles, $oneitem); }
+                       $installer::logger::Lang->printf("Attention: Removing 
from collector: %s\n", $oneitem->{'Name'});
+                       if ($flag eq "BINARYTABLE_ONLY")
+            {
+                push(@installer::globals::binarytableonlyfiles, $oneitem);
+            }
                        next;
                }
                push( @allitems, $oneitem );
@@ -2377,7 +2379,6 @@ sub collect_all_files_from_includepathes
 
                my @sourcefiles = ();
                my $pathstring = "";
-               # 
installer::systemactions::read_complete_directory($includepath, $pathstring, 
\@sourcefiles);
                installer::systemactions::read_full_directory($includepath, 
$pathstring, \@sourcefiles);
 
                if ( ! ( $#sourcefiles > -1 ))
@@ -2711,8 +2712,8 @@ sub generate_cygwin_pathes
 
        for ( my $i = 0; $i <= $#{$filesref}; $i++ )
        {
-               my $line = ${$filesref}[$i]->{'sourcepath'} . "\n";
-               push(@pathcollector, $line);
+               my $filename = ${$filesref}[$i]->{'sourcepath'};
+               push(@pathcollector, $filename  . "\n");
                $counter++;
                
                if (( $i == $#{$filesref} ) || ((( $counter % $max ) == 0 ) && 
( $i > 0 )))
@@ -2728,6 +2729,9 @@ sub generate_cygwin_pathes
                        installer::files::save_file($tmpfilename, 
\@pathcollector);
 
                        my $success = 0;
+            $installer::logger::Lang->printf(
+                "Converting %d filenames to cygwin notation\n",
+                $counter);
                        my @cyg_sourcepathlist = qx{cygpath -w -f 
"$tmpfilename"};
                        chomp @cyg_sourcepathlist;
                        
@@ -2737,14 +2741,19 @@ sub generate_cygwin_pathes
                
                        if ($success)
                        {
-                               $infoline = "Success: Successfully converted to 
cygwin pathes!\n";
-                               $installer::logger::Lang->print($infoline);
+                $installer::logger::Lang->printf(
+                    "Successfully converted %d paths to cygwin notation\n",
+                    $counter);
+                $installer::logger::Lang->printf(
+                    "there where %d unique paths\n",
+                    scalar keys %paths);
                        }
                        else
                        {
-                               $infoline = "ERROR: Failed to convert to cygwin 
pathes!\n";
-                               $installer::logger::Lang->print($infoline);
-                               installer::exiter::exit_program("ERROR: Failed 
to convert to cygwin pathes!", "generate_cygwin_pathes");
+                $installer::logger::Lang->print("ERROR: Failed to convert to 
cygwin pathes!\n");
+                installer::exiter::exit_program(
+                    "ERROR: Failed to convert to cygwin pathes!",
+                    "generate_cygwin_pathes");
                        }
 
                        for ( my $j = 0; $j <= $#cyg_sourcepathlist; $j++ )


Reply via email to