[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 5 commits - editeng/source jvmfwk/plugins sal/inc solenv/bin tools/inc

Andre Fischer af at apache.org
Fri Nov 29 08:08:04 PST 2013


 editeng/source/editeng/editdbg.cxx                |    2 
 jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx      |    2 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx        |    6 
 sal/inc/rtl/string.hxx                            |    6 
 solenv/bin/make_installer.pl                      |    4 
 solenv/bin/modules/installer/converter.pm         |    9 
 solenv/bin/modules/installer/logger.pm            |   72 +++++++
 solenv/bin/modules/installer/pathanalyzer.pm      |    8 
 solenv/bin/modules/installer/scppatchsoname.pm    |   23 --
 solenv/bin/modules/installer/scpzipfiles.pm       |   34 ++-
 solenv/bin/modules/installer/scriptitems.pm       |  216 +++++++++-------------
 solenv/bin/modules/installer/setupscript.pm       |   12 -
 solenv/bin/modules/installer/windows/assembly.pm  |   28 +-
 solenv/bin/modules/installer/windows/component.pm |  124 ++++++------
 solenv/bin/modules/installer/worker.pm            |   31 ++-
 tools/inc/tools/debug.hxx                         |   33 ---
 16 files changed, 331 insertions(+), 279 deletions(-)

New commits:
commit ce86d339b4f00d6ab50a3a6d22351c9ad5068aec
Author: Andre Fischer <af at apache.org>
Date:   Fri Nov 29 15:49:27 2013 +0000

    123729: More cleanup in make_installer.pl

diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index d96e8e0..1495890 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -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);
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm
index b3222af..5ef25e4 100644
--- a/solenv/bin/modules/installer/converter.pm
+++ b/solenv/bin/modules/installer/converter.pm
@@ -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);
diff --git a/solenv/bin/modules/installer/pathanalyzer.pm b/solenv/bin/modules/installer/pathanalyzer.pm
index 5634b9f..eb1ba34 100644
--- a/solenv/bin/modules/installer/pathanalyzer.pm
+++ b/solenv/bin/modules/installer/pathanalyzer.pm
@@ -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) = @_;
diff --git a/solenv/bin/modules/installer/scppatchsoname.pm b/solenv/bin/modules/installer/scppatchsoname.pm
index 3adec11..2c556ec 100644
--- a/solenv/bin/modules/installer/scppatchsoname.pm
+++ b/solenv/bin/modules/installer/scppatchsoname.pm
@@ -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;
 }
 
diff --git a/solenv/bin/modules/installer/scpzipfiles.pm b/solenv/bin/modules/installer/scpzipfiles.pm
index 2f8727e..de4a20a 100644
--- a/solenv/bin/modules/installer/scpzipfiles.pm
+++ b/solenv/bin/modules/installer/scpzipfiles.pm
@@ -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 $line = $lines->[$lineno];
+        if ($line =~ /\$\{/)  # early rejection of lines that don't need replacements
         {
-            my $key;
-
-            foreach $key (keys %{$variableshashref})
+            while (my ($key,$value) = each %$variables)
             {
-                my $value = $variableshashref->{$key};
-                $key = '${' . $key . '}';
-                $line =~ s/\Q$key\E/$value/g;
-                ${$fileref}[$i] = $line;
+                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)
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 127bcff..4c87dd0 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -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_productlists
 {
     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_productlists
 {
     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_script
 {
     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_productlists
 {
     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_keys
 {
     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_productlists
 {
     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_From_Directorylist       # this is used 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_includepath_classic
 {
     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_includepath
 {
     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_Includepathlist
 {
     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_Installset
 {
     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_Installset
 {
     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_from_Installset
 {
     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_from_directoryarray
     {
         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_from_directoryarray
         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) = @_;
-
-    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::scriptitems::get_string_of_modulegids_for_itemgid : $#{$modulesref} : $itemgid : $itemname"); }
+    my ($module_lookup_table, $itemgid) = @_;
 
-    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;
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index 2d4f6de..2018fd0 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -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 "" ))
diff --git a/solenv/bin/modules/installer/windows/assembly.pm b/solenv/bin/modules/installer/windows/assembly.pm
index a053519..1d17f48 100644
--- a/solenv/bin/modules/installer/windows/assembly.pm
+++ b/solenv/bin/modules/installer/windows/assembly.pm
@@ -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_component_table
     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_component_table
 
                     # $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_component_table
     {
         # 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);
     }
 }
 
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 2ffcff2..fef5012 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -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,51 +62,49 @@ 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"); }
     }
 
-    my $localstyles = "";
+    installer::exiter::exit_program(
+        "ERROR: Did not find component \"$origcomponentname\" in file collection",
+        "get_file_component_directory");
+}
+
 
-    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
     {
@@ -127,6 +128,7 @@ sub get_file_component_directory
 
     # 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'};
 
-        if ( $component eq $componentname )
+        if ( ! defined $component)
         {
-            $found = 1;
-            last;
+            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"
 
-    if (!($found))
-    {
-        installer::exiter::exit_program("ERROR: Did not find component in file/registry collection, function get_component_keypath", "get_component_keypath");
-    }
+            # Special handling for components in
+            # PREDEFINED_OSSHELLNEWDIR. These components need as
+            # KeyPath a RegistryItem in HKCU
+            if ($oneitem->{'userregkeypath'})
+            {
+                $keypath = $oneitem->{'userregkeypath'};
+            }
 
-    my $keypath = $oneitem->{'uniquename'}; # "uniquename", not "Name"
+            # saving it in the file and registry collection
+            $oneitem->{'keypath'} = $keypath;
 
-    # Special handling for components in PREDEFINED_OSSHELLNEWDIR. These components
-    # need as KeyPath a RegistryItem in HKCU
-    if ( $oneitem->{'userregkeypath'} ) { $keypath = $oneitem->{'userregkeypath'}; }
+            return $keypath
+        }
 
-    # saving it in the file and registry collection
-    $oneitem->{'keypath'} = $keypath;
+        if ($oneitem->{'componentname'} eq $componentname)
+        {
+            $found = 1;
+            last;
+        }
+    }
 
-    return $keypath
+    installer::exiter::exit_program(
+        "ERROR: Did not find component in file/registry collection, function get_component_keypath",
+        "get_component_keypath");
 }
 
 ###################################################################
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 8ea19ac..a5e5906 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -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++ )
commit c66c37e83ded45f146aa4d48557050516da69062
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Nov 29 15:13:41 2013 +0000

    #i123068# allow OString argument for tools' DbgOut() function
    
    The DbgOut() function is active especially in dbgutil-enabled builds.
    For creating dynamic strings the rtl::OString is often used. Providing a
    DbgOut() function which allows a direct OString argument helps for
    situations where dynamic string creation and DbgOut() are employed.

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index df6dde2..47631fd 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -965,9 +965,11 @@ struct CStringHash
 
 } /* Namespace */
 
-/* Helper method to support OString messages in OSL_ENSURE */
+/* Helper methods to support OString messages in OSL_ENSURE, DBG_ERROR, DBG_WARN, DBG_TRACE, etc. */
 inline sal_Bool SAL_CALL osl_assertFailedLine( const sal_Char* pszFileName, sal_Int32 nLine, const ::rtl::OString& rMessage)
-{ return osl_assertFailedLine( pszFileName, nLine, rMessage.getStr()); }
+    { return osl_assertFailedLine( pszFileName, nLine, rMessage.getStr()); }
+inline void DbgOut( const rtl::OString& rMessage, sal_uInt16 nOutType, const sal_Char* pFileName, sal_uInt16 nLineNum )
+    { DbgOut( rMessage.getStr(), nOutType, pFileName, nLineNum); }
 
 #endif /* __cplusplus */
 
commit 662f26a68043be55190bbc17319f863fecb6e48c
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Nov 29 15:05:30 2013 +0000

    #i123774# the DBG_ERROR/DBG_WARN/DBG_TRACE macros should always show file and line infO

diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index 78a43fb..0383c7f 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -345,23 +345,11 @@ TOOLS_DLLPUBLIC void DbgOutTypef( sal_uInt16 nOutType, const sal_Char* pFStr, ..
 TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... );
 TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
 
-inline void DbgTrace( const sal_Char* pMsg,
-                      const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
-{
-    DbgOut( pMsg, DBG_OUT_TRACE, pFile, nLine );
-}
+#define DbgTrace( msg) do{ DbgOut( msg, DBG_OUT_TRACE, __FILE__, __LINE__ ); } while(0)
 
-inline void DbgWarning( const sal_Char* pMsg,
-                        const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
-{
-    DbgOut( pMsg, DBG_OUT_WARNING, pFile, nLine );
-}
+#define DbgWarning( msg) do{ DbgOut( msg, DBG_OUT_WARNING, __FILE__, __LINE__ ); } while(0)
 
-inline void DbgError( const sal_Char* pMsg,
-                      const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
-{
-    DbgOut( pMsg, DBG_OUT_ERROR, pFile, nLine );
-}
+#define DbgError( msg) do{ DbgOut( msg, DBG_OUT_ERROR, __FILE__, __LINE__ ); } while(0)
 
 // --- Dbg-Test-Functions ---
 
@@ -473,8 +461,7 @@ do                                                  \
     {                                               \
         if ( !( sCon ) )                            \
         {                                           \
-            DbgWarning( aWarning, __FILE__,         \
-                        __LINE__ );                 \
+            DbgWarning( aWarning);                  \
         }                                           \
     }                                               \
 } while(0)
@@ -486,8 +473,7 @@ do                                                  \
     {                                               \
         if ( !( sCon ) )                            \
         {                                           \
-            DbgError( aError,                       \
-                      __FILE__, __LINE__ );         \
+            DbgError( aError);                      \
         }                                           \
     }                                               \
 } while(0)
@@ -498,8 +484,7 @@ do                                              \
 {                                               \
     if ( !( sCon ) )                            \
     {                                           \
-        DbgError( aError,                       \
-                  __FILE__, __LINE__ );         \
+        DbgError( aError);                      \
     }                                           \
 } while(0)
 #else
@@ -561,7 +546,7 @@ do                                                  \
 do                                                  \
 {                                                   \
     if ( DbgIsTraceOut() )                          \
-        DbgTrace( aTrace, __FILE__, __LINE__ );     \
+        DbgTrace( aTrace );                         \
 } while(0)
 
 #define DBG_WARNING( aWarning )                     \
@@ -619,7 +604,7 @@ do                                                  \
 do                                                  \
 {                                                   \
     if ( DbgIsWarningOut() )                        \
-        DbgWarning( aWarning, __FILE__, __LINE__ ); \
+        DbgWarning( aWarning );                     \
 } while(0)
 
 #define DBG_ERROR( aError )                         \
@@ -677,7 +662,7 @@ do                                                  \
 do                                                  \
 {                                                   \
     if ( DbgIsErrorOut() )                          \
-        DbgError( aError, __FILE__, __LINE__ );     \
+        DbgError( aError );                         \
 } while(0)
 
 #define DBG_TESTSOLARMUTEX()                \
commit 912bfc3843c054c4af90ffe4a7065eb9a8face6e
Author: Herbert Dürr <hdu at apache.org>
Date:   Fri Nov 29 14:39:04 2013 +0000

    #i123773# fix ambiguity between string concatenation and C++ user-defined literals
    
    C++11 conformant compilers such as clang rejects string concatenations
    that are ambigous with the C++11 feature "user-defined literals" (N2378)

diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 2da367f..ad77e90 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -454,7 +454,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
     fprintf( fp, "\n\n================================================================================" );
     fprintf( fp, "\n==================   EditEngine & Views   ======================================" );
     fprintf( fp, "\n================================================================================" );
-    fprintf( fp, "\nControl: %"SAL_PRIxUINT32, pEE->GetControlWord() );
+    fprintf( fp, "\nControl: %" SAL_PRIxUINT32, pEE->GetControlWord() );
     fprintf( fp, "\nRefMapMode: %i", pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() );
     fprintf( fp, "\nPaperSize: %li x %li", pEE->GetPaperSize().Width(), pEE->GetPaperSize().Height() );
     fprintf( fp, "\nMaxAutoPaperSize: %li x %li", pEE->GetMaxAutoPaperSize().Width(), pEE->GetMaxAutoPaperSize().Height() );
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
index cf816fd..1c8fa98 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
@@ -105,7 +105,7 @@ int SunInfo::compareVersions(const rtl::OUString& sSecond) const
     rtl::OUString sFirst = getVersion();
 
     SunVersion version1(sFirst);
-    JFW_ENSURE(version1, OUSTR("[Java framework] sunjavaplugin"SAL_DLLEXTENSION
+    JFW_ENSURE(version1, OUSTR("[Java framework] sunjavaplugin" SAL_DLLEXTENSION
                                " does not know the version: ")
                + sFirst + OUSTR(" as valid for a SUN/Oracle JRE."));
     SunVersion version2(sSecond);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 57c19ee..6520d3e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -879,7 +879,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
                            SameOrSubDirJREMap(sResolvedDir));
     if (entry2 != mapJREs.end())
     {
-        JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin"SAL_DLLEXTENSION ": ")
+        JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin" SAL_DLLEXTENSION ": ")
                    + OUSTR("JRE found again (detected before): ") + sResolvedDir
                    + OUSTR(".\n"));
         return entry2->second;
@@ -930,7 +930,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
             MapIt entry =  mapJREs.find(sFilePath);
             if (entry != mapJREs.end())
             {
-                JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin"SAL_DLLEXTENSION ": ")
+                JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin" SAL_DLLEXTENSION ": ")
                    + OUSTR("JRE found again (detected before): ") + sFilePath
                    + OUSTR(".\n"));
 
@@ -1018,7 +1018,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
         vecBadPaths.push_back(sFilePath);
     else
     {
-        JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin"SAL_DLLEXTENSION ": ")
+        JFW_TRACE2(OUSTR("[Java framework] sunjavaplugin" SAL_DLLEXTENSION ": ")
                    + OUSTR("Found JRE: ") + sResolvedDir
                    + OUSTR(" \n at: ") + path + OUSTR(".\n"));
 
commit def161ea3c010d91f8ff325e4e258fcc8d15352c
Author: Andre Fischer <af at apache.org>
Date:   Fri Nov 29 14:27:16 2013 +0000

    123595: Logging of make_installer.pl now supports indentation.

diff --git a/solenv/bin/modules/installer/logger.pm b/solenv/bin/modules/installer/logger.pm
index 6145ce0..3cac508 100644
--- a/solenv/bin/modules/installer/logger.pm
+++ b/solenv/bin/modules/installer/logger.pm
@@ -89,6 +89,40 @@ our $Info = installer::logger->new("info",
     'is_show_log_id' => 0
     );
 
+
+
+=head2 SetupSimpleLogging ($filename)
+
+    Setup logging so that $Global, $Lang and $Info all print to the console AND to the log file.
+
+=cut
+sub SetupSimpleLogging ($)
+{
+    my ($log_filename) = @_;
+
+    $Info = installer::logger->new("info",
+        'is_print_to_console' => 1,
+        'is_show_relative_time' => 1,
+        );
+    $Global = installer::logger->new("glob",
+        'is_print_to_console' => 0,
+        'is_show_relative_time' => 1,
+        'forward' => [$Info]
+        );
+    $Lang = installer::logger->new("lang",
+        'is_print_to_console' => 0,
+        'is_show_relative_time' => 1,
+        'forward' => [$Info]
+        );
+    $Info->set_filename($log_filename);
+    $Info->{'is_print_to_console'} = 1;
+    $installer::globals::quiet = 0;
+    starttime();
+}
+
+
+
+
 =head2 new($class, $id, @arguments)
 
     Create a new instance of the logger class.
@@ -119,7 +153,9 @@ sub new ($$@)
         # Show log id (mostly for debugging the logger)
         'is_show_log_id' => 0,
         # Show the process id, useful on the console when doing a multiprocessor build.
-        'is_show_process_id' => 0
+        'is_show_process_id' => 0,
+        # Current indentation
+        'indentation' => "",
     };
     while (scalar @arguments >= 2)
     {
@@ -219,6 +255,7 @@ sub process_line ($$$$$$)
     {
         $line .= $pid . " : ";
     }
+    $line .= $self->{'indentation'};
     $line .= $message;
 
     # Print the line to a file or to the console or store it for later use.
@@ -359,6 +396,24 @@ sub set_forward ($$)
 
 
 
+sub increase_indentation ($)
+{
+    my ($self) = @_;
+    $self->{'indentation'} .= "    ";
+}
+
+
+
+
+sub decrease_indentation ($)
+{
+    my ($self) = @_;
+    $self->{'indentation'} = substr($self->{'indentation'}, 4);
+}
+
+
+
+
 ####################################################
 # Including header files into the logfile
 ####################################################
@@ -637,6 +692,9 @@ sub print_error
 {
     my $message = shift;
     chomp $message;
+
+    PrintError($message);
+
     print STDERR "\n";
     print STDERR "**************************************************\n";
     print STDERR "ERROR: $message";
@@ -646,6 +704,18 @@ sub print_error
 }
 
 
+
+
+sub PrintError ($@)
+{
+    my ($format, @arguments) = @_;
+
+    $Info->printf("Error: ".$format, @arguments);
+}
+
+
+
+
 =head2 PrintStackTrace()
     This is for debugging the print and printf methods of the logger class and their use.
     Therefore we use the Perl print/printf directly and not the logger methods to avoid loops in case of errors.


More information about the Libreoffice-commits mailing list