[Libreoffice-commits] .: 2 commits - solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 27 12:40:50 PDT 2012


 solenv/bin/modules/installer/epmfile.pm       |   46 ++++++--------------------
 solenv/bin/modules/installer/systemactions.pm |   25 ++++++++++++++
 solenv/bin/modules/installer/worker.pm        |   31 +----------------
 3 files changed, 39 insertions(+), 63 deletions(-)

New commits:
commit 0ab561bffadad1eab9eb98c05106f4c0132ccb36
Author: Tim Retout <tim at retout.co.uk>
Date:   Thu Sep 27 19:22:32 2012 +0100

    installer: Move two copies of make_systemcall into systemactions.pm
    
    Change-Id: I526fae59d28e75d27259867e3fc7e7c99be0d437

diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 58bca0b..157e83d 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -2227,7 +2227,7 @@ sub create_packages_without_epm
                 my $pkginfoorig = "$destinationdir/$packagename/pkginfo";
                 my $pkginfotmp = "$destinationdir/$packagename" . ".pkginfo.tmp";
                 $systemcall = "cp -p $pkginfoorig $pkginfotmp";
-                 make_systemcall($systemcall);
+                installer::systemactions::make_systemcall($systemcall);
 
                 $faspac = $$compressorref;
                 $infoline = "Found compressor: $faspac\n";
@@ -2236,13 +2236,14 @@ sub create_packages_without_epm
                 installer::logger::print_message( "... $faspac ...\n" );
                 installer::logger::include_timestamp_into_logfile("Starting $faspac");
 
-                 $systemcall = "/bin/sh $faspac -a -q -d $destinationdir $packagename";  # $faspac has to be the absolute path!
-                 make_systemcall($systemcall);
+                $systemcall = "/bin/sh $faspac -a -q -d $destinationdir $packagename";  # $faspac has to be the absolute path!
+                installer::systemactions::make_systemcall($systemcall);
 
-                 # Setting time stamp for pkginfo, because faspac-so.sh changed the pkginfo file,
-                 # updated the size and checksum, but not the time stamp.
-                 $systemcall = "touch -r $pkginfotmp $pkginfoorig";
-                 make_systemcall($systemcall);
+                # Setting time stamp for pkginfo, because faspac-so.sh
+                # changed the pkginfo file, updated the size and
+                # checksum, but not the time stamp.
+                $systemcall = "touch -r $pkginfotmp $pkginfoorig";
+                installer::systemactions::make_systemcall($systemcall);
                 if ( -f $pkginfotmp ) { unlink($pkginfotmp); }
 
                 installer::logger::include_timestamp_into_logfile("End of $faspac");
@@ -2530,31 +2531,6 @@ sub remove_temporary_epm_files
     }
 }
 
-######################################################
-# Making the systemcall
-######################################################
-
-sub make_systemcall
-{
-    my ($systemcall) = @_;
-
-    my $returnvalue = system($systemcall);
-
-    my $infoline = "Systemcall: $systemcall\n";
-    push( @installer::globals::logfileinfo, $infoline);
-
-    if ($returnvalue)
-    {
-        $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-        push( @installer::globals::logfileinfo, $infoline);
-    }
-    else
-    {
-        $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-        push( @installer::globals::logfileinfo, $infoline);
-    }
-}
-
 ###########################################################
 # Creating a better directory structure in the solver.
 ###########################################################
@@ -2683,11 +2659,11 @@ sub unpack_tar_gz_file
 
         # unpacking gunzip
         my $systemcall = "cd $destdir; cat $packagename | gunzip | tar -xf -";
-        make_systemcall($systemcall);
+        installer::systemactions::make_systemcall($systemcall);
 
         # deleting the tar.gz files
         $systemcall = "cd $destdir; rm -f $packagename";
-        make_systemcall($systemcall);
+        installer::systemactions::make_systemcall($systemcall);
 
         # Finding new content -> that is the package name
         my ($newcontent, $allcontent ) = installer::systemactions::find_new_content_in_directory($destdir, $oldcontent);
@@ -2709,7 +2685,7 @@ sub copy_and_unpack_tar_gz_files
     my ($sourcefile, $destdir) = @_;
 
     my $systemcall = "cd $destdir; cat $sourcefile | gunzip | tar -xf -";
-    make_systemcall($systemcall);
+    installer::systemactions::make_systemcall($systemcall);
 }
 
 ######################################################
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm
index 702b6fe..22d83fb 100644
--- a/solenv/bin/modules/installer/systemactions.pm
+++ b/solenv/bin/modules/installer/systemactions.pm
@@ -1358,4 +1358,29 @@ sub remove_empty_dirs_in_folder
 
 }
 
+######################################################
+# Making systemcall
+######################################################
+
+sub make_systemcall
+{
+    my ($systemcall) = @_;
+
+    my $returnvalue = system($systemcall);
+
+    my $infoline = "Systemcall: $systemcall\n";
+    push( @installer::globals::logfileinfo, $infoline);
+
+    if ($returnvalue)
+    {
+        $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+        push( @installer::globals::logfileinfo, $infoline);
+    }
+    else
+    {
+        $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+        push( @installer::globals::logfileinfo, $infoline);
+    }
+}
+
 1;
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index b6a1959..f860f63 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -871,31 +871,6 @@ sub replace_variables_in_string
     return $string;
 }
 
-######################################################
-# Making systemcall
-######################################################
-
-sub make_systemcall
-{
-    my ($systemcall) = @_;
-
-    my $returnvalue = system($systemcall);
-
-    my $infoline = "Systemcall: $systemcall\n";
-    push( @installer::globals::logfileinfo, $infoline);
-
-    if ($returnvalue)
-    {
-        $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
-        push( @installer::globals::logfileinfo, $infoline);
-    }
-    else
-    {
-        $infoline = "Success: Executed \"$systemcall\" successfully!\n";
-        push( @installer::globals::logfileinfo, $infoline);
-    }
-}
-
 #################################################################
 # Copying the files defined as ScpActions into the
 # installation set.
@@ -1419,7 +1394,7 @@ sub collectpackagemaps
     my $tarfilename = $subdirname . ".tar";
     my $targzname = $tarfilename . ".gz";
     $systemcall = "cd $pkgmapdir; tar -cf - $subdirname | gzip > $targzname";
-    make_systemcall($systemcall);
+    installer::systemactions::make_systemcall($systemcall);
     installer::systemactions::remove_complete_directory($pkgmapsubdir, 1);
 }
 
commit b45263ad292801fd4b32a2f5183508cf4ad7f885
Author: Tim Retout <tim at retout.co.uk>
Date:   Thu Sep 27 18:39:21 2012 +0100

    installer::worker: Hide save_patchlist_file
    
    Change-Id: If871ef19e81664185247809bd3e5d53e756a8c0d

diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index cb205b4..b6a1959 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -99,7 +99,7 @@ sub create_nopatchlist
 # Saving the patchlist file
 #########################################
 
-sub save_patchlist_file
+sub _save_patchlist_file
 {
     my ($installlogdir, $patchlistfilename) = @_;
 
@@ -221,7 +221,7 @@ sub analyze_and_save_logfile
     installer::files::save_file($installlogdir . $installer::globals::separator . $numberedlogfilename, \@installer::globals::logfileinfo);
 
     # Saving the list of patchfiles in a patchlist directory in the install directory
-    if (( $installer::globals::patch ) || ( $installer::globals::creating_windows_installer_patch )) { installer::worker::save_patchlist_file($installlogdir, $numberedlogfilename); }
+    if (( $installer::globals::patch ) || ( $installer::globals::creating_windows_installer_patch )) { _save_patchlist_file($installlogdir, $numberedlogfilename); }
 
     if ( $installer::globals::creating_windows_installer_patch ) { $installer::globals::creating_windows_installer_patch = 0; }
 


More information about the Libreoffice-commits mailing list