Another minor cleanup, related to fdo#39747.
-Removing some completely unused global variables.
-Removing the $exiter exit handling function hook (nothing exists
which could assign it a function reference).
-Demoting $packjobref to a local variable in make_installer.pl (only
mentioned twice; a global is overkill here).
LGPLv3+/MPL
Jordan Ayers
From fd8df702c4b606aeaca0c9252428e27663e26ce4 Mon Sep 17 00:00:00 2001
From: Jordan Ayers <jordan.ayers@gmail.com>
Date: Sat, 13 Aug 2011 22:49:11 -0500
Subject: [PATCH] Clean up globals in make_installer.pl
Reduce scope of $packjobref.
Remove $exithandler and its shutdown check, since no handler was ever assigned.
Remove some unused install::global:: variables.
---
solenv/bin/make_installer.pl | 4 ++--
solenv/bin/modules/installer/exiter.pm | 4 ----
solenv/bin/modules/installer/globals.pm | 6 ------
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 561dcef..bb7c684 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -2282,7 +2282,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my $ddfdir = installer::systemactions::create_directories("ddf", $languagestringref);
- $installer::globals::packjobref =
installer::windows::msiglobal::generate_cab_file_list($filesinproductlanguageresolvedarrayref,
$installdir, $ddfdir, $allvariableshashref);
+ my $packjobref =
installer::windows::msiglobal::generate_cab_file_list($filesinproductlanguageresolvedarrayref,
$installdir, $ddfdir, $allvariableshashref);
# Update and patch reasons the pack order needs to be saved
installer::windows::msiglobal::save_packorder();
@@ -2307,7 +2307,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::iswin ) # only possible on a Windows platform
{
installer::logger::print_message( "... packaging installation set ... \n" );
- installer::windows::msiglobal::execute_packaging($installer::globals::packjobref,
$loggingdir, $allvariableshashref);
+ installer::windows::msiglobal::execute_packaging($packjobref, $loggingdir,
$allvariableshashref);
if ( $installer::globals::include_cab_in_msi ) {
installer::windows::msiglobal::include_cabs_into_msi($installdir); }
####################################
diff --git a/solenv/bin/modules/installer/exiter.pm b/solenv/bin/modules/installer/exiter.pm
index d5976f4..fa9aeb4 100644
--- a/solenv/bin/modules/installer/exiter.pm
+++ b/solenv/bin/modules/installer/exiter.pm
@@ -103,10 +103,6 @@ sub exit_program
installer::logger::stoptime();
- if (defined($installer::globals::exithandler)) {
- &$installer::globals::exithandler;
- }
-
exit(-1);
}
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index ace634a..eeb3760 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -104,8 +104,6 @@ BEGIN
$ziplistname = "";
$pathfilename = "";
$setupscriptname = "";
- $headerfilename = "";
- $shellscriptsfilename = "";
$product = "";
$languagelist = "";
$added_english = 0;
@@ -150,7 +148,6 @@ BEGIN
$unpackpath = "";
$idttemplatepath = "";
$idtlanguagepath = "";
- $packjobref = "";
$buildid = "Not set";
$guidcounter = 1000; # for uniqueness of guids
$fontsfolder = "FontsFolder";
@@ -221,7 +218,6 @@ BEGIN
$makelinuxlinkrpm = 0;
$linuxlinkrpmprocess = 0;
$add_required_package = "";
- $linuxrespin = 0;
@linuxpatchfiles = ();
$linuxlibrarybaselevel = "1";
$linuxlibrarypatchlevel = "1.1";
@@ -498,8 +494,6 @@ BEGIN
@emptypackages = ();
%fontpackageexists = ();
- $exithandler = undef;
-
$plat = $^O;
if ( $plat =~ /cygwin/i )
--
1.7.4.1
Context
- [Libreoffice] [PATCH] Remove unused globals from make_installer.pl · Jordan Ayers
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.