summaryrefslogtreecommitdiff
path: root/solenv/bin/modules/installer
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-09-12 02:25:38 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-09-12 02:43:35 +0200
commit815ed63b51c0aba3b3796dcdd37759d22ba91642 (patch)
treeaa68c7a2efe0d11c4a16570f6c597eca9e55d28c /solenv/bin/modules/installer
parent82ad2c5cc649988acba8e8bf64682a3f2104d6ff (diff)
installer: spring cleaning
some uncalled and unused stuff Change-Id: I74cc7f58a78befa119102f18560782c5b1ff45fd
Diffstat (limited to 'solenv/bin/modules/installer')
-rw-r--r--solenv/bin/modules/installer/converter.pm16
-rw-r--r--solenv/bin/modules/installer/epmfile.pm56
-rw-r--r--solenv/bin/modules/installer/languages.pm22
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm26
-rw-r--r--solenv/bin/modules/installer/systemactions.pm32
-rw-r--r--solenv/bin/modules/installer/windows/assembly.pm58
-rw-r--r--solenv/bin/modules/installer/windows/feature.pm30
-rw-r--r--solenv/bin/modules/installer/windows/media.pm140
-rw-r--r--solenv/bin/modules/installer/windows/msp.pm14
-rw-r--r--solenv/bin/modules/installer/worker.pm53
10 files changed, 0 insertions, 447 deletions
diff --git a/solenv/bin/modules/installer/converter.pm b/solenv/bin/modules/installer/converter.pm
index bde70013cb00..f825e0439bc2 100644
--- a/solenv/bin/modules/installer/converter.pm
+++ b/solenv/bin/modules/installer/converter.pm
@@ -67,22 +67,6 @@ sub convert_stringlist_into_hash
}
#############################################################################
-# Converting a string list with separator $listseparator
-# into an array
-#############################################################################
-
-sub convert_whitespace_stringlist_into_array
-{
- my ( $includestringref ) = @_;
-
- my $tmp = ${$includestringref};
- $tmp = s/^\s+//;
- $tmp = s/\s+$//;
-
- return [map "$_\n", split /\s+/, $tmp];
-}
-
-#############################################################################
# Converting an array into a space separated string
#############################################################################
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index 503bd4c1543f..06897fbff474 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -1311,28 +1311,6 @@ sub make_prototypefile_relocatable
}
#########################################################################
-# Replacing the variables in the Solaris patch shell scripts.
-# Taking care, that multiple slashes are not always removed.
-#########################################################################
-
-sub replace_variables_in_shellscripts_for_patch
-{
- my ($scriptfile, $scriptfilename, $oldstring, $newstring) = @_;
-
- for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
- {
- if ( ${$scriptfile}[$i] =~ /\Q$oldstring\E/ )
- {
- my $oldline = ${$scriptfile}[$i];
- if (( $oldstring eq "PRODUCTDIRECTORYNAME" ) && ( $newstring eq "" )) { $oldstring = $oldstring . "/"; }
- ${$scriptfile}[$i] =~ s/\Q$oldstring\E/$newstring/g;
- my $infoline = "Info: Substituting in $scriptfilename $oldstring by $newstring\n";
- push(@installer::globals::logfileinfo, $infoline);
- }
- }
-}
-
-#########################################################################
# Replacing the variables in the shell scripts or in the epm list file
# Linux: spec file
# Solaris: preinstall, postinstall, preremove, postremove
@@ -2367,40 +2345,6 @@ sub remove_modules_without_package
}
######################################################
-# Unpacking tar.gz file and setting new packagename.
-######################################################
-
-sub unpack_tar_gz_file
-{
- my ($packagename, $destdir) = @_;
-
- my $newpackagename = "";
-
- if ( $packagename =~ /\.tar\.gz\s*$/ )
- {
- # Collecting all packages in directory "packages"
- my $oldcontent = installer::systemactions::read_directory($destdir);
-
- # unpacking gunzip
- my $systemcall = "cd $destdir; cat $packagename | gunzip | tar -xf -";
- installer::systemactions::make_systemcall($systemcall);
-
- # deleting the tar.gz files
- $systemcall = "cd $destdir; rm -f $packagename";
- 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);
- $newpackagename = ${$newcontent}[0];
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newpackagename);
- }
-
- if ( $newpackagename ne "" ) { $packagename = $newpackagename; }
-
- return $packagename;
-}
-
-######################################################
# Copying files for system integration.
######################################################
diff --git a/solenv/bin/modules/installer/languages.pm b/solenv/bin/modules/installer/languages.pm
index af2be54e196b..0dab49e0e40f 100644
--- a/solenv/bin/modules/installer/languages.pm
+++ b/solenv/bin/modules/installer/languages.pm
@@ -76,28 +76,6 @@ sub get_info_about_languages
analyze_languagelist();
}
-#############################################################################
-# Checking whether all elements of an array A are also member of array B
-#############################################################################
-
-sub all_elements_of_array1_in_array2
-{
- my ($array1, $array2) = @_;
-
- my $array2_contains_all_elements_of_array1 = 1;
-
- for ( my $i = 0; $i <= $#{$array1}; $i++ )
- {
- if (! grep {$_ eq ${$array1}[$i]} @{$array2})
- {
- $array2_contains_all_elements_of_array1 = 0;
- last;
- }
- }
-
- return $array2_contains_all_elements_of_array1;
-}
-
#############################################
# All languages defined for one product
#############################################
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 626763847acf..883888de1fa2 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -1010,32 +1010,6 @@ sub get_sourcepath_from_filename_and_includepath
}
##############################################################
-# Determining, whether a specified directory is language
-# dependent
-##############################################################
-
-sub determine_directory_language_dependency
-{
- my($directorygid, $dirsref) = @_;
-
- my $is_multilingual = 0;
-
- for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
- {
- my $onedir = ${$dirsref}[$i];
- my $gid = $onedir->{'gid'};
-
- if ( $gid eq $directorygid )
- {
- $is_multilingual = $onedir->{'ismultilingual'};
- last;
- }
- }
-
- return $is_multilingual;
-}
-
-##############################################################
# Getting all source paths for all files to be packed
# $item can be "Files" or "ScpActions"
##############################################################
diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm
index 0a1d2273515f..457d68f3e83d 100644
--- a/solenv/bin/modules/installer/systemactions.pm
+++ b/solenv/bin/modules/installer/systemactions.pm
@@ -1181,38 +1181,6 @@ sub remove_complete_directory
}
######################################################
-# Creating a unique directory with number extension
-######################################################
-
-sub create_unique_directory
-{
- my ($directory) = @_;
-
- $directory =~ s/\Q$installer::globals::separator\E\s*$//;
- $directory = $directory . "_INCREASINGNUMBER";
-
- my $counter = 1;
- my $created = 0;
- my $localdirectory = "";
-
- do
- {
- $localdirectory = $directory;
- $localdirectory =~ s/INCREASINGNUMBER/$counter/;
- $counter++;
-
- if ( ! -d $localdirectory )
- {
- create_directory($localdirectory);
- $created = 1;
- }
- }
- while ( ! $created );
-
- return $localdirectory;
-}
-
-######################################################
# Creating a unique directory with pid extension
######################################################
diff --git a/solenv/bin/modules/installer/windows/assembly.pm b/solenv/bin/modules/installer/windows/assembly.pm
index a03c4de8fb76..fb80d52da8c3 100644
--- a/solenv/bin/modules/installer/windows/assembly.pm
+++ b/solenv/bin/modules/installer/windows/assembly.pm
@@ -62,35 +62,6 @@ sub get_msiassembly_component
}
##############################################################
-# Returning the file name as manifest file
-##############################################################
-
-sub get_msiassembly_filemanifest
-{
- my ( $onefile ) = @_;
-
- my $filemanifest = "";
-
- $filemanifest = $onefile->{'uniquename'};
-
- return $filemanifest;
-}
-
-
-##############################################################
-# Returning the file application
-##############################################################
-
-sub get_msiassembly_fileapplication
-{
- my ( $onefile ) = @_;
-
- my $fileapplication = "";
-
- return $fileapplication;
-}
-
-##############################################################
# Returning the file attributes
##############################################################
@@ -105,35 +76,6 @@ sub get_msiassembly_attributes
return $fileattributes;
}
-##############################################################
-# Returning the file object for the msiassembly table.
-##############################################################
-
-sub get_msiassembly_file
-{
- my ( $filesref, $filename ) = @_;
-
- my $foundfile = 0;
- my $onefile;
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- $onefile = ${$filesref}[$i];
- my $name = $onefile->{'Name'};
-
- if ( $name eq $filename )
- {
- $foundfile = 1;
- last;
- }
- }
-
- # It does not need to exist. For example products that do not contain the libraries.
- if (! $foundfile ) { $onefile = ""; }
-
- return $onefile;
-}
-
####################################################################################
# Creating the file MsiAssembly.idt dynamically
# Content:
diff --git a/solenv/bin/modules/installer/windows/feature.pm b/solenv/bin/modules/installer/windows/feature.pm
index d023a7415a10..f230fa625978 100644
--- a/solenv/bin/modules/installer/windows/feature.pm
+++ b/solenv/bin/modules/installer/windows/feature.pm
@@ -185,36 +185,6 @@ sub get_feature_attributes
}
#################################################################################
-# Replacing one variable in one files
-#################################################################################
-
-sub replace_one_variable
-{
- my ($translationfile, $variable, $searchstring) = @_;
-
- for ( my $i = 0; $i <= $#{$translationfile}; $i++ )
- {
- ${$translationfile}[$i] =~ s/\%$searchstring/$variable/g;
- }
-}
-
-#################################################################################
-# Replacing the variables in the feature names and descriptions
-#################################################################################
-
-sub replace_variables
-{
- my ($translationfile, $variableshashref) = @_;
-
- # we want to substitute FOO_BR before FOO to avoid floating _BR suffixes
- foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
- {
- my $value = $variableshashref->{$key};
- replace_one_variable($translationfile, $value, $key);
- }
-}
-
-#################################################################################
# Collecting the feature recursively.
#################################################################################
diff --git a/solenv/bin/modules/installer/windows/media.pm b/solenv/bin/modules/installer/windows/media.pm
index bb894715d1a8..9f530699547b 100644
--- a/solenv/bin/modules/installer/windows/media.pm
+++ b/solenv/bin/modules/installer/windows/media.pm
@@ -35,17 +35,6 @@ sub get_media_diskid
}
##############################################################
-# Returning the lastsequence for the media table.
-##############################################################
-
-sub get_media_lastsequence
-{
- my ($fileref) = @_;
-
- return $fileref->{'sequencenumber'};
-}
-
-##############################################################
# Returning the diskprompt for the media table.
##############################################################
@@ -55,22 +44,6 @@ sub get_media_diskprompt
}
##############################################################
-# Returning the cabinet file name for the media table.
-##############################################################
-
-sub get_media_cabinet
-{
- my ($id) = @_;
-
- my $number = 1000 + $id;
- my $filename = "f_" . $number . ".cab";
-
- if ( $installer::globals::include_cab_in_msi ) { $filename = "\#" . $filename; }
-
- return $filename;
-}
-
-##############################################################
# Returning the volumelabel for the media table.
##############################################################
@@ -88,97 +61,6 @@ sub get_media_source
return "";
}
-##############################################################
-# Saving the cabinet file name in the files collector.
-# This is useful for making a list to connect the
-# source of each file with the destination cabinet file.
-##############################################################
-
-sub set_cabinetfilename_for_component_in_file_collector
-{
- my ($cabinetfilename, $filesref, $componentname, $max) = @_;
-
- for ( my $i = 0; $i <= $max; $i++ )
- {
- my $onefile = ${$filesref}[$i];
- my $component = $onefile->{'componentname'};
-
- if ( $component eq $componentname )
- {
- my $cabinet = "";
-
- if ( $onefile->{'cabinet'} ) { $cabinet = $onefile->{'cabinet'}; }
-
- if ( $cabinet eq "" )
- {
- $onefile->{'cabinet'} = $cabinetfilename;
- }
- }
- }
-}
-
-#################################################
-# Creating the cab file name dynamically
-#################################################
-
-sub generate_cab_filename_for_some_cabs
-{
- my ( $allvariables, $id ) = @_;
-
- my $name = $allvariables->{'PRODUCTNAME'};
-
- $name = lc($name);
- $name =~ s/\.//g;
- $name =~ s/\s//g;
-
- # possibility to overwrite the name with variable CABFILENAME
- if ( $allvariables->{'CABFILENAME'} ) { $name = $allvariables->{'CABFILENAME'}; }
-
- $name = $name . $id . ".cab";
-
- if ( $installer::globals::include_cab_in_msi ) { $name = "\#" . $name; }
-
- return $name;
-}
-
-#################################################
-# Creating the cab file name for cab files
-# defined in packages.
-#################################################
-
-sub get_cabfilename
-{
- my ($name) = @_;
-
- if ( $installer::globals::include_cab_in_msi ) { $name = "\#" . $name; }
-
- return $name;
-}
-
-#################################################
-# Creating the cab file name dynamically
-#################################################
-
-sub generate_cab_filename
-{
- my ( $allvariables ) = @_;
-
- my $name = $allvariables->{'PRODUCTNAME'};
-
- $name = lc($name);
- $name =~ s/\.//g;
- $name =~ s/\s//g;
-
- # possibility to overwrite the name with variable CABFILENAME
- if ( $allvariables->{'CABFILENAME'} ) { $name = $allvariables->{'CABFILENAME'}; }
-
- $name = $name . ".cab";
-
- if ( $installer::globals::include_cab_in_msi ) { $name = "\#" . $name; }
-
- return $name;
-}
-
sub get_maximum_filenumber
{
my ($allfiles, $maxcabfilenumber) = @_;
@@ -198,28 +80,6 @@ sub get_maximum_filenumber
}
#################################################################################
-# Setting the last sequence for the cabinet files
-#################################################################################
-
-sub get_last_sequence
-{
- my ( $cabfilename, $alludpatelastsequences ) = @_;
-
- my $sequence = 0;
-
- if (( $installer::globals::updatedatabase ) && ( exists($alludpatelastsequences->{$cabfilename}) ))
- {
- $sequence = $alludpatelastsequences->{$cabfilename};
- }
- else
- {
- $sequence = $installer::globals::lastsequence{$cabfilename};
- }
-
- return $sequence;
-}
-
-#################################################################################
# Creating the file Media.idt dynamically
# Content:
# DiskId LastSequence DiskPrompt Cabinet VolumeLabel Source
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
index 9892c7df1b7b..fbb0661440df 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -281,20 +281,6 @@ sub check_and_save_tables
}
####################################################################
-# Setting the languages for the service packs
-####################################################################
-
-sub create_langstring
-{
- my ( $languagesarrayref ) = @_;
-
- my $langstring = "";
- for ( my $i = 0; $i <= $#{$languagesarrayref}; $i++ ) { $langstring = $langstring . "_" . ${$languagesarrayref}[$i]; }
-
- return $langstring;
-}
-
-####################################################################
# Setting the name of the msp database
####################################################################
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index b97dae2f62c4..4022907c0151 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -245,31 +245,6 @@ sub collect_all_items_with_special_flag
}
##############################################################
-# Collecting all items without a defined flag
-##############################################################
-
-sub collect_all_items_without_special_flag
-{
- my ($itemsref, $flag) = @_;
-
- my @allitems = ();
-
- for ( my $i = 0; $i <= $#{$itemsref}; $i++ )
- {
- my $oneitem = ${$itemsref}[$i];
- my $styles = "";
- if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'} };
-
- if ( !( $styles =~ /\b$flag\b/ ))
- {
- push( @allitems, $oneitem );
- }
- }
-
- return \@allitems;
-}
-
-##############################################################
# Removing all items with a defined flag from collector
##############################################################
@@ -652,34 +627,6 @@ sub collect_all_files_from_includepaths
push( @installer::globals::globallogfileinfo, "\n");
}
-##############################################
-# Searching for a file with the gid
-##############################################
-
-sub find_file_by_id
-{
- my ( $filesref, $gid ) = @_;
-
- my $foundfile = 0;
- my $onefile;
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- $onefile = ${$filesref}[$i];
- my $filegid = $onefile->{'gid'};
-
- if ( $filegid eq $gid )
- {
- $foundfile = 1;
- last;
- }
- }
-
- if (! $foundfile ) { $onefile = ""; }
-
- return $onefile;
-}
-
#################################################
# Generating paths for cygwin (second version)
# This function generates smaller files for