[Libreoffice-commits] .: solenv/bin

Tim Retout timretout at kemper.freedesktop.org
Wed Mar 14 16:20:38 PDT 2012


 solenv/bin/make_installer.pl          |    7 +++++--
 solenv/bin/modules/installer/files.pm |   28 ----------------------------
 2 files changed, 5 insertions(+), 30 deletions(-)

New commits:
commit 859f601e10f876b2121fbbf6a65d66d017c77d8c
Author: Tim Retout <tim at retout.co.uk>
Date:   Wed Mar 14 23:17:19 2012 +0000

    Replace installer::files::save_array_of_hashes with Data::Dumper.
    
    Note that this will change the format of the fileinfo log, hopefully
    making it a bit more human-readable.

diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index a7d45fd..1d1b7a7 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -32,6 +32,7 @@
 use lib ("$ENV{SOLARENV}/bin/modules");
 
 use Cwd;
+use Data::Dumper;
 use File::Copy;
 use installer::archivefiles;
 use installer::control;
@@ -1999,8 +2000,10 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
     }    # end of "if ( $installer::globals::iswindowsbuild )"
 
     # saving file_info file for later analysis
-    my $speciallogfilename = "fileinfo_" . $installer::globals::product . "\.log";
-    installer::files::save_array_of_hashes($loggingdir . $speciallogfilename, $filesinproductlanguageresolvedarrayref);
+    my $speciallogfilename = $loggingdir . "fileinfo_" . $installer::globals::product . "\.log";
+    open my $log_fh, '>', $speciallogfilename
+        or die "Could not open $speciallogfilename for writing: $!";
+    print $log_fh Dumper($filesinproductlanguageresolvedarrayref);
 
 }   # end of iteration for one language group
 
diff --git a/solenv/bin/modules/installer/files.pm b/solenv/bin/modules/installer/files.pm
index 1d9e770..26715ed 100644
--- a/solenv/bin/modules/installer/files.pm
+++ b/solenv/bin/modules/installer/files.pm
@@ -95,34 +95,6 @@ sub save_file
     }
 }
 
-sub save_array_of_hashes
-{
-    my ($savefile, $arrayref) = @_;
-
-    my @printcontent = ();
-
-    for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
-    {
-        my $line = "";
-        my $hashref = ${$arrayref}[$i];
-        my $itemkey;
-
-        foreach $itemkey ( keys %{$hashref} )
-        {
-            my $itemvalue = $hashref->{$itemkey};
-            $line = $line . $itemkey . "=" . $itemvalue . "\t";
-        }
-
-        $line = $line . "\n";
-
-        push(@printcontent, $line);
-    }
-
-    open( OUT, ">$savefile" ) || installer::exiter::exit_program("ERROR: Cannot open file $savefile for writing", "save_array_of_hashes");
-    print OUT @printcontent;
-    close( OUT);
-}
-
 ###########################################
 # Binary file operations
 ###########################################


More information about the Libreoffice-commits mailing list