Modified: openoffice/branches/ia2/main/solenv/bin/modules/installer/control.pm
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/solenv/bin/modules/installer/control.pm?rev=1538508&r1=1538507&r2=1538508&view=diff
==============================================================================
--- openoffice/branches/ia2/main/solenv/bin/modules/installer/control.pm 
(original)
+++ openoffice/branches/ia2/main/solenv/bin/modules/installer/control.pm Mon 
Nov  4 05:32:01 2013
@@ -32,6 +32,8 @@ use installer::pathanalyzer;
 use installer::scriptitems;
 use installer::systemactions;
 
+our @ErrorMessages = undef;
+
 #########################################################
 # Function that can be used for additional controls.
 # Search happens in $installer::globals::patharray.
@@ -40,10 +42,11 @@ use installer::systemactions;
 sub check_needed_files_in_path
 {
        my ( $filesref ) = @_;
-       
-       foreach $onefile ( @{$filesref} )
+
+    my $error = 0;
+       foreach my $onefile ( @{$filesref} )
        {
-               installer::logger::print_message( "...... searching $onefile 
..." );
+               $installer::logger::Info->printf("...... searching %s ...\n", 
$onefile);
 
                my $fileref = 
installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile,
 $installer::globals::patharray , 0);
 
@@ -54,7 +57,7 @@ sub check_needed_files_in_path
                }
                else
                {
-                       installer::logger::print_message( "\tFound: 
$$fileref\n" );
+                       $installer::logger::Info->print( "\tFound: $$fileref\n" 
);
                }               
        }
 
@@ -126,7 +129,7 @@ sub check_system_path
 
        foreach $onefile ( @needed_files_in_path )
        {
-               installer::logger::print_message( "...... searching $onefile 
..." );
+               $installer::logger::Info->printf("...... searching %s ...\n", 
$onefile);
 
                my $fileref = 
installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile,
 $patharrayref , 0);
 
@@ -137,7 +140,7 @@ sub check_system_path
                }
                else
                {
-                       installer::logger::print_message( "\tFound: 
$$fileref\n" );
+                       $installer::logger::Info->print( "\tFound: $$fileref\n" 
);
                        # Saving the absolut path for msitran.exe. This is 
required for the determination of the checksum.
                        if ( $onefile eq "msitran.exe" ) { 
$installer::globals::msitranpath = $$fileref; }
                }               
@@ -180,7 +183,7 @@ sub check_system_path
        {
                $installer::globals::upx_in_path = 1;
                $installer::globals::upxfile = $$upxfileref;
-               installer::logger::print_message( "\tFound: $$upxfileref\n" );
+               $installer::logger::Info->print( "\tFound: $$upxfileref\n" );
        }
 
 }
@@ -204,13 +207,11 @@ sub get_makecab_version
 
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->printf("ERROR: Could not execute 
\"%s\"!\n", $systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
                
                my $versionline = "";
 
@@ -222,9 +223,8 @@ sub get_makecab_version
                                last;
                        }
                }
-               
-               $infoline = $versionline;
-               push( @installer::globals::globallogfileinfo, $infoline);
+
+        $installer::logger::Global->printf("%s\n", $versionline);
                
                if ( $versionline =~ /\bVersion\b\s+(\d+[\d\.]+\d+)\s+/ )
                {
@@ -237,9 +237,8 @@ sub get_makecab_version
                {
                        $makecabversion = $1;
                }
-               
-               $infoline = "Using version: " . $makecabversion . "\n";
-               push( @installer::globals::globallogfileinfo, $infoline);
+
+        $installer::logger::Global->printf("Using version: %s\n", 
$makecabversion);
        }
        
        return $makecabversion;
@@ -258,8 +257,7 @@ sub check_makecab_version
        
        my $makecabversion = get_makecab_version();
 
-       my $infoline = "Tested version: " . 
$installer::globals::controlledmakecabversion . "\n";
-       push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf("Tested version: %s\n", 
$installer::globals::controlledmakecabversion);
        
        if ( $makecabversion < 0 ) { $do_check = 0; } # version could not be 
determined
        
@@ -280,8 +278,7 @@ sub check_makecab_version
        }
        else
        {
-               $infoline = "Warning: No version check of makecab.exe\n";
-               push( @installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->print("Warning: No version check of 
makecab.exe\n");
        }
 }
 
@@ -317,113 +314,120 @@ sub check_system_environment
        return \%variables;
 }
 
-#############################################################
-# Controlling the log file at the end of the
-# packaging process
-#############################################################
 
-sub check_logfile
+sub prepare_error_processing ()
 {
-       my ($logfile) = @_;
+    @ErrorMessages = ();
+}
 
-       my @errors = ();
-       my @output = ();
-       my $contains_error = 0;
-       
-       my $ignore_error = 0;
-       my $make_error_to_warning = 0;
-       
-       if (( ! $installer::globals::pro ) && ( 
$installer::globals::ignore_error_in_logfile )) { $ignore_error = 1; }
+=item filter_log_error ($relative_time, $log_id, $process_id, $message)
 
-       for ( my $i = 0; $i <= $#{$logfile}; $i++ )
-       {
-               my $line = ${$logfile}[$i];
-               
-               # Errors are all errors, but not the Windows installer table 
"Error.idt"
+    Process the given log message.  Returns $message unaltered.
+    
+=cut
+sub filter_log_error ($$$$)
+{
+    my ($relative_time, $log_id, $process_id, $message) = @_;
+
+    if ($message =~ /\berror\b/i)
+    {
+        # Message contains the word "error".  Now we have to find out if it is 
relevant.
 
-               my $compareline = $line;
-               $compareline =~ s/Error\.idt//g;        # removing all 
occurences of "Error.idt"
-               $compareline =~ s/Error\.mlf//g;        # removing all 
occurences of "Error.mlf"
-               $compareline =~ s/Error\.ulf//g;        # removing all 
occurences of "Error.ulf"
-               $compareline =~ s/Error\.idl//g;        # removing all 
occurences of "Error.idl"
-               $compareline =~ s/Error\.html//g;       # removing all 
occurences of "Error.html"
-        # Ugly workaround for (boost) headers
-        $compareline =~ s/error\.hpp//g;    # removing all occurences of 
"error.hpp"
-        $compareline =~ s/error\.ipp//g;    # removing all occurences of 
"error.ipp"
+        # Remove all filenames that contain the word "Error".
+               my $work_string = $message;
+               $work_string =~ s/Error\.(idt|mlf|ulf|html|hpp|ipp)//g;
                
-               if ( $compareline =~ /\bError\b/i )
+               if ($work_string =~ /\bError\b/i)
                {
-                       $contains_error = 1;
-                       push(@errors, $line);
-                       
-                       if ( $ignore_error )
-                       {
-                               $contains_error = 0;
-                               $make_error_to_warning = 1;
-                       }
+            # This really is an error message.
+            push @ErrorMessages, {'relative_time' => $relative_time,
+                                  'message' => $message};
                }
        }
 
-       if ($contains_error)
-       {
-               my $line = 
"\n*********************************************************************\n";
-               push(@output, $line);
-               $line = "ERROR: The following errors occured in packaging 
process:\n\n";
-               push(@output, $line);
+    return $message;
+}
 
-               for ( my $i = 0; $i <= $#errors; $i++ )
-               {
-                       $line = "$errors[$i]";
-                       push(@output, $line);
-               }
-               
-               $line = 
"*********************************************************************\n";
-               push(@output, $line);
-#              exit(-1);
-       }
-       else
-       {
-               my $line = "";
-               
-               if ( $make_error_to_warning )
-               {
-                       $line = 
"\n*********************************************************************\n";
-                       push(@output, $line);
-                       $line = "The following errors in the log file were 
ignored:\n\n";
-                       push(@output, $line);
 
-                       for ( my $i = 0; $i <= $#errors; $i++ )
-                       {
-                               $line = "$errors[$i]";
-                               push(@output, $line);
-                       }
-               
-                       $line = 
"*********************************************************************\n";
-                       push(@output, $line);           
-               }
-               
-               $line = 
"\n***********************************************************\n";
-               push(@output, $line);
-               $line = "Successful packaging process!\n";
-               push(@output, $line);
-               $line = 
"***********************************************************\n";
-               push(@output, $line);
-       }
 
-       # printing the output file and adding it to the logfile
+
+sub printocessed_error_lines ()
+{
+    my $lines = [];
+
+    foreach my $line (@ErrorMessages)
+    {
+        push @$lines, sprintf("    %12.6f : %s", $line->{'relative_time'}, 
$line->{'message'});
+    }
+
+    return $lines;
+}
+
+
+
+
+=item check_logfile()
+    
+    Print all error messages (typically at the end) on the console.
+    
+=cut
+sub check_logfile ()
+{
+       my ($logfile) = @_;
+
+       my @errors = ();
+       my @output = ();
        
+       my $ignore_errors = ( ! $installer::globals::pro ) && ( 
$installer::globals::ignore_error_in_logfile );
+       my $contains_errors = scalar @ErrorMessages > 0;
+
+    # Format errors
+       if ($contains_errors)
+    {
+        push(@output, "\n");
+        push(@output, 
"*********************************************************************\n");
+        if ($ignore_errors)
+        {
+            push(@output, "The following errors in the log file were 
ignored:\n");
+        }
+        else
+        {
+            push(@output, "ERROR: The following errors occured in packaging 
process:\n");
+        }
+        push(@output, "\n");
+
+        foreach my $line (@ErrorMessages)
+        {
+            push @output, sprintf("    %12.6f : %s", $line->{'relative_time'}, 
$line->{'message'});
+        }
+               
+               push(@output, 
"*********************************************************************\n");
+       }
+
+    # Claim success if there where no errors or if errors are treated as 
warnings.
+       if ( ! $contains_errors || $ignore_errors)
+    {
+               push(@output, "\n");
+               push(@output, 
"***********************************************************\n");
+               push(@output, "Successful packaging process!\n");
+               push(@output, 
"***********************************************************\n");
+       }
+
+       # Print the summary.
        installer::logger::include_header_into_logfile("Summary:");
-       
        my $force = 1; # print this message even in 'quiet' mode
-       for ( my $i = 0; $i <= $#output; $i++ )
+       foreach my $line (@output)
        {
-               my $line = "$output[$i]";
-               installer::logger::print_message( "$line", $force );
-               push( @installer::globals::logfileinfo, $line);
-               push( @installer::globals::errorlogfileinfo, $line);
+               $installer::logger::Info->print($line, $force);
        }
+
+    # Delete the accumulated error messages.  The @ErrorMessages will now 
contain
+    # lines caused by printing those error messages.
+    @ErrorMessages = ();
+
+    @installer::globals::errorlogfileinfo = @output;
        
-       return $contains_error;
+       return $contains_error && ! $ignore_error;
 }
 
 #############################################################
@@ -471,8 +475,8 @@ sub determine_ship_directory
                                $installer::globals::build . "_" . 
$installer::globals::lastminor . "_" .
                                "native_inprogress-number_" . $languagestring . 
"\." . $installer::globals::buildid;
 
-       my $infoline = "\nSetting ship directory: $destdir\n";
-       push(@installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->print("\n");
+    $installer::logger::Global->printf("Setting ship directory: %s\n", 
$destdir);
        
        return $destdir;
 }
@@ -489,44 +493,40 @@ sub check_updatepack
        
        if ( $ENV{'UPDATER'} )  # the environment variable UPDATER has to be set
        {
-               $infoline = "\nEnvironment variable UPDATER set\n";
-               push(@installer::globals::globallogfileinfo, $infoline);
+        $installer::logger::Global->print("\n");
+        $installer::logger::Global->print("Environment variable UPDATER 
set\n");
 
                if ( ! $ENV{'CWS_WORK_STAMP'} ) # the environment variable 
CWS_WORK_STAMP must not be set (set only in CWS)
                {
-                       $infoline = "Environment variable CWS_WORK_STAMP not 
set\n";
-                       push(@installer::globals::globallogfileinfo, $infoline);
+            $installer::logger::Global->print("Environment variable 
CWS_WORK_STAMP not set\n");
 
                        if ( $ENV{'SHIPDRIVE'} )        # the environment 
variable SHIPDRIVE must be set 
                        {
                                $shipdrive = $ENV{'SHIPDRIVE'};
-                               $infoline = "Ship drive defined: $shipdrive\n";
-                               push(@installer::globals::globallogfileinfo, 
$infoline);
+                $installer::logger::Global->printf("Ship drive defined: %s\n", 
$shipdrive);
 
                                if ( -d $shipdrive )    # SHIPDRIVE must be a 
directory
                                {
-                                       $infoline = "Ship drive exists\n";
-                                       
push(@installer::globals::globallogfileinfo, $infoline);
+                    $installer::logger::Global->print("Ship drive exists\n");
 
                                        # try to write into $shipdrive
 
-                                       $directory = 
$installer::globals::product . "_" . $installer::globals::compiler . "_" . 
$installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . 
"_test_$$";
+                                       my $directory = 
$installer::globals::product . "_" . $installer::globals::compiler . "_" . 
$installer::globals::buildid . "_" . $installer::globals::languageproducts[0] . 
"_test_$$";
                                        $directory =~ s/\,/\_/g;        # for 
the list of languages
                                        $directory =~ s/\-/\_/g;        # for 
en-US, pt-BR, ...
                                        $directory = $shipdrive . 
$installer::globals::separator . $directory;
 
-                                       $infoline = "Try to create directory: 
$directory\n";
-                                       
push(@installer::globals::globallogfileinfo, $infoline);
+                    $installer::logger::Global->printf("Try to create 
directory: %s\n", $directory);
                                        
                                        # saving this directory for later 
removal
                                        $installer::globals::shiptestdirectory 
= $directory;
 
                                        if ( 
installer::systemactions::try_to_create_directory($directory))
                                        {
-                                               $infoline = "Write access on 
Ship drive\n";
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
-                                               $infoline = "Ship test 
directory $installer::globals::shiptestdirectory was successfully created\n";
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->print("Write access on 
Ship drive\n");
+                        $installer::logger::Global->print(
+                            "Ship test directory %s was successfully 
created\n",
+                            $installer::globals::shiptestdirectory);
                                                my $systemcall = "rmdir 
$directory";
                                                my $returnvalue = 
system($systemcall);
                                                
@@ -537,8 +537,7 @@ sub check_updatepack
                                                my $sol_tmp;
                                                if ( $ENV{'SOLARENV'} ) { 
$solarenv = $ENV{'SOLARENV'}; }
 
-                                               $infoline = "Environment 
variable SOLARENV: $solarenv\n";
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->printf("Environment 
variable SOLARENV: %s\n", $solarenv);
 
                                                if ( $ENV{'SOL_TMP'} ) 
                         { 
@@ -547,17 +546,15 @@ sub check_updatepack
                         } else {
                             $infoline = "Environment variable SOL_TMP not 
set\n";
                         }
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
+                        $installer::logger::Global->print($infoline);
                                                
                                                if ( defined $sol_tmp && ( 
$solarenv =~ /^\s*\Q$sol_tmp\E/ ))
                                                {
-                                                       $infoline = "Content of 
SOLARENV starts with the content of SOL_TMP\: Local environment -\> No 
Updatepack\n";
-                                                       
push(@installer::globals::globallogfileinfo, $infoline);                        
                        
+                            $installer::logger::Global->print("Content of 
SOLARENV starts with the content of SOL_TMP\: Local environment -\> No 
Updatepack\n");
                                                }                               
                                                
                                                else
                                                {
-                                                       $infoline = "Content of 
SOLARENV does not start with the content of SOL_TMP: No local environment\n";
-                                                       
push(@installer::globals::globallogfileinfo, $infoline);
+                                                       
$installer::logger::Global->print("Content of SOLARENV does not start with the 
content of SOL_TMP: No local environment\n");
 
                                                        
$installer::globals::updatepack = 1;    # That's it
                                                }
@@ -566,48 +563,53 @@ sub check_updatepack
        
                                                if ( -d 
$installer::globals::shiptestdirectory )
                                                {
-                                                       $infoline = "Ship test 
directory $installer::globals::shiptestdirectory still exists. Trying removal 
later again.\n";
-                                                       
push(@installer::globals::globallogfileinfo, $infoline);
+                            $installer::logger::Global->printf(
+                                "Ship test directory %s still exists. Trying 
removal later again.\n",
+                                $installer::globals::shiptestdirectory);
                                                }
                                                else
                                                {
-                                                       $infoline = "Ship test 
directory $installer::globals::shiptestdirectory was successfully removed.\n";
-                                                       
push(@installer::globals::globallogfileinfo, $infoline);        
+                            $installer::logger::Global->printf(
+                                "Ship test directory %s was successfully 
removed.\n",
+                                $installer::globals::shiptestdirectory);
                                                }       
                                        }
                                        else
                                        {
-                                               $infoline = "No write access on 
Ship drive\n";
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
-                                               $infoline = "Failed to create 
directory $directory\n";
-                                               
push(@installer::globals::globallogfileinfo, $infoline);
-                                               if ( defined $ENV{'BSCLIENT'} 
&& ( uc $ENV{'BSCLIENT'} eq 'TRUE' ) ) {
+                        $installer::logger::Global->print("No write access on 
Ship drive\n");
+                        $installer::logger::Global->printf("Failed to create 
directory \n", $directory);
+                                               if ( defined $ENV{'BSCLIENT'} 
&& ( uc $ENV{'BSCLIENT'} eq 'TRUE' ) )
+                        {
                                                        
installer::exiter::exit_program("ERROR: No write access to SHIPDRIVE allthough 
BSCLIENT is set.", "check_updatepack");
                                                }
                                        }
                                }
                                else
                                {
-                                       $infoline = "Ship drive not found: No 
updatepack\n";
-                                       
push(@installer::globals::globallogfileinfo, $infoline);                        
                
+                    $installer::logger::Global->print("Ship drive not found: 
No updatepack\n");
                                }
                        }
                        else
                        {
-                               $infoline = "Environment variable SHIPDRIVE not 
set: No updatepack\n";
-                               push(@installer::globals::globallogfileinfo, 
$infoline);                                
+                $installer::logger::Global->print("Environment variable 
SHIPDRIVE not set: No updatepack\n");
                        }
                }
                else
                {
-                       $infoline = "Environment variable CWS_WORK_STAMP 
defined: No updatepack\n";
-                       push(@installer::globals::globallogfileinfo, 
$infoline);                        
+            $installer::logger::Global->print("Environment variable 
CWS_WORK_STAMP defined: No updatepack\n");
                }
        }       
                                
-       if ( $installer::globals::updatepack ) { $infoline = "Setting 
updatepack true\n\n"; }
-       else { $infoline = "\nNo updatepack\n"; }
-       push(@installer::globals::globallogfileinfo, $infoline);
+       if ( $installer::globals::updatepack )
+    {
+        $installer::logger::Global->print("Setting updatepack true\n");
+        $installer::logger::Global->print("\n");
+    }
+       else
+    {
+        $installer::logger::Global->print("\n");
+        $installer::logger::Global->print("No updatepack\n");
+    }
        
 }
 
@@ -623,8 +625,7 @@ sub read_encodinglist
 
        if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Did 
not find Windows encoding list $installer::globals::encodinglistname!", 
"read_encodinglist"); }
 
-       my $infoline = "Found encoding file: $$fileref\n";
-       push(@installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf("Found encoding file: %s\n", $$fileref);
                
        my $encodinglist = installer::files::read_file($$fileref);
 
@@ -720,8 +721,9 @@ sub set_addchildprojects
                $installer::globals::addchildprojects = 0;      # no child 
projects for patches
        }       
 
-       my $infoline = "Value of \$installer::globals::addchildprojects: 
$installer::globals::addchildprojects\n";
-       push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addchildprojects: %s\n",
+        $installer::globals::addchildprojects);
 }
 
 ####################################################################
@@ -738,8 +740,9 @@ sub set_addjavainstaller
        if ( $installer::globals::languagepack ) { 
$installer::globals::addjavainstaller = 0; }
        if ( $allvariableshashref->{'XPDINSTALLER'} ) { 
$installer::globals::addjavainstaller = 0; }
 
-       my $infoline = "Value of \$installer::globals::addjavainstaller: 
$installer::globals::addjavainstaller\n";
-       push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addjavainstaller: %s\n",
+        $installer::globals::addjavainstaller);
 }
 
 #######################################################################
@@ -756,8 +759,9 @@ sub set_addsystemintegration
        if ( $installer::globals::languagepack ) { 
$installer::globals::addsystemintegration = 0; }
        if (( $installer::globals::packageformat eq "native" ) || ( 
$installer::globals::packageformat eq "portable" )) { 
$installer::globals::addsystemintegration = 0; }
 
-       my $infoline = "Value of \$installer::globals::addsystemintegration: 
$installer::globals::addsystemintegration\n";
-       push( @installer::globals::globallogfileinfo, $infoline);
+    $installer::logger::Global->printf(
+        "Value of \$installer::globals::addsystemintegration: %s\n",
+        $installer::globals::addsystemintegration);
 }
 
 1;

Modified: openoffice/branches/ia2/main/solenv/bin/modules/installer/download.pm
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/solenv/bin/modules/installer/download.pm?rev=1538508&r1=1538507&r2=1538508&view=diff
==============================================================================
--- openoffice/branches/ia2/main/solenv/bin/modules/installer/download.pm 
(original)
+++ openoffice/branches/ia2/main/solenv/bin/modules/installer/download.pm Mon 
Nov  4 05:32:01 2013
@@ -51,9 +51,8 @@ sub put_productname_into_script
        $productname = lc($productname);
        $productname =~ s/\.//g;        # openoffice.org -> openofficeorg
        $productname =~ s/\s*//g;
-       
-       my $infoline = "Adding productname $productname into download shell 
script\n";
-       push( @installer::globals::logfileinfo, $infoline);
+
+    $installer::logger::Lang->printf("Adding productname %s into download 
shell script\n", $productname);
 
        for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
        {
@@ -71,8 +70,7 @@ sub put_linenumber_into_script
        
        my $linenumber =  $#{$scriptfile} + 2;
 
-       my $infoline = "Adding linenumber $linenumber into download shell 
script\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Adding linenumber %d into download shell 
script\n", $linenumber);
 
        for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
        {
@@ -92,8 +90,7 @@ sub determine_scriptfile_name
        $filename = $filename . $installer::globals::downloadfileextension;
        $installer::globals::downloadfilename = $filename;
 
-       my $infoline = "Setting download shell script file name to $filename\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Setting download shell script file name 
to %s\n", $filename);
 
        return $filename;
 }
@@ -108,9 +105,8 @@ sub save_script_file
        
        $newscriptfilename = $directory . $installer::globals::separator . 
$newscriptfilename;
        installer::files::save_file($newscriptfilename, $scriptfile);
-       
-       my $infoline = "Saving script file $newscriptfilename\n";
-       push( @installer::globals::logfileinfo, $infoline);
+
+    $installer::logger::Lang->printf("Saving script file %s\n", 
$newscriptfilename);
 
        if ( ! $installer::globals::iswindowsbuild )
        {
@@ -142,8 +138,8 @@ sub put_checksum_and_size_into_script
                installer::exiter::exit_program("ERROR: Incorrect return value 
from /usr/bin/sum: $sumout", "put_checksum_and_size_into_script");
        }
 
-       my $infoline = "Adding checksum $checksum and size $size into download 
shell script\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf(
+        "Adding checksum %s and size %s into download shell script\n", 
$checksum, $size);
 
        for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
        {
@@ -175,18 +171,15 @@ sub call_md5sum
 
        my $returnvalue = $?;   # $? contains the return value of the systemcall
 
-       my $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->print("Success: Executed \"%s\" 
successfully!\n", $systemcall);
        }
        
        return $md5sumoutput;           
@@ -211,8 +204,7 @@ sub get_md5sum
                installer::exiter::exit_program("ERROR: Incorrect return value 
from /usr/bin/md5sum: $md5sumoutput", "get_md5sum");
        }
 
-       my $infoline = "Setting md5sum: $md5sum\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Setting md5sum: %s\n", $md5sum);
 
        return $md5sum;
 }
@@ -235,18 +227,15 @@ sub call_sum
 
        my $returnvalue = $?;   # $? contains the return value of the systemcall
 
-       my $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
        }
        
        $sumoutput =~ s/\s+$filename\s$//;
@@ -290,18 +279,15 @@ sub include_tar_into_script
        my $systemcall = "cat $temporary_tarfile >> $scriptfile && rm 
$temporary_tarfile";
        my $returnvalue = system($systemcall);
 
-       my $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
        }
        return $returnvalue;
 }
@@ -321,18 +307,15 @@ sub tar_package
        
        my $returnvalue = system($systemcall);
 
-       my $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: Executed \"\" 
successfully!\n", $systemcall);
        }
        
        my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
@@ -349,7 +332,6 @@ sub create_tar_gz_file_from_package
 {
        my ($installdir, $getuidlibrary) = @_;
 
-       my $infoline = "";
        my $alldirs = 
installer::systemactions::get_all_directories($installdir);
        my $onedir = ${$alldirs}[0];
        $installdir = $onedir;
@@ -362,18 +344,15 @@ sub create_tar_gz_file_from_package
                my $systemcall = "cd $installdir; rm $onefile";
                my $returnvalue = system($systemcall);
 
-               $infoline = "Systemcall: $systemcall\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
                if ($returnvalue)
                {
-                       $infoline = "ERROR: Could not execute 
\"$systemcall\"!\n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("ERROR: Could not execute 
\"%s\"!\n", $systemcall);
                }
                else
                {
-                       $infoline = "Success: Executed \"$systemcall\" 
successfully!\n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
                }
        }
 
@@ -394,18 +373,15 @@ sub create_tar_gz_file_from_package
 
        my $returnvalue = system($systemcall);
 
-       $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
        }
 }
 
@@ -761,24 +737,20 @@ sub get_versionstring
 
 sub get_current_version
 {
-       my $infoline = "";
        my $versionstring = "";
        my $filename = "version.info";
        # $filename = $installer::globals::ooouploaddir . 
$installer::globals::separator . $filename;
        
        if ( -f $filename )
        {
-               $infoline = "File $filename exists. Trying to find current 
version.\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("File %s exists. Trying to find 
current version.\n", $filename);
                my $versionfile = installer::files::read_file($filename);
                $versionstring = get_versionstring($versionfile);
-               $infoline = "Setting version string: $versionstring\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Setting version string: %s\n", 
$versionstring);
        }
        else
        {
-               $infoline = "File $filename does not exist. No version setting 
in download file name.\n";
-               push( @installer::globals::logfileinfo, $infoline);     
+        $installer::logger::Lang->printf("File %s does not exist. No version 
setting in download file name.\n", $filename);
        }
 
        $installer::globals::oooversionstring = $versionstring;
@@ -826,8 +798,6 @@ sub create_tar_gz_file_from_directory
 {
        my ($installdir, $getuidlibrary, $downloaddir, $downloadfilename) = @_;
 
-       my $infoline = "";
-
        my $packdir = $installdir;
        
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$packdir);
        my $changedir = $installdir;
@@ -844,18 +814,15 @@ sub create_tar_gz_file_from_directory
        
        my $returnvalue = system($systemcall);
 
-       $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
                
        if ($returnvalue)
        {
-               $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: Could not execute \"%s\"!\n", 
$systemcall);
        }
        else
        {
-               $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: Executed \"%s\" 
successfully!\n", $systemcall);
        }
        
        return $targzname;
@@ -912,8 +879,7 @@ sub replace_one_variable
 {
        my ($templatefile, $placeholder, $value) = @_;
 
-       my $infoline = "Replacing $placeholder by $value in nsi file\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Replacing %s by %s in nsi file\n", 
$placeholder, $value);
 
        for ( my $i = 0; $i <= $#{$templatefile}; $i++ )
        {
@@ -1309,11 +1275,10 @@ sub nsis_language_converter
        elsif ( $language eq "vi" ) { $nsislanguage = "Vietnamese"; }
        elsif ( $language eq "zh-CN" ) { $nsislanguage = "SimpChinese"; }
        elsif ( $language eq "zh-TW" ) { $nsislanguage = "TradChinese"; }
-       else {
-               my $infoline = "NSIS language_converter : Could not find nsis 
language for $language!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+       else
+    {
+        $installer::logger::Lang->printf("NSIS language_converter : Could not 
find nsis language for %s!\n", $language);
                $nsislanguage = "English";
-               # installer::exiter::exit_program("ERROR: Could not find nsis 
language for $language!", "nsis_language_converter");  
        }
 
        return $nsislanguage;
@@ -1472,8 +1437,11 @@ sub replace_identifier_in_nshfile
                {
                        my $oldstring = $1;
                        ${$nshfile}[$i] =~ s/\Q$oldstring\E/$newstring/;
-                       my $infoline = "NSIS replacement in $nshfilename 
($onelanguage): $oldstring \-\> $newstring\n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("NSIS replacement in %s (%s):  
\-\> %s\n",
+                $nshfilename,
+                $onelanguage,
+                $oldstring,
+                $newstring);
                }
        }
 }
@@ -1497,8 +1465,11 @@ sub replace_identifier_in_nlffile
                        my $oldstring = ${$nlffile}[$next];
                        ${$nlffile}[$next] = $newstring . "\n";
                        $oldstring =~ s/\s*$//;
-                       my $infoline = "NSIS replacement in $nlffilename 
($onelanguage): $oldstring \-\> $newstring\n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("NSIS replacement in %s (%s): %s 
\-\> %s\n",
+                $nlffilename,
+                $onelanguage,
+                $oldstring,
+                $newstring);
                }
        }       
 }
@@ -1620,8 +1591,6 @@ sub copy_and_translate_nsis_language_fil
        my $nlffilepath = $nsispath . $installer::globals::separator . 
"Contrib" . $installer::globals::separator . "Language\ files" . 
$installer::globals::separator;
        my $nshfilepath = $nsispath . $installer::globals::separator . 
"Contrib" . $installer::globals::separator . "Modern\ UI" . 
$installer::globals::separator . "Language files" . 
$installer::globals::separator;
 
-       my $infoline = "";
-
        for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ )
        {
                my $onelanguage = ${$languagesarrayref}[$i];
@@ -1656,8 +1625,7 @@ sub copy_and_translate_nsis_language_fil
                
                if ( $installer::globals::unicodensis )
                {
-                       $infoline = "This is Unicode NSIS!\n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("This is Unicode NSIS!\n");
                        convert_utf16_to_utf8($nshfilename);
                        convert_utf16_to_utf8($nlffilename);
                        $nshfile = installer::files::read_file($nshfilename);   
# read nsh file again
@@ -1776,8 +1744,9 @@ sub get_path_to_nsis_sdk
 
        if ( $nsispath eq "" )
        {
-               installer::logger::print_message( "... no Environment variable 
\"SOLARROOT\", \"NSIS_PATH\" or \"NSISSDK_SOURCE\" found and NSIS not found in 
path!", "get_path_to_nsis_sdk");
-       } elsif ( ! -d $nsispath )
+        $installer::logger::Info->print("... no Environment variable 
\"SOLARROOT\", \"NSIS_PATH\" or \"NSISSDK_SOURCE\" found and NSIS not found in 
path!\n");
+       }
+    elsif ( ! -d $nsispath )
        {
                installer::exiter::exit_program("ERROR: NSIS path $nsispath 
does not exist!", "get_path_to_nsis_sdk");
        }
@@ -1795,14 +1764,13 @@ sub call_nsis
        
        my $makensisexe = $nsispath . $installer::globals::separator . 
"makensis.exe";
 
-       installer::logger::print_message( "... starting $makensisexe ... \n" );
+    $installer::logger::Info->printf("... starting %s ... \n", $makensisexe);
 
        if( $^O =~ /cygwin/i ) { $nsifile =~ s/\\/\//g; }
 
        my $systemcall = "$makensisexe $nsifile |";
 
-       my $infoline = "Systemcall: $systemcall\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Systemcall: %s\n", $systemcall);
 
        my @nsisoutput = ();
 
@@ -1814,17 +1782,17 @@ sub call_nsis
 
        if ($returnvalue)
        {
-               $infoline = "ERROR: $systemcall !\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("ERROR: %s !\n", $systemcall);
        }
        else
        {
-               $infoline = "Success: $systemcall\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Success: %s\n", $systemcall);
        }               
 
-       for ( my $i = 0; $i <= $#nsisoutput; $i++ ) { push( 
@installer::globals::logfileinfo, "$nsisoutput[$i]"); }
-
+       foreach my $line (@nsisoutput)
+    {
+        $installer::logger::Lang->print($line);
+    }
 }
 
 
#################################################################################
@@ -1874,8 +1842,7 @@ sub get_translation_file
        my $translationfile = installer::files::read_file($translationfilename);
        replace_variables($translationfile, $allvariableshashref);
 
-       my $infoline = "Reading translation file: $translationfilename\n";
-       push( @installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Reading translation file: %s\n", 
$translationfilename);
        
        return $translationfile;
 }
@@ -1904,8 +1871,7 @@ sub create_link_tree
        
        if ( ! $installer::globals::ooouploaddir ) { 
installer::exiter::exit_program("ERROR: Directory for AOO upload not defined!", 
"create_link_tree"); }
        my $versiondir = $installer::globals::ooouploaddir . 
$installer::globals::separator . $versionstring;
-       my $infoline = "Directory for the link: $versiondir\n";
-       push(@installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Directory for the link: %s\n", 
$versiondir);
        
        if ( ! -d $versiondir ) { 
installer::systemactions::create_directory_structure($versiondir); }
        
@@ -1915,8 +1881,7 @@ sub create_link_tree
        # If there is an older version of this file (link), it has to be removed
        if ( -f $linkdestination ) { unlink($linkdestination); }
 
-       $infoline = "Creating hard link from $sourcedownloadfile to 
$linkdestination\n";
-       push(@installer::globals::logfileinfo, $infoline);
+    $installer::logger::Lang->printf("Creating hard link from %s to %s\n", 
$sourcedownloadfile, $linkdestination);
        installer::systemactions::hardlink_one_file($sourcedownloadfile, 
$linkdestination);     
 }
 
@@ -1948,12 +1913,10 @@ sub create_download_sets
 {
        my ($installationdir, $includepatharrayref, $allvariableshashref, 
$downloadname, $languagestringref, $languagesarrayref) = @_;
        
-       my $infoline = "";
-       
-       my $force = 1; # print this message even in 'quiet' mode
-       installer::logger::print_message( 
"\n******************************************\n" );
-       installer::logger::print_message( "... creating download installation 
set ...\n", $force );
-       installer::logger::print_message( 
"******************************************\n" );
+    $installer::logger::Info->print("\n");
+    
$installer::logger::Info->print("******************************************\n");
+    $installer::logger::Info->print("... creating download installation set 
...\n", 1);
+    
$installer::logger::Info->print("******************************************\n");
 
        installer::logger::include_header_into_logfile("Creating download 
installation sets:");
 
@@ -2030,8 +1993,7 @@ sub create_download_sets
                        if ($$scriptref eq "") { 
installer::exiter::exit_program("ERROR: Could not find script file 
$scriptfilename!", "create_download_sets"); }
                        my $scriptfile = 
installer::files::read_file($$scriptref);
 
-                       $infoline = "Found  script file $scriptfilename: 
$$scriptref \n";
-                       push( @installer::globals::logfileinfo, $infoline);
+            $installer::logger::Lang->printf("Found  script file %s: %s \n", 
$scriptfilename, $$scriptref);
        
                        # add product name into script template
                        put_productname_into_script($scriptfile, 
$allvariableshashref);
@@ -2054,7 +2016,7 @@ sub create_download_sets
                        my $newscriptfilename = 
determine_scriptfile_name($downloadname);
                        $newscriptfilename = save_script_file($downloaddir, 
$newscriptfilename, $scriptfile);
 
-                       installer::logger::print_message( "... including 
installation set into $newscriptfilename ... \n" );
+            $installer::logger::Info->printf("... including installation set 
into %s ... \n", $newscriptfilename);
             # Append tar file to script
                        include_tar_into_script($newscriptfilename, 
$temporary_tarfile_name); 
                }
@@ -2070,9 +2032,9 @@ sub create_download_sets
                if ( $nsispath eq "" ) {
                        # If nsis is not found just skip the rest of this 
function
                        # and do not create the NSIS file.
-                       $infoline = "\nNo NSIS SDK found. Skipping the 
generation of NSIS file.\n";
-                       push(@installer::globals::logfileinfo, $infoline);
-                       installer::logger::print_message( "... no NSIS SDK 
found. Skipping the generation of NSIS file ... \n" );
+            $installer::logger::Lang->print("\n");
+            $installer::logger::Lang->printf("No NSIS SDK found. Skipping the 
generation of NSIS file.\n");
+            $installer::logger::Info->print("... no NSIS SDK found. Skipping 
the generation of NSIS file ... \n");
                        return $downloaddir;
                }
 
@@ -2114,8 +2076,8 @@ sub create_download_sets
                put_version_specific_code_into_template($templatefile);
        
                my $nsifilename = save_script_file($localnsisdir, 
$templatefilename, $templatefile);
-               
-               installer::logger::print_message( "... created NSIS file 
$nsifilename ... \n" );
+
+        $installer::logger::Info->printf("... created NSIS file %s ... \n", 
$nsifilename);
                
                # starting the NSIS SDK to create the download file
                call_nsis($nsispath, $nsifilename);             
@@ -2132,14 +2094,14 @@ sub create_download_link_tree
 {
        my ($downloaddir, $languagestringref, $allvariableshashref) = @_;
 
-       my $infoline;
-
-       installer::logger::print_message( 
"\n******************************************\n" );
-       installer::logger::print_message( "... creating download hard link 
...\n" );
-       installer::logger::print_message( 
"******************************************\n" );
+    $installer::logger::Info->print("\n");
+    
$installer::logger::Info->print("******************************************\n");
 # 
+    $installer::logger::Info->print("... creating download hard link ...\n");
+    
$installer::logger::Info->print("******************************************\n");
 
        installer::logger::include_header_into_logfile("Creating download hard 
link:");
-       installer::logger::include_timestamp_into_logfile("\nPerformance Info: 
Creating hard link, start");
+       $installer::logger::Lang->print("\n");
+       $installer::logger::Lang->add_timestamp("Performance Info: Creating 
hard link, start");
 
        if ( is_supported_platform() )
        {
@@ -2151,8 +2113,7 @@ sub create_download_link_tree
                
                # Is $versionstring empty? If yes, there is nothing to do now. 
 
-               $infoline = "Version string is set to: $versionstring\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Version string is set to: %s\n", 
$versionstring);
                
                if ( $versionstring )
                {
@@ -2164,14 +2125,12 @@ sub create_download_link_tree
                        if ( $destdownloadfilename )
                        {
                                $destdownloadfilename = $destdownloadfilename . 
$installer::globals::downloadfileextension;
-                               
-                               $infoline = "Setting destination download file 
name: $destdownloadfilename\n";
-                               push( @installer::globals::logfileinfo, 
$infoline);
+
+                $installer::logger::Lang->printf("Setting destination download 
file name: %s\n", $destdownloadfilename);
 
                                my $sourcedownloadfile = $downloaddir . 
$installer::globals::separator . $installer::globals::downloadfilename;
 
-                               $infoline = "Setting source download file name: 
$sourcedownloadfile\n";
-                               push( @installer::globals::logfileinfo, 
$infoline);
+                $installer::logger::Lang->printf("Setting source download file 
name: %s\n", $sourcedownloadfile);
 
                                create_link_tree($sourcedownloadfile, 
$destdownloadfilename, $versionstring);
                                # my $md5sumoutput = call_md5sum($downloadfile);
@@ -2181,17 +2140,15 @@ sub create_download_link_tree
                }
                else
                {
-                       $infoline = "Version string is empty. Nothing to do!\n";
-                       push( @installer::globals::logfileinfo, $infoline);     
        
-               }
+            $installer::logger::Lang->printf("Version string is empty. Nothing 
to do!\n");
+        }
        }       
        else
        {
-               $infoline = "Platform not used for hard linking. Nothing to 
do!\n";
-               push( @installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Platform not used for hard linking. 
Nothing to do!\n");
        }
 
-       installer::logger::include_timestamp_into_logfile("Performance Info: 
Creating hard link, stop");
+       $installer::logger::Lang->add_timestamp("Performance Info: Creating 
hard link, stop");
 }
 
 1;

Modified: 
openoffice/branches/ia2/main/solenv/bin/modules/installer/downloadsigner.pm
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/solenv/bin/modules/installer/downloadsigner.pm?rev=1538508&r1=1538507&r2=1538508&view=diff
==============================================================================
--- openoffice/branches/ia2/main/solenv/bin/modules/installer/downloadsigner.pm 
(original)
+++ openoffice/branches/ia2/main/solenv/bin/modules/installer/downloadsigner.pm 
Mon Nov  4 05:32:01 2013
@@ -87,8 +87,6 @@ Ende
 
 sub getparameter
 {
-       # installer::logger::print_message("Checking parameter");
-
        while ( $#ARGV >= 0 )
        {
                my $param = shift(@ARGV);
@@ -192,8 +190,9 @@ sub set_temp_path
                usage();
                exit(-1);
        }
-       
-       installer::logger::print_message( "\n... using output path: $temppath 
...\n" );
+
+       $installer::logger::Info->print("\n");
+       $installer::logger::Info->printf("\n... using output path: %s ...\n", 
$temppath);
        
        push(@installer::globals::removedirs, $temppath);
        
@@ -226,8 +225,9 @@ sub set_output_pathes_to_temp
 sub set_minor_into_pathes
 {
        my ($followmeinfohash, $temppath) = @_;
-       
-       installer::logger::print_message( "\n... forcing into minor: 
$installer::globals::lastminor ...\n" );
+
+    $installer::logger::Info->print("\n");
+    $installer::logger::Info->printf("... forcing into minor: %s ...\n", 
$installer::globals::lastminor);
        
        my @pathnames = ("bin", "doc", "inc", "lib", "pck", "res", "xml");
        my $sourcename = "src";
@@ -235,7 +235,8 @@ sub set_minor_into_pathes
        
        if ( $installer::globals::minor ne "" )
        {
-               installer::logger::print_message( "\n... already defined minor: 
$installer::globals::minor -> ignoring parameter \"-useminor\" ...\n" );
+        $installer::logger::Info->print("\n");
+        $installer::logger::Info->printf("... already defined minor: %s -> 
ignoring parameter \"-useminor\" ...\n" , $installer::globals::minor);
                return;
        }
 
@@ -247,19 +248,16 @@ sub set_minor_into_pathes
        # $installer::globals::idtlanguagepath
 
        installer::logger::include_header_into_logfile("Changing saved pathes 
to add the minor");
-       my $infoline = "Old pathes:\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$followmeinfohash->{'installlogdir'}: 
$followmeinfohash->{'installlogdir'}\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::unpackpath: 
$installer::globals::unpackpath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::idttemplatepath: 
$installer::globals::idttemplatepath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::idtlanguagepath: 
$installer::globals::idtlanguagepath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "Include pathes:\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       foreach my $path ( @{$followmeinfohash->{'includepatharray'}} ) { push( 
@installer::globals::logfileinfo, $path); }
+    $installer::logger::Lang->print("Old pathes:\n");
+    $installer::logger::Lang->printf("\$followmeinfohash->{'installlogdir'}: 
%s\n", $followmeinfohash->{'installlogdir'});
+    $installer::logger::Lang->printf("\$installer::globals::unpackpath: %s\n", 
$installer::globals::unpackpath);
+    $installer::logger::Lang->printf("\$installer::globals::idttemplatepath: 
%s\n", $installer::globals::idttemplatepath);
+    $installer::logger::Lang->printf("\$installer::globals::idtlanguagepath: 
%s\n", $installer::globals::idtlanguagepath);
+    $installer::logger::Lang->printf("Include pathes:\n");
+       foreach my $path ( @{$followmeinfohash->{'includepatharray'}} )
+    {
+        $installer::logger::Lang->print($path);
+    }
        
        foreach $onepath ( @pathnames )
        {
@@ -302,19 +300,17 @@ sub set_minor_into_pathes
        if ( $installer::globals::idtlanguagepath =~ /\Q$srcpath\E/ ) { 
$installer::globals::idtlanguagepath =~ s/\Q$srcpath\E/$newsrcpath/; }
        foreach my $path ( @{$followmeinfohash->{'includepatharray'}} ) { if ( 
$path =~ /\Q$srcpath\E/ ) { $path =~ s/\Q$srcpath\E/$newsrcpath/; } }
 
-       $infoline = "\nNew pathes:\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$followmeinfohash->{'installlogdir'}: 
$followmeinfohash->{'installlogdir'}\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::unpackpath: 
$installer::globals::unpackpath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::idttemplatepath: 
$installer::globals::idttemplatepath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "\$installer::globals::idtlanguagepath: 
$installer::globals::idtlanguagepath\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       $infoline = "Include pathes:\n";
-       push( @installer::globals::logfileinfo, $infoline);
-       foreach my $path ( @{$followmeinfohash->{'includepatharray'}} ) { push( 
@installer::globals::logfileinfo, $path); }
+    $installer::logger::Lang->print("\n");
+    $installer::logger::Lang->print("New pathes:\n");
+    $installer::logger::Lang->printf("\$followmeinfohash->{'installlogdir'}: 
%s\n", $followmeinfohash->{'installlogdir'});
+    $installer::logger::Lang->printf("\$installer::globals::unpackpath: %s\n", 
$installer::globals::unpackpath);
+    $installer::logger::Lang->printf("\$installer::globals::idttemplatepath: 
%s\n", $installer::globals::idttemplatepath);
+    $installer::logger::Lang->printf("\$installer::globals::idtlanguagepath: 
%s\n", $installer::globals::idtlanguagepath);
+    $installer::logger::Lang->printf("Include pathes:\n");
+       foreach my $path ( @{$followmeinfohash->{'includepatharray'}} )
+    {
+        $installer::logger::Lang->print($path);
+    }
 }
 
 #############################################
@@ -380,16 +376,17 @@ sub publishproductlist
 {
        my ($infofilelist) = @_;
 
-       installer::logger::print_message( "\n... found products: ...\n" );
+    $installer::logger::Info->print("\n");
+    $installer::logger::Info->printf("... found products: ...\n");
 
        for ( my $i = 0; $i <= $#{$infofilelist}; $i++ )
        {
                my $onefile = ${$infofilelist}[$i];
                
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$onefile);
-               installer::logger::print_message( "...... $onefile ...\n" );    
+        $installer::logger::Info->printf("...... $onefile ...\n");
        }
 
-       installer::logger::print_message( "\n" );
+    $installer::logger::Info->printf("\n");
 }
 
 #########################################################
@@ -469,7 +466,8 @@ sub createproductlist
        }
        elsif ( -d $installer::globals::followmeinfofilename )
        {
-               installer::logger::print_message( "\n... reading directory: 
$installer::globals::followmeinfofilename ...\n" );
+        $installer::logger::Info->printf("\n");
+        $installer::logger::Info->printf("... reading directory: %s ...\n", 
$installer::globals::followmeinfofilename);
                $installer::globals::followmeinfofilename =~ 
s/$installer::globals::separator\s*$//;
                my $allfollowmefiles = 
installer::systemactions::find_file_with_file_extension("log", 
$installer::globals::followmeinfofilename);
 
@@ -546,14 +544,26 @@ sub logfollowmeinfohash
 {
        my ( $followmehash ) = @_;
 
-       print "\n*****************************************\n";
-       print "Content of follow-me info file:\n";
-       print "finalinstalldir: $followmehash->{'finalinstalldir'}\n";
-       print "downloadname: $followmehash->{'downloadname'}\n";
-       print "languagestring: $followmehash->{'languagestring'}\n";
-       foreach my $lang ( @{$followmehash->{'languagesarray'}} ) { print 
"languagesarray: $lang\n"; }
-       foreach my $path ( @{$followmehash->{'includepatharray'}} ) { print 
"includepatharray: $path"; }
-       foreach my $key ( sort keys %{$followmehash->{'allvariableshash'}} ) { 
print "allvariableshash: $key : $followmehash->{'allvariableshash'}->{$key}\n"; 
}
+    $installer::logger::Info->printf("\n");
+    
$installer::logger::Info->printf("*****************************************\n");
+    $installer::logger::Info->printf("Content of follow-me info file:\n");
+    $installer::logger::Info->printf("finalinstalldir: %s\n", 
$followmehash->{'finalinstalldir'});
+    $installer::logger::Info->printf("downloadname: %s\n", 
$followmehash->{'downloadname'});
+    $installer::logger::Info->printf("languagestring: %s\n", 
$followmehash->{'languagestring'});
+       foreach my $lang ( @{$followmehash->{'languagesarray'}} )
+    {
+        $installer::logger::Info->printf("languagesarray: %s\n", $lang);
+    }
+       foreach my $path ( @{$followmehash->{'includepatharray'}} )
+    {
+        $installer::logger::Info->printf("includepatharray: %s\n", $path);
+    }
+       foreach my $key ( sort keys %{$followmehash->{'allvariableshash'}} )
+    {
+        $installer::logger::Info->printf("allvariableshash: %s : %s\n",
+            $key,
+            $followmehash->{'allvariableshash'}->{$key});
+    }
 }
 
 ########################################################################
@@ -574,7 +584,11 @@ sub rename_followme_infofile
        if ( $filename ne $newfilename )
        {
                my $returnvalue = rename($filename, $newfilename);
-               if ( $returnvalue ) { installer::logger::print_message( "\n... 
renamed file \"$filename\" to \"$newfilename\" ...\n" ); }
+               if ( $returnvalue )
+        {
+            $installer::logger::Info->printf("\n");
+            $installer::logger::Info->printf("... renamed file \"%s\" to 
\"%s\" ...\n", $filename, $newfilename);
+        }
        }
 }
 

Modified: 
openoffice/branches/ia2/main/solenv/bin/modules/installer/environment.pm
URL: 
http://svn.apache.org/viewvc/openoffice/branches/ia2/main/solenv/bin/modules/installer/environment.pm?rev=1538508&r1=1538507&r2=1538508&view=diff
==============================================================================
--- openoffice/branches/ia2/main/solenv/bin/modules/installer/environment.pm 
(original)
+++ openoffice/branches/ia2/main/solenv/bin/modules/installer/environment.pm 
Mon Nov  4 05:32:01 2013
@@ -83,14 +83,12 @@ sub check_tilde_in_directory
                my $home = $ENV{'HOME'};
                $home =~ s/\Q$installer::globals::separator\E\s*$//;
                $installer::globals::localinstalldir =~ s/~/$home/;
-               my $infoline = "Info: Changing LOCALINSTALLDIR to 
$installer::globals::localinstalldir\n";
-               push(@installer::globals::logfileinfo, $infoline);
+        $installer::logger::Lang->printf("Info: Changing LOCALINSTALLDIR to 
%s\n", $installer::globals::localinstalldir);
        }
        else
        {
-               # exit, because "~" is not allowed, if HOME is not set          
        
-               my $infoline = "ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", 
environment variable \"HOME\" needs to be defined!\n";
-               push(@installer::globals::logfileinfo, $infoline);
+               # exit, because "~" is not allowed, if HOME is not set
+        $installer::logger::Lang->printf("ERROR: If \"~\" is used in 
\"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!\n");
                installer::exiter::exit_program("ERROR: If \"~\" is used in 
\"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!", 
"check_tilde_in_directory");
        }       
 }


Reply via email to