Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


A few more patches under fdo#39747.

#1 and #3 just remove uncalled functions (some were never used in
master, some have been unused for a few years).

#2 removes an unused data copy from a registry entry handling loop in
a function on the Windows side; it's trivial, but I haven't tested it
myself.  (I'm running on an Ubuntu system; I suppose I should be able
to build a Windows Installation package from there and then test that
file on a Windows box...  I'll try to work through that or set up a
windows build so I can run some kind of test on those modules.)

The commit comments cover where to find last use (if any) in master,
or initial commit of the code (if it was never used).

LGPLv3+ / MPL.

Jordan Ayers
From 8a2ac510c7afea1f471da4935f25976f62fe06f6 Mon Sep 17 00:00:00 2001
From: Jordan Ayers <jordan.ayers@gmail.com>
Date: Wed, 24 Aug 2011 21:55:08 -0500
Subject: [PATCH 1/3] Remove some unused perl functions.

Added in CWS nativefixer5, but never used:
        installer::existence::filename_exists_in_filesarray
        installer::existence::filegid_exists_in_filesarray
Added in CWS native222, but never used:
        installer::downloadsigner::logfollowmeinfohash
Added in CWS newscpzip2, but never used:
        installer::converter::convert_hash_into_array
Added in 2004, used for a month, then dropped from usage:
        installer::converter::get_number_from_directory
---
 solenv/bin/modules/installer/converter.pm      |   25 ------------
 solenv/bin/modules/installer/downloadsigner.pm |   18 --------
 solenv/bin/modules/installer/existence.pm      |   50 ------------------------
 3 files changed, 0 insertions(+), 93 deletions(-)

diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm
index 53eb108..2fe728b 100644
--- a/solenv/bin/modules/installer/converter.pm
+++ b/solenv/bin/modules/installer/converter.pm
@@ -48,13 +48,6 @@ sub convert_array_to_hash
     return \%newhash;
 }
 
-sub convert_hash_into_array
-{
-    my ($hashref) = @_;
-
-    return [map { "$_ = $hashref->{$_}\n" } keys %{$hashref}];
-}
-
 #############################################################################
 # Converting a string list with separator $listseparator
 # into an array
@@ -217,24 +210,6 @@ sub combine_arrays_from_references_first_win
 }
 
 #################################################################
-# Returning the current ending number of a directory
-#################################################################
-
-sub get_number_from_directory
-{
-    my ( $directory ) = @_;
-
-    my $number = 0;
-
-    if ( $directory =~ /\_(\d+)\s*$/ )
-    {
-        $number = $1;
-    }
-
-    return $number;
-}
-
-#################################################################
 # Replacing separators, that are included into quotes
 #################################################################
 
diff --git a/solenv/bin/modules/installer/downloadsigner.pm 
b/solenv/bin/modules/installer/downloadsigner.pm
index 8a63242..d3af898 100644
--- a/solenv/bin/modules/installer/downloadsigner.pm
+++ b/solenv/bin/modules/installer/downloadsigner.pm
@@ -544,24 +544,6 @@ sub createproductlist
     return \@infofilelist;
 }
 
-#############################################
-# Logging the content of the download hash
-#############################################
-
-sub logfollowmeinfohash
-{
-    my ( $followmehash ) = @_;
-
-    print "\n*****************************************\n";
-    print "Content of follow-me info file:\n";
-    print "finalinstalldir: $followmehash->{'finalinstalldir'}\n";
-    print "downloadname: $followmehash->{'downloadname'}\n";
-    print "languagestring: $followmehash->{'languagestring'}\n";
-    foreach my $lang ( @{$followmehash->{'languagesarray'}} ) { print "languagesarray: $lang\n"; }
-    foreach my $path ( @{$followmehash->{'includepatharray'}} ) { print "includepatharray: $path"; 
}
-    foreach my $key ( sort keys %{$followmehash->{'allvariableshash'}} ) { print 
"allvariableshash: $key : $followmehash->{'allvariableshash'}->{$key}\n"; }
-}
-
 ########################################################################
 # Renaming the follow me info file, if it was successfully used.
 # This can only be done, if the parameter "-d" was used with a
diff --git a/solenv/bin/modules/installer/existence.pm b/solenv/bin/modules/installer/existence.pm
index 1ecf9ce..1f362f7 100644
--- a/solenv/bin/modules/installer/existence.pm
+++ b/solenv/bin/modules/installer/existence.pm
@@ -137,54 +137,4 @@ sub get_specified_file_by_name
     return $onefile;
 }
 
-#####################################################################
-# Checking existence of a specific file, defined by its "Name"
-#####################################################################
-
-sub filename_exists_in_filesarray
-{
-    my ($filesarrayref, $searchname) = @_;
-
-    my $foundfile = 0;
-
-    for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
-    {
-        my $onefile = ${$filesarrayref}[$i];
-        my $filename = $onefile->{'Name'};
-
-        if ( $filename eq $searchname )
-        {
-            $foundfile = 1;
-            last;
-        }
-    }
-
-    return $foundfile;
-}
-
-#####################################################################
-# Checking existence of a specific file, defined by its "gid"
-#####################################################################
-
-sub filegid_exists_in_filesarray
-{
-    my ($filesarrayref, $searchgid) = @_;
-
-    my $foundfile = 0;
-
-    for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
-    {
-        my $onefile = ${$filesarrayref}[$i];
-        my $filegid = $onefile->{'gid'};
-
-        if ( $filegid eq $searchgid )
-        {
-            $foundfile = 1;
-            last;
-        }
-    }
-
-    return $foundfile;
-}
-
 1;
-- 
1.7.4.1

From 4390f57d4f2ed450bf75d36dc84a34643bfac132 Mon Sep 17 00:00:00 2001
From: Jordan Ayers <jordan.ayers@gmail.com>
Date: Sun, 28 Aug 2011 12:20:45 -0500
Subject: [PATCH 2/3] Perl cleanup:  Remove unused local variable.

Remove an unused style copy per registry entry that was added to
installer::windows::registry::add_userregs_to_registry_table()
as part of the integration of CWS jl67.
---
 solenv/bin/modules/installer/windows/registry.pm |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/solenv/bin/modules/installer/windows/registry.pm 
b/solenv/bin/modules/installer/windows/registry.pm
index ad03686..4846580 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -342,9 +342,6 @@ sub add_userregs_to_registry_table
     {
         my $onefile = $installer::globals::userregistrycollector[$i];
 
-        my $styles = "";
-        if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
-
         my %registry = ();
 
         $registry{'Registry'} = $onefile->{'userregkeypath'};
-- 
1.7.4.1

From 7ef881c16a1bfc9e87b734b52a4b6551960e1690 Mon Sep 17 00:00:00 2001
From: Jordan Ayers <jordan.ayers@gmail.com>
Date: Sun, 28 Aug 2011 12:41:53 -0500
Subject: [PATCH 3/3] Remove unused perl function.

Remove installer::download::create_tar_gz_file_from_package, which has not been used
since the integration of CWS rt30_DEV300 in 2008.
---
 solenv/bin/modules/installer/download.pm |   68 ------------------------------
 1 files changed, 0 insertions(+), 68 deletions(-)

diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index a21fdad..c647740 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -344,74 +344,6 @@ sub tar_package
 }
 
 #########################################################
-# Creating a tar.gz file
-#########################################################
-
-sub create_tar_gz_file_from_package
-{
-    my ($installdir, $getuidlibrary) = @_;
-
-    my $infoline = "";
-    my $alldirs = installer::systemactions::get_all_directories($installdir);
-    my $onedir = ${$alldirs}[0];
-    $installdir = $onedir;
-
-    my $allfiles = installer::systemactions::get_all_files_from_one_directory($installdir);
-
-    for ( my $i = 0; $i <= $#{$allfiles}; $i++ )
-    {
-        my $onefile = ${$allfiles}[$i];
-        my $systemcall = "cd $installdir; rm $onefile";
-        my $returnvalue = system($systemcall);
-
-        $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);
-        }
-    }
-
-    $alldirs = installer::systemactions::get_all_directories($installdir);
-    $packagename = ${$alldirs}[0]; # only taking the first Solaris package
-    if ( $packagename eq "" ) { installer::exiter::exit_program("ERROR: Could not find package in 
directory $installdir!", "determine_packagename"); }
-
-    installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$packagename);
-
-    $installer::globals::downloadfileextension = ".tar.gz";
-    my $targzname = $packagename . $installer::globals::downloadfileextension;
-    $installer::globals::downloadfilename = $targzname;
-    my $ldpreloadstring = "";
-    if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; }
-
-    $systemcall = "cd $installdir; $ldpreloadstring tar -cf - $packagename | gzip > $targzname";
-    print "... $systemcall ...\n";
-
-    my $returnvalue = system($systemcall);
-
-    $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);
-    }
-}
-
-#########################################################
 # Setting type of installation
 #########################################################
 
-- 
1.7.4.1


Context


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.