[Libreoffice-commits] .: Branch 'libreoffice-3-3' - scp2/source solenv/bin

Michael Meeks mmeeks at kemper.freedesktop.org
Wed Dec 15 12:57:06 PST 2010


 scp2/source/ooo/installation_ooo.scp            |    1 +
 solenv/bin/modules/installer/setupscript.pm     |    2 +-
 solenv/bin/modules/installer/windows/feature.pm |    3 ++-
 solenv/bin/modules/installer/worker.pm          |    5 +++--
 solenv/bin/modules/installer/ziplist.pm         |    2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 81f23d41a554bbf81700e7daf7b40fb5078cd0ce
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Wed Dec 15 20:56:53 2010 +0000

    add BrOffice productname_br variant and sorted substitution

diff --git a/scp2/source/ooo/installation_ooo.scp b/scp2/source/ooo/installation_ooo.scp
index 26bdc09..b99fc2c 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 b221051..2446a4c 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 3830dc1..c688474 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 28745cc..f4c5398 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 fdbb3a9..40f5557 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};
             


More information about the Libreoffice-commits mailing list