[Libreoffice-commits] .: solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 27 14:06:26 PDT 2012


 solenv/bin/modules/installer.pm              |    3 +--
 solenv/bin/modules/installer/archivefiles.pm |    5 ++---
 solenv/bin/modules/installer/environment.pm  |    3 +--
 solenv/bin/modules/installer/profiles.pm     |    3 +--
 4 files changed, 5 insertions(+), 9 deletions(-)

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

    installer: Replace various uses of exit_program with die
    
    Change-Id: I1b16de6b01e34afb19bc394f33f16eef08b1703e

diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 2c1f855..54b64b0 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -40,7 +40,6 @@ use installer::copyproject;
 use installer::download;
 use installer::environment;
 use installer::epmfile;
-use installer::exiter;
 use installer::files;
 use installer::globals;
 use installer::helppack;
@@ -273,7 +272,7 @@ sub run {
     my $includepathref = installer::ziplist::getinfofromziplist($allsettingsarrayref, "include");
     if ( $$includepathref eq "" )
     {
-        installer::exiter::exit_program("ERROR: Definition for \"include\" not found in $installer::globals::ziplistname", "Main");
+        die 'Definition for "include" not found in ' . $installer::globals::ziplistname;
     }
 
     my $includepatharrayref = installer::converter::convert_stringlist_into_array($includepathref, ",");
diff --git a/solenv/bin/modules/installer/archivefiles.pm b/solenv/bin/modules/installer/archivefiles.pm
index 066aed0..6862c6f 100644
--- a/solenv/bin/modules/installer/archivefiles.pm
+++ b/solenv/bin/modules/installer/archivefiles.pm
@@ -28,7 +28,6 @@
 package installer::archivefiles;
 
 use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
-use installer::exiter;
 use installer::files;
 use installer::globals;
 use installer::logger;
@@ -277,7 +276,7 @@ sub resolving_archive_flag
             {
                 if ( $installer::globals::dounzip )         # really unpacking the files
                 {
-                    if ( $zip->extractTree("", $unzipdir) != AZ_OK ) { installer::exiter::exit_program("ERROR: $infoline", "resolving_archive_flag"); }
+                    if ( $zip->extractTree("", $unzipdir) != AZ_OK ) { die "Could not unzip: $!"; }
 
                     if (( $^O =~ /cygwin/i ) && ( $contains_dll ))
                     {
@@ -533,7 +532,7 @@ sub resolving_archive_flag
 
                     if ( $maxcounter == 5 ) # exiting the program
                     {
-                        installer::exiter::exit_program("ERROR: Failed to unzip $sourcepath !", "resolving_archive_flag");
+                        die "Failed to unzip $sourcepath !";
                     }
                 }
                 else
diff --git a/solenv/bin/modules/installer/environment.pm b/solenv/bin/modules/installer/environment.pm
index b0c541b..a0cf5f3 100644
--- a/solenv/bin/modules/installer/environment.pm
+++ b/solenv/bin/modules/installer/environment.pm
@@ -27,7 +27,6 @@
 
 package installer::environment;
 
-use installer::exiter;
 use installer::globals;
 
 ######################################################
@@ -94,7 +93,7 @@ sub check_tilde_in_directory
         # exit, because "~" is not allowed, if HOME is not set
         my $infoline = "ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!\n";
         push(@installer::globals::logfileinfo, $infoline);
-        installer::exiter::exit_program("ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!", "check_tilde_in_directory");
+        die 'If "~" is used in "LOCALINSTALLDIR", environment variable "HOME" needs to be defined!';
     }
 }
 
diff --git a/solenv/bin/modules/installer/profiles.pm b/solenv/bin/modules/installer/profiles.pm
index ef0ce7d..7b621f7 100644
--- a/solenv/bin/modules/installer/profiles.pm
+++ b/solenv/bin/modules/installer/profiles.pm
@@ -28,7 +28,6 @@
 package installer::profiles;
 
 use installer::converter;
-use installer::exiter;
 use installer::files;
 use installer::globals;
 use installer::logger;
@@ -98,7 +97,7 @@ sub add_profile_into_filelist
     if ( $allvariables->{'GLOBALFILEGID'} ) { $vclgid = $allvariables->{'GLOBALFILEGID'}; }
     my ($vclfile) = grep {$_->{gid} eq $vclgid} @{$filesarrayref};
     if (! defined $vclfile) {
-        installer::exiter::exit_program("ERROR: Could not find file $vclgid in list of files!", "add_profile_into_filelist");
+        die "Could not find file $vclgid in list of files!";
     }
 
     # copying all base data


More information about the Libreoffice-commits mailing list