Author: af
Date: Mon Jan 20 09:00:29 2014
New Revision: 1559648

URL: http://svn.apache.org/r1559648
Log:
Fixed build breaker: Perl operator // not defined on all systems.

Modified:
    openoffice/trunk/main/solenv/bin/modules/installer/download.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm
    openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm

Modified: openoffice/trunk/main/solenv/bin/modules/installer/download.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/download.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/download.pm (original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/download.pm Mon Jan 20 
09:00:29 2014
@@ -829,13 +829,16 @@ sub resolve_variables_in_downloadname
 
        # Typical name: soa-{productversion}-{extension}-bin-{os}-{languages}
 
-       my $productversion = $allvariables->{'PRODUCTVERSION'} // "";
+       my $productversion = $allvariables->{'PRODUCTVERSION'};
+       $productversion = "" unless defined $productversion;
        $downloadname =~ s/\{productversion\}/$productversion/;
 
-       my $packageversion = $allvariables->{'PACKAGEVERSION'} // "";
+       my $packageversion = $allvariables->{'PACKAGEVERSION'};
+       $packageversion = "" unless defined $packageversion;
        $downloadname =~ s/\{packageversion\}/$packageversion/;
 
-       my $extension = $allvariables->{'SHORT_PRODUCTEXTENSION'} // "";
+       my $extension = $allvariables->{'SHORT_PRODUCTEXTENSION'};
+       $extension = "" unless defined $extension;
        $extension = lc($extension);
        $downloadname =~ s/\{extension\}/$extension/;
 
@@ -1047,11 +1050,12 @@ sub put_setup_ico_into_template
 
 sub put_publisher_into_template ($$)
 {
-       my ($templatefile, $variables) = @_;
+    my ($templatefile, $variables) = @_;
        
-    my $publisher = $variables->{'OOOVENDOR'} // "";
+    my $publisher = $variables->{'OOOVENDOR'};
+    $publisher = "" unless defined $publisher;
 
-       replace_one_variable($templatefile, "PUBLISHERPLACEHOLDER", $publisher);
+    replace_one_variable($templatefile, "PUBLISHERPLACEHOLDER", $publisher);
 }
 
 ##################################################################
@@ -1060,11 +1064,12 @@ sub put_publisher_into_template ($$)
 
 sub put_website_into_template ($$)
 {
-       my ($templatefile, $variables) = @_;
+    my ($templatefile, $variables) = @_;
 
-    my $website = $variables->{'STARTCENTER_INFO_URL'} // "";
+    my $website = $variables->{'STARTCENTER_INFO_URL'};
+    $website = "" unless defined $website;
 
-       replace_one_variable($templatefile, "WEBSITEPLACEHOLDER", $website);
+    replace_one_variable($templatefile, "WEBSITEPLACEHOLDER", $website);
 }
 
 ##################################################################

Modified: 
openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm Mon 
Jan 20 09:00:29 2014
@@ -104,64 +104,65 @@ sub get_file_component_directory_for_fil
 {
     my ($onefile, $dirref) = @_;
 
-       my $localstyles = $onefile->{'Styles'} // "";
-       
-       if ( $localstyles =~ /\bFONT\b/ )       # special handling for font 
files
-       {
-               return $installer::globals::fontsfolder;
-       }
-       
-       my $destdir = "";
-       
-       if ( $onefile->{'Dir'} ) { $destdir = $onefile->{'Dir'}; }
+    my $localstyles = $onefile->{'Styles'};
+    $localstyles = "" unless defined $localstyles;
+    
+    if ( $localstyles =~ /\bFONT\b/ )  # special handling for font files
+    {
+       return $installer::globals::fontsfolder;
+    }
+    
+    my $destdir = "";
+    
+    if ( $onefile->{'Dir'} ) { $destdir = $onefile->{'Dir'}; }
 
-       if ( $destdir =~ /\bPREDEFINED_OSSHELLNEWDIR\b/ )       # special 
handling for shellnew files
-       {
-               return $installer::globals::templatefolder;
-       }
+    if ( $destdir =~ /\bPREDEFINED_OSSHELLNEWDIR\b/ )  # special handling for 
shellnew files
+    {
+       return $installer::globals::templatefolder;
+    }
 
-       my $destination = $onefile->{'destination'};
-       
-       installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination);
+    my $destination = $onefile->{'destination'};
+    
+    installer::pathanalyzer::get_path_from_fullqualifiedname(\$destination);
 
-       $destination =~ s/\Q$installer::globals::separator\E\s*$//;
+    $destination =~ s/\Q$installer::globals::separator\E\s*$//;
 
-       # This path has to be defined in the directory collection at "HostName" 
+    # This path has to be defined in the directory collection at "HostName" 
 
     my $uniquedir = undef;
-       if ($destination eq "")         # files in the installation root
-       {
-               $uniquedir = "INSTALLLOCATION";
-       }               
-       else
-       {
-               my $found = 0;
+    if ($destination eq "")            # files in the installation root
+    {
+       $uniquedir = "INSTALLLOCATION";
+    }          
+    else
+    {
+       my $found = 0;
         foreach my $directory (@$dirref)
-               {
-                       if ($directory->{'HostName'} eq $destination)
-                       {
-                               $found = 1;
+       {
+           if ($directory->{'HostName'} eq $destination)
+           {
+               $found = 1;
                 $uniquedir = $directory->{'uniquename'};
-                               last;
-                       }       
-               }
+               last;
+           }   
+       }
 
-               if ( ! $found)
-               {
-                       installer::exiter::exit_program(
+       if ( ! $found)
+       {
+           installer::exiter::exit_program(
                 "ERROR: Did not find destination $destination in directory 
collection",
                 "get_file_component_directory");
-               }
+       }
 
-               if ( $uniquedir eq $installer::globals::officeinstalldirectory )
-               {
-                       $uniquedir = "INSTALLLOCATION";         
-               }
+       if ( $uniquedir eq $installer::globals::officeinstalldirectory )
+       {
+           $uniquedir = "INSTALLLOCATION";             
        }
+    }
 
-       $onefile->{'uniquedirname'} = $uniquedir;               # saving it in 
the file collection
+    $onefile->{'uniquedirname'} = $uniquedir;          # saving it in the file 
collection
 
-       return $uniquedir       
+    return $uniquedir  
 }
 
 ##############################################################

Modified: 
openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm Mon 
Jan 20 09:00:29 2014
@@ -366,7 +366,8 @@ sub create_unique_directorynames ($)
        {
         next if defined $directory->{'uniquename'};
 
-        my $styles = $directory->{'Styles'} // "";
+        my $styles = $directory->{'Styles'};
+        $styles = "" unless defined $styles;
 
                my ($originaluniquename, $uniquename) = get_unique_name(
             $directory->{'HostName'},

Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/feature.pm Mon 
Jan 20 09:00:29 2014
@@ -372,7 +372,8 @@ sub prepare_feature_table ($$$)
     foreach my $onefeature (@$modules)
     {
         # Java and Ada only, if the correct settings are set
-        my $styles = $onefeature->{'Styles'} // "";
+        my $styles = $onefeature->{'Styles'};
+        $styles = "" unless defined $styles;
         if (( $styles =~ /\bJAVAMODULE\b/ ) && ( ! 
($variables->{'JAVAPRODUCT'} ))) { next; }
 
         # Controlling the language!

Modified: 
openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm Mon 
Jan 20 09:00:29 2014
@@ -169,7 +169,8 @@ sub generate_cab_file_list ($$$$)
     write_ddf_file_header(\@ddffile, $cabinetfile, $installdir);
     foreach my $onefile (@sorted_files)
     {  
-        my $styles = $onefile->{'Styles'} // "";
+        my $styles = $onefile->{'Styles'};
+        $styles = "" unless defined $styles;
         if ($styles =~ /\bDONT_PACK\b/)
         {
             $installer::logger::Lang->printf("    excluding '%s' from ddf\n", 
$onefile->{'uniquename'});

Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm?rev=1559648&r1=1559647&r2=1559648&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm 
(original)
+++ openoffice/trunk/main/solenv/bin/modules/installer/windows/registry.pm Mon 
Jan 20 09:00:29 2014
@@ -84,7 +84,8 @@ sub get_registry_component_name
     # Previously that was the full version number as provided by 
'PRODUCTVERSION'.
     # But MSI patches introduce the restriction that component names must not 
change.
     # Use just the major version number.
-    my $version = $allvariables->{"BRANDPACKAGEVERSION"} // "";
+    my $version = $allvariables->{"BRANDPACKAGEVERSION"};
+    $version = "" unless defined $version;
     $addon .= $version;
        $addon = lc($addon);
        $addon =~ s/ //g;
@@ -386,7 +387,8 @@ sub prepare_registry_table ($$$)
                        $registry{'Component_'} = $component_name;
        
                        # Collecting all components with DONT_DELETE style
-                       my $style = $oneregistry->{'Styles'} // "";
+                       my $style = $oneregistry->{'Styles'};
+            $style = "" unless defined $style;
             $registry{'styles'} = $style;
 
                        if ( $style =~ /\bDONT_DELETE\b/ )


Reply via email to