summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-07-17 15:32:52 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-07-17 15:32:52 +0000
commit4eee8ec1899ba4414b82f7a4166226e14966bc1d (patch)
tree5eb9ee6079e31e46bcfb39c043721b9b91e0fc48
parentbf0f01a8b08a530892934ce60e0d37ba26bcb466 (diff)
INTEGRATION: CWS native168 (1.17.22); FILE MERGED
2008/07/11 14:07:30 is 1.17.22.3: #158211# force parameter for system integration packages 2008/07/11 08:23:08 is 1.17.22.2: #i91544# install order for system integration packages 2008/07/10 19:19:14 is 1.17.22.1: #i91544# install order for system integration packages
-rw-r--r--solenv/bin/modules/installer/xpdinstaller.pm50
1 files changed, 49 insertions, 1 deletions
diff --git a/solenv/bin/modules/installer/xpdinstaller.pm b/solenv/bin/modules/installer/xpdinstaller.pm
index 98f26ed67c2d..16da7510d397 100644
--- a/solenv/bin/modules/installer/xpdinstaller.pm
+++ b/solenv/bin/modules/installer/xpdinstaller.pm
@@ -8,7 +8,7 @@
#
# $RCSfile: xpdinstaller.pm,v $
#
-# $Revision: 1.17 $
+# $Revision: 1.18 $
#
# This file is part of OpenOffice.org.
#
@@ -31,6 +31,7 @@
package installer::xpdinstaller;
use Cwd;
+use installer::converter;
use installer::exiter;
use installer::globals;
use installer::languages;
@@ -375,6 +376,24 @@ sub get_isjavamodule_value
return $value;
}
+#####################################################################
+# Asking module, if installation shall use --force
+# scp style: USEFORCE (Linux only)
+#####################################################################
+
+sub get_useforce_value
+{
+ my ( $module ) = @_;
+
+ my $value = "false";
+
+ my $styles = "";
+ if ( $module->{'Styles'} ) { $styles = $module->{'Styles'}; }
+ if ( $styles =~ /\bUSEFORCE\b/ ) { $value = "true"; }
+
+ return $value;
+}
+
###################################################
# Asking module, if installation can fail
# scp style: INSTALLCANFAIL
@@ -1097,6 +1116,10 @@ sub get_file_content
$line = get_tag_line($doubleindent, "installcanfail", $value);
push(@xpdfile, $line);
+ $value = get_useforce_value($module);
+ $line = get_tag_line($doubleindent, "useforce", $value);
+ push(@xpdfile, $line);
+
# iterating over all languages to get names and descriptions
collect_lang_values($doubleindent, $module, \@xpdfile, "Name", "name");
collect_lang_values($doubleindent, $module, \@xpdfile, "Description", "description");
@@ -1470,6 +1493,7 @@ sub create_xpd_file_for_systemintegration
for ( my $i = 0; $i <= $#{$newcontent}; $i++ )
{
my $newpackagename = ${$newcontent}[$i];
+
# installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newpackagename);
my $infoline = "Creating xpd file for package: $newpackagename\n";
@@ -1477,6 +1501,7 @@ sub create_xpd_file_for_systemintegration
my $childmodule = installer::worker::copy_hash_from_references($module);
$childmodule->{'ParentID'} = $module->{'gid'}; # the module gid is the new parent
+ $childmodule->{'InstallOrder'} = $installer::globals::defaultsystemintinstallorder;
my $number = $i + 1;
my $modulegid = $module->{'gid'} . "_child_" . $number; # setting a dynamic new gid
$childmodule->{'gid'} = $modulegid;
@@ -1491,6 +1516,29 @@ sub create_xpd_file_for_systemintegration
$childmodule->{'Name'} = $modulegid;
$childmodule->{'Description'} = $modulegid;
+ # Checking, if installorder can be set:
+ # scp syntax: InstallOrder = "desktop:1050, suse:1060";
+ # The string before the number can be compared with $shortpackagename
+ if ( $module->{'InstallOrder'} )
+ {
+ my $installorder = $module->{'InstallOrder'};
+ $installorder =~ s/^\s*\"//g;
+ $installorder =~ s/\"\s*$//g;
+ # $installorder is comma separated list
+ my $allorders = installer::converter::convert_stringlist_into_array(\$installorder, ",");
+ for ( my $j = 0; $j <= $#{$allorders}; $j++ )
+ {
+ my $oneitem = ${$allorders}[$j];
+ if ( $oneitem =~ /^\s*(\S+?)\s*:\s*(\S+?)\s*$/ )
+ {
+ my $name = $1;
+ my $order = $2;
+
+ if ( $shortpackagename =~ /\Q$name\E/ ) { $childmodule->{'InstallOrder'} = $order; }
+ }
+ }
+ }
+
# all content saved in scp is now available and can be used to create the xpd file
my ( $xpdfile, $parentgid_ ) = get_file_content($childmodule, $newpackagename, "", 0, 0, $subdir, 0, "");