diff options
author | Ingo Schmidt <is@openoffice.org> | 2010-11-16 17:54:58 +0100 |
---|---|---|
committer | Ingo Schmidt <is@openoffice.org> | 2010-11-16 17:54:58 +0100 |
commit | 19efa02325599168825fa19657e95c264865406e (patch) | |
tree | cc3c74a3237434776501066ee0e0086254cf6c51 /solenv/bin | |
parent | 78f0b2da45c3d20f66a0c8b31a73d1c0b0f7e3a4 (diff) |
native347 #i114640# workaround for allowed errors in logfiles
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/modules/installer/control.pm | 32 | ||||
-rw-r--r-- | solenv/bin/modules/installer/environment.pm | 1 | ||||
-rw-r--r-- | solenv/bin/modules/installer/globals.pm | 1 |
3 files changed, 33 insertions, 1 deletions
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm index bd700be38758..20bc2efdcf4f 100644 --- a/solenv/bin/modules/installer/control.pm +++ b/solenv/bin/modules/installer/control.pm @@ -329,6 +329,11 @@ sub check_logfile 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; } + for ( my $i = 0; $i <= $#{$logfile}; $i++ ) { my $line = ${$logfile}[$i]; @@ -346,6 +351,12 @@ sub check_logfile { $contains_error = 1; push(@errors, $line); + + if ( $ignore_error ) + { + $contains_error = 0; + $make_error_to_warning = 1; + } } } @@ -368,7 +379,26 @@ sub check_logfile } else { - my $line = "\n***********************************************************\n"; + 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); diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm index 98bdffb3122a..c0d166081032 100644 --- a/solenv/bin/modules/installer/environment.pm +++ b/solenv/bin/modules/installer/environment.pm @@ -128,6 +128,7 @@ sub set_global_environment_variables if ( $ENV{'SOLAR_JAVA'} ) { $installer::globals::solarjavaset = 1; } if ( $ENV{'RPM'} ) { $installer::globals::rpm = $ENV{'RPM'}; } if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; } + if ( $ENV{'IGNORE_ERROR_IN_LOGFILE'} ) { $installer::globals::ignore_error_in_logfile = 1; } if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; } if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; } diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 7d6e8c4a9b8f..144cf4c88a4b 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -243,6 +243,7 @@ BEGIN @logfileinfo = (); @errorlogfileinfo = (); @globallogfileinfo = (); + $ignore_error_in_logfile = 0; $exitlog = ""; $globalinfo_copied = 0; $quiet = 0; |