From 9d283b485c975fff7016b9c7e7b07d99757509bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 9 Jul 2004 12:55:15 +0000 Subject: [PATCH] #i10000# Fix by IS --- solenv/bin/modules/installer/archivefiles.pm | 44 +++++++++++++++++-- .../modules/installer/windows/idtglobal.pm | 6 +-- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm index 0ad20d543de9..350615450cd0 100644 --- a/solenv/bin/modules/installer/archivefiles.pm +++ b/solenv/bin/modules/installer/archivefiles.pm @@ -2,9 +2,9 @@ # # $RCSfile: archivefiles.pm,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: rt $ $Date: 2004-07-06 14:55:31 $ +# last change: $Author: rt $ $Date: 2004-07-09 13:55:15 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -91,8 +91,13 @@ sub resolving_archive_flag installer::logger::include_header_into_logfile("Files with flag ARCHIVE:"); + my $repeat_unzip = 0; + my $maxcounter = 0; + for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ ) { + if ( $repeat_unzip ) { $i--; } # decreasing the counter + my $onefile = ${$filesarrayref}[$i]; my $styles = ""; @@ -132,7 +137,6 @@ sub resolving_archive_flag if ( $installer::globals::dounzip ) { installer::systemactions::create_directory($unzipdir); } # creating subdirectories with the names of the zipfiles - $systemcall = "$installer::globals::unzippath -l $sourcepath |"; open (UNZIP, "$systemcall"); my @zipfile = ; @@ -182,6 +186,7 @@ sub resolving_archive_flag } my $zipfileref = \@zipfile; + my $unziperror = 0; # Format: Length, Date, Time, Name # This includes new destination directories! @@ -233,10 +238,41 @@ sub resolving_archive_flag $newfile{'destination'} = $destination . $zipname; $newfile{'sourcepath'} = $unzipdir . $zipname; - push(@newallfilesarray, \%newfile); + my $sourcefiletest = $unzipdir . $zipname; + if ( ! -f $sourcefiletest ) + { + $infoline = "ATTENTION: Unzip failed for $sourcefiletest!\n"; + push( @installer::globals::logfileinfo, $infoline); + $unziperror = 1; + } + + # only adding the new line into the files array, if not in repeat modus + + if ( ! $repeat_unzip ) { push(@newallfilesarray, \%newfile); } } } } + + if ( $unziperror ) + { + print "WARNING: Repeating to unpack $sourcepath! \n"; + $infoline = "ATTENTION: Repeating to unpack $sourcepath !\n"; + push( @installer::globals::logfileinfo, $infoline); + $repeat_unzip = 1; + $maxcounter++; + + if ( $maxcounter == 5 ) # exiting the program + { + installer::exiter::exit_program("ERROR: Failed to unzip $sourcepath !", "resolving_archive_flag"); + } + } + else + { + $infoline = "Info: $sourcepath unpacked without problems !\n"; + push( @installer::globals::logfileinfo, $infoline); + $repeat_unzip = 0; + $maxcounter = 0; + } } } else # nothing to do here, no zipped file (no ARCHIVE flag) diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index 13e229baa2e3..44bc483a3501 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -2,9 +2,9 @@ # # $RCSfile: idtglobal.pm,v $ # -# $Revision: 1.6 $ +# $Revision: 1.7 $ # -# last change: $Author: rt $ $Date: 2004-07-06 15:00:56 $ +# last change: $Author: rt $ $Date: 2004-07-09 13:54:58 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -447,7 +447,7 @@ sub get_language_string_from_language_block if ( $newstring eq "" ) { - $language = "en-US"; # defaulting to english + $language = "01"; # defaulting to english for ( my $i = 0; $i <= $#{$language_block}; $i++ ) {