summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-12-15 20:56:53 +0000
committerMichael Meeks <michael.meeks@novell.com>2010-12-15 20:56:53 +0000
commit81f23d41a554bbf81700e7daf7b40fb5078cd0ce (patch)
treed27dc649c69c517e80b0648b5c8e4936b4726e29
parent5edc3b2ebb581fa2c91e01124c6a4c8aa0ebcdfd (diff)
add BrOffice productname_br variant and sorted substitution
-rw-r--r--scp2/source/ooo/installation_ooo.scp1
-rw-r--r--solenv/bin/modules/installer/setupscript.pm2
-rw-r--r--solenv/bin/modules/installer/windows/feature.pm3
-rw-r--r--solenv/bin/modules/installer/worker.pm5
-rw-r--r--solenv/bin/modules/installer/ziplist.pm2
5 files changed, 8 insertions, 5 deletions
diff --git a/scp2/source/ooo/installation_ooo.scp b/scp2/source/ooo/installation_ooo.scp
index 26bdc09ed..b99fc2caa 100644
--- a/scp2/source/ooo/installation_ooo.scp
+++ b/scp2/source/ooo/installation_ooo.scp
@@ -29,6 +29,7 @@
Installation gid_Installation_Ooo
ProductName = "${PRODUCTNAME}";
+ ProductName_Br = "${PRODUCTNAME_BR}";
ProductVersion = "${PRODUCTVERSION}";
ProductExtension = "${PRODUCTEXTENSION}";
OOoBaseVersion = "${OOOBASEVERSION}";
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index b22105104..2446a4ca1 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -272,7 +272,7 @@ sub replace_all_setupscriptvariables_in_script
my $bigstring = '';
for my $line (@{$scriptref}) { $bigstring = $bigstring . $line; }
- foreach my $key ( keys %subs )
+ foreach my $key (sort { length ($b) <=> length ($a) } keys %subs)
{
# Attention: It must be possible to substitute "%PRODUCTNAMEn", "%PRODUCTNAME%PRODUCTVERSIONabc"
my $value = $subs{$key};
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index 3830dc1c3..c68847477 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -218,7 +218,8 @@ sub replace_variables
{
my ($translationfile, $variableshashref) = @_;
- foreach $key (keys %{$variableshashref})
+ # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
replace_one_variable($translationfile, $value, $key);
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 28745cc46..f4c5398a6 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -1743,10 +1743,11 @@ sub replace_variables_in_string
my ( $string, $variableshashref ) = @_;
if ( $string =~ /^.*\%\w+.*$/ )
- {
+ {
my $key;
- foreach $key (keys %{$variableshashref})
+ # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};
$key = "\%" . $key;
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index fdbb3a951..40f555741 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -464,7 +464,7 @@ sub replace_all_variables_in_pathes
my $key;
- foreach $key (keys %{$variableshashref})
+ foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
{
my $value = $variableshashref->{$key};