diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-22 10:55:12 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-22 10:55:12 +0200 |
commit | 8e9fb8649cd5f97c98cd44a6925a94598c8e35c8 (patch) | |
tree | efe00f46dd61acde209983e9c79aee8352cdbf06 /solenv/bin/modules/installer | |
parent | c4ac5d0800bdc069901474a0dc9eb8d5f36c093e (diff) | |
parent | fcf62b49c0d37a7b31af23e8c0a29087125da03a (diff) |
CWS changehid: resync to m85
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r-- | solenv/bin/modules/installer/control.pm | 10 | ||||
-rw-r--r-- | solenv/bin/modules/installer/epmfile.pm | 55 | ||||
-rw-r--r-- | solenv/bin/modules/installer/globals.pm | 1 | ||||
-rw-r--r-- | solenv/bin/modules/installer/parameter.pm | 2 | ||||
-rw-r--r-- | solenv/bin/modules/installer/scriptitems.pm | 2 | ||||
-rw-r--r-- | solenv/bin/modules/installer/systemactions.pm | 26 |
6 files changed, 93 insertions, 3 deletions
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm index f4edc8129255..bd700be38758 100644 --- a/solenv/bin/modules/installer/control.pm +++ b/solenv/bin/modules/installer/control.pm @@ -405,6 +405,16 @@ sub determine_ship_directory my $shipdrive = $ENV{'SHIPDRIVE'}; my $languagestring = $$languagesref; + + if (length($languagestring) > $installer::globals::max_lang_length ) + { + my $number_of_languages = installer::systemactions::get_number_of_langs($languagestring); + chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`); + # $languagestring = $shorter; + my $id = substr($shorter, 0, 8); # taking only the first 8 digits + $languagestring = "lang_" . $number_of_languages . "_id_" . $id; + } + my $productstring = $installer::globals::product; my $productsubdir = ""; diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index 136eca913dd9..f8e35f208251 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -2308,6 +2308,55 @@ sub determine_rpm_version return $rpmversion; } +#################################################### +# Writing some info about rpm into the log file +#################################################### + +sub log_rpm_info +{ + my $systemcall = ""; + my $infoline = ""; + + $infoline = "\nLogging rpmrc content using --showrc\n\n"; + push( @installer::globals::logfileinfo, $infoline); + + if ( $installer::globals::rpm ne "" ) + { + $systemcall = "$installer::globals::rpm --showrc |"; + } + else + { + $systemcall = "rpm --showrc |"; + } + + my @fullrpmout = (); + + open (RPM, "$systemcall"); + while (<RPM>) {push(@fullrpmout, $_); } + close (RPM); + + if ( $#fullrpmout > -1 ) + { + for ( my $i = 0; $i <= $#fullrpmout; $i++ ) + { + my $rpmout = $fullrpmout[$i]; + $rpmout =~ s/\s*$//g; + + $infoline = "$rpmout\n"; + $infoline =~ s/error/e_r_r_o_r/gi; # avoiding log problems + push( @installer::globals::logfileinfo, $infoline); + } + } + else + { + $infoline = "Problem in systemcall: $systemcall : No return value\n"; + push( @installer::globals::logfileinfo, $infoline); + } + + $infoline = "End of logging rpmrc\n\n"; + push( @installer::globals::logfileinfo, $infoline); +} + ################################################# # Systemcall to start the packaging process ################################################# @@ -2560,6 +2609,12 @@ sub create_packages_without_epm mkdir($buildroot = $dir . "/" . $epmdir . "BUILD/"); } + if ( ! $installer::globals::rpminfologged ) + { + log_rpm_info(); + $installer::globals::rpminfologged = 1; + } + my $systemcall = "$rpmcommand -bb --define \"_unpackaged_files_terminate_build 0\" $specfilename --target $target $buildrootstring 2\>\&1 |"; installer::logger::print_message( "... $systemcall ...\n" ); diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 71429e278f4e..ccef960e0337 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -179,6 +179,7 @@ BEGIN $rpm = ""; $rpmcommand = ""; $rpmquerycommand = ""; + $rpminfologged = 0; $debian = ""; $installertypedir = ""; $controlledmakecabversion = "5"; diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm index 0961b598902f..d3ce8a1d3a32 100644 --- a/solenv/bin/modules/installer/parameter.pm +++ b/solenv/bin/modules/installer/parameter.pm @@ -530,7 +530,7 @@ sub control_required_parameter # and the UpgradeCode for the product are defined. # The name "codes.txt" can be overwritten in Product definition with CODEFILENAME (msiglobal.pm) - if ($installer::globals::iswindowsbuild) + if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::packageformat ne "archive" ) && ( $installer::globals::packageformat ne "installed" )) { $installer::globals::codefilename = $installer::globals::idttemplatepath . $installer::globals::separator . $installer::globals::codefilename; installer::files::check_file($installer::globals::codefilename); diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index a073e60a6697..7a2c4cb3f5e3 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -1868,7 +1868,7 @@ sub remove_Languagepacklibraries_from_Installset } $infoline = "\n"; - push( @installer::globals::logfileinfo, $infoline); + push( @installer::globals::globallogfileinfo, $infoline); return \@newitemsarray; } diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm index 981dc40f3209..24b070574189 100644 --- a/solenv/bin/modules/installer/systemactions.pm +++ b/solenv/bin/modules/installer/systemactions.pm @@ -292,6 +292,27 @@ sub remove_empty_directory } ####################################################################### +# Calculating the number of languages in the string +####################################################################### + +sub get_number_of_langs +{ + my ($languagestring) = @_; + + my $number = 1; + + my $workstring = $languagestring; + + while ( $workstring =~ /^\s*(.*)_(.*?)\s*$/ ) + { + $workstring = $1; + $number++; + } + + return $number; +} + +####################################################################### # Creating the directories, in which files are generated or unzipped ####################################################################### @@ -380,8 +401,11 @@ sub create_directories if (length($languagestring) > $installer::globals::max_lang_length ) { + my $number_of_languages = get_number_of_langs($languagestring); chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`); - $languagestring = $shorter; + # $languagestring = $shorter; + my $id = substr($shorter, 0, 8); # taking only the first 8 digits + $languagestring = "lang_" . $number_of_languages . "_id_" . $id; } $path = $path . $languagestring . $installer::globals::separator; |