summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer/epmfile.pm
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-05-21 07:23:30 +0000
committerKurt Zenker <kz@openoffice.org>2008-05-21 07:23:30 +0000
commita925cabb1eaba5343fa7821071f41a693527575c (patch)
treeffeb4202f7e698aa1311121a74c3f6934772733b /solenv/bin/modules/installer/epmfile.pm
parent7763246368b31ee039985eb4c29d411a4d092bb8 (diff)
INTEGRATION: CWS jl98_DEV300 (1.74.2.1.14); FILE MERGED
2008/05/05 15:04:55 is 1.74.2.1.14.1: #b6670785# volatile flag for java xml file
Diffstat (limited to 'solenv/bin/modules/installer/epmfile.pm')
-rw-r--r--solenv/bin/modules/installer/epmfile.pm43
1 files changed, 42 insertions, 1 deletions
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index b160636afcea..b69d4bac25a1 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -8,7 +8,7 @@
#
# $RCSfile: epmfile.pm,v $
#
-# $Revision: 1.82 $
+# $Revision: 1.83 $
#
# This file is part of OpenOffice.org.
#
@@ -1340,6 +1340,46 @@ sub make_prototypefile_relocatable
}
}
+
+#########################################################################
+# In scp the flag VOLATEFILE can be used. This shall lead to style "v"
+# in Solaris prototype file. This is not supported by epm and has
+# therefore to be included in prototypefile, not in epm list file.
+#########################################################################
+
+sub set_volatilefile_into_prototypefile
+{
+ my ($prototypefile, $filesref) = @_;
+
+ for ( my $i = 0; $i <= $#{$filesref}; $i++ )
+ {
+ my $onefile = ${$filesref}[$i];
+
+ my $styles = "";
+ if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
+
+ if ( $styles =~ /\bVOLATILEFILE\b/ )
+ {
+ my $sourcepath = $onefile->{'sourcepath'};
+
+ for ( my $j = 0; $j <= $#{$prototypefile}; $j++ )
+ {
+ if (( ${$prototypefile}[$j] =~ /^\s*f\s+none\s+/ ) && ( ${$prototypefile}[$j] =~ /\=\Q$sourcepath\E\s+/ ))
+ {
+ my $oldline = ${$prototypefile}[$j];
+ ${$prototypefile}[$j] =~ s/^\s*f/v/;
+ my $newline = ${$prototypefile}[$j];
+ $oldline =~ s/\s*$//;
+ $newline =~ s/\s*$//;
+ my $infoline = "Volatile file: Changing content from \"$oldline\" to \"$newline\" .\n";
+ push(@installer::globals::logfileinfo, $infoline);
+ last;
+ }
+ }
+ }
+ }
+}
+
#########################################################################
# Replacing the variables in the Solaris patch shell scripts.
# Taking care, that multiple slashes are not always removed.
@@ -1916,6 +1956,7 @@ sub prepare_packages
my $prototypefile = installer::files::read_file($prototypefilename);
make_prototypefile_relocatable($prototypefile, $relocatablepath);
+ set_volatilefile_into_prototypefile($prototypefile, $filesref);
my $classesstring = set_tab_into_datafile($prototypefile, $filesref);
if ($classesstring)
{