[Libreoffice-commits] .: 6 commits - solenv/bin
Michael Meeks
michael at kemper.freedesktop.org
Fri Feb 17 06:31:22 PST 2012
solenv/bin/make_installer.pl | 4
solenv/bin/modules/installer/download.pm | 64 ------
solenv/bin/modules/installer/worker.pm | 322 -------------------------------
3 files changed, 390 deletions(-)
New commits:
commit 04e1010fd74a8e61d43e83afb81c4f6315a201c8
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 23:03:05 2012 +0000
Remove unused save_logfile_after_linking from installer::worker
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 702e366..6f6801a 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -277,21 +277,6 @@ sub analyze_and_save_logfile
}
###############################################################
-# Analyzing and creating the log file
-###############################################################
-
-sub save_logfile_after_linking
-{
- my ($loggingdir, $installlogdir, $current_install_number) = @_;
-
- # Saving the logfile in the log file directory and additionally in a log directory in the install directory
- my $numberedlogfilename = $installer::globals::logfilename;
- installer::logger::print_message( "... creating log file $numberedlogfilename \n" );
- installer::files::save_file($loggingdir . $numberedlogfilename, \@installer::globals::logfileinfo);
- installer::files::save_file($installlogdir . $installer::globals::separator . $numberedlogfilename, \@installer::globals::logfileinfo);
-}
-
-###############################################################
# Removing all directories that are saved in the
# global directory @installer::globals::removedirs
###############################################################
commit 2492b26bb705a5c85b87386cd18aa57b3ed3c68d
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 23:02:22 2012 +0000
Remove unused unpack_all_targzfiles_in_directory from installer::worker
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 7dbe0d4..702e366 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -45,44 +45,6 @@ use installer::scriptitems;
use installer::systemactions;
use installer::windows::language;
-#####################################################################
-# Unpacking all files ending with tar.gz in a specified directory
-#####################################################################
-
-sub unpack_all_targzfiles_in_directory
-{
- my ( $directory ) = @_;
-
- installer::logger::include_header_into_logfile("Unpacking tar.gz files:");
-
- installer::logger::print_message( "... unpacking tar.gz files ... \n" );
-
- my $localdirectory = $directory . $installer::globals::separator . "packages";
- my $alltargzfiles = installer::systemactions::find_file_with_file_extension("tar.gz", $localdirectory);
-
- for ( my $i = 0; $i <= $#{$alltargzfiles}; $i++ )
- {
- my $onefile = $localdirectory . $installer::globals::separator . ${$alltargzfiles}[$i];
-
- my $systemcall = "cd $localdirectory; cat ${$alltargzfiles}[$i] \| gunzip \| tar -xf -";
- $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);
- }
- }
-}
-
#################################################
# Writing some global information into
# the list of files without flag PATCH
commit 8b389383dcc56048605cef7c430ee58687b12986
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 22:59:51 2012 +0000
Remove unused checksum subs from installer::worker
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 08c118b..47d137c 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -815,10 +815,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::scriptitems::make_filename_language_specific($filesinproductlanguageresolvedarrayref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles10f.log", $filesinproductlanguageresolvedarrayref); }
- # print "... calculating checksums ...\n";
- # my $checksumfile = installer::worker::make_checksum_file($filesinproductlanguageresolvedarrayref, $includepatharrayref);
- # if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . $installer::globals::checksumfilename, $checksumfile); }
-
######################################################################################
# Unzipping files with flag ARCHIVE and putting all included files into the file list
######################################################################################
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index ca4a34a..7dbe0d4 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -83,57 +83,6 @@ sub unpack_all_targzfiles_in_directory
}
}
-#########################################
-# Create checksum file
-#########################################
-
-sub make_checksum_file
-{
- my ( $filesref, $includepatharrayref ) = @_;
-
- my @checksum = ();
-
- my $checksumfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$installer::globals::checksumfile, $includepatharrayref, 1);
- if ( $$checksumfileref eq "" ) { installer::exiter::exit_program("ERROR: Could not find file $installer::globals::checksumfile !", "make_checksum_file"); }
-
- my $systemcall = "$$checksumfileref";
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- my $onefile = ${$filesref}[$i];
- $systemcall = $systemcall . " " . $onefile->{'sourcepath'}; # very very long systemcall
-
- if ((( $i > 0 ) && ( $i%100 == 0 )) || ( $i == $#{$filesref} )) # limiting to 100 files
- {
- $systemcall = $systemcall . " \|";
-
- my @localchecksum = ();
- open (CHECK, "$systemcall");
- @localchecksum = <CHECK>;
- close (CHECK);
-
- for ( my $j = 0; $j <= $#localchecksum; $j++ ) { push(@checksum, $localchecksum[$j]); }
-
- $systemcall = "$$checksumfileref"; # reset the system call
- }
- }
-
- return \@checksum;
-}
-
-#########################################
-# Saving the checksum file
-#########################################
-
-sub save_checksum_file
-{
- my ($current_install_number, $installchecksumdir, $checksumfile) = @_;
-
- my $numberedchecksumfilename = $installer::globals::checksumfilename;
- $numberedchecksumfilename =~ s/\./_$current_install_number\./; # checksum.txt -> checksum_01.txt
- installer::files::save_file($installchecksumdir . $installer::globals::separator . $numberedchecksumfilename, $checksumfile);
-}
-
#################################################
# Writing some global information into
# the list of files without flag PATCH
@@ -351,9 +300,6 @@ sub analyze_and_save_logfile
installer::files::save_file($loggingdir . $numberedlogfilename, \@installer::globals::logfileinfo);
installer::files::save_file($installlogdir . $installer::globals::separator . $numberedlogfilename, \@installer::globals::logfileinfo);
- # Saving the checksumfile in a checksum directory in the install directory
- # installer::worker::save_checksum_file($current_install_number, $installchecksumdir, $checksumfile);
-
# 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); }
commit 2efa9f5124297137fb4d90d85feb67772163ea34
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 22:58:01 2012 +0000
Remove unused install_sets subs from installer::worker
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 5bc052f..ca4a34a 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -84,86 +84,6 @@ sub unpack_all_targzfiles_in_directory
}
#########################################
-# Copying installation sets to ship
-#########################################
-
-sub copy_install_sets_to_ship
-{
- my ( $destdir, $shipinstalldir ) = @_;
-
- installer::logger::include_header_into_logfile("Copying installation set to ship:");
-
- my $dirname = $destdir;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$dirname);
- $dirname = $dirname . "_inprogress";
- my $localshipinstalldir = $shipinstalldir . $installer::globals::separator . $dirname;
- if ( ! -d $localshipinstalldir ) { installer::systemactions::create_directory_structure($localshipinstalldir); }
-
- # copy installation set to /ship ($localshipinstalldir)
- installer::logger::print_message( "... copy installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
- installer::systemactions::copy_complete_directory($destdir, $localshipinstalldir);
-
- # unpacking the tar.gz file for Solaris
- if ( $installer::globals::issolarisbuild ) { unpack_all_targzfiles_in_directory($localshipinstalldir); }
-
- $localshipinstalldir = installer::systemactions::rename_string_in_directory($localshipinstalldir, "_inprogress", "");
-
- return $localshipinstalldir;
-}
-
-#########################################
-# Copying installation sets to ship
-#########################################
-
-sub link_install_sets_to_ship
-{
- my ( $destdir, $shipinstalldir ) = @_;
-
- installer::logger::include_header_into_logfile("Linking installation set to ship:");
-
- my $infoline = "... destination directory: $shipinstalldir ...\n";
- installer::logger::print_message( $infoline );
- push( @installer::globals::logfileinfo, $infoline);
-
- if ( ! -d $shipinstalldir)
- {
- $infoline = "Creating directory: $shipinstalldir\n";
- push( @installer::globals::logfileinfo, $infoline);
- installer::systemactions::create_directory_structure($shipinstalldir);
- $infoline = "Created directory: $shipinstalldir\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- my $dirname = $destdir;
- installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$dirname);
-
- my $localshipinstalldir = $shipinstalldir . $installer::globals::separator . $dirname;
-
- # link installation set to /ship ($localshipinstalldir)
- installer::logger::print_message( "... linking installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
-
- my $systemcall = "ln -s $destdir $localshipinstalldir";
-
- $returnvalue = system($systemcall);
-
- $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- if ($returnvalue)
- {
- $infoline = "ERROR: Could not create link \"$localshipinstalldir\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
- else
- {
- $infoline = "Success: Created link \"$localshipinstalldir\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
- }
-
- return $localshipinstalldir;
-}
-
-#########################################
# Create checksum file
#########################################
commit ce7c5a60622aa797d9e90cdb7bda13ca9744b510
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 22:55:18 2012 +0000
Remove unused solaris subs from installer::worker
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index 445f1dc..5bc052f 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -2439,141 +2439,6 @@ sub filter_pkgmapfile
return \@pkgmap;
}
-##############################################
-# Creating double packages for Solaris x86.
-# One package with ARCH=i386 and one with
-# ARCH=i86pc.
-##############################################
-
-sub fix_solaris_x86_patch
-{
- my ($packagename, $subdir) = @_;
-
- # changing into directory of packages, important for soft linking
- my $startdir = cwd();
- chdir($subdir);
-
- # $packagename is: "SUNWstaroffice-core01"
- # Current working directory is: "<path>/install/en-US_inprogress"
-
- # create new folder in "packages": $packagename . ".i"
- my $newpackagename = $packagename . "\.i";
- my $newdir = $newpackagename;
- installer::systemactions::create_directory($newdir);
-
- # collecting all directories in the package
- my $olddir = $packagename;
- my $allsubdirs = installer::systemactions::get_all_directories_without_path($olddir);
-
- # link all directories from $packagename to $packagename . ".i"
- for ( my $i = 0; $i <= $#{$allsubdirs}; $i++ )
- {
- my $sourcedir = $olddir . $installer::globals::separator . ${$allsubdirs}[$i];
- my $destdir = $newdir . $installer::globals::separator . ${$allsubdirs}[$i];
- my $directory_depth = 2; # important for soft links, two directories already exist
- installer::systemactions::softlink_complete_directory($sourcedir, $destdir, $directory_depth);
- }
-
- # copy "pkginfo" and "pkgmap" from $packagename to $packagename . ".i"
- my @allcopyfiles = ("pkginfo", "pkgmap");
- for ( my $i = 0; $i <= $#allcopyfiles; $i++ )
- {
- my $sourcefile = $olddir . $installer::globals::separator . $allcopyfiles[$i];
- my $destfile = $newdir . $installer::globals::separator . $allcopyfiles[$i];
- installer::systemactions::copy_one_file($sourcefile, $destfile);
- }
-
- # change in pkginfo in $packagename . ".i" the value for ARCH from i386 to i86pc
- my $pkginfofilename = "pkginfo";
- $pkginfofilename = $newdir . $installer::globals::separator . $pkginfofilename;
-
- my $pkginfofile = installer::files::read_file($pkginfofilename);
- set_old_architecture_string($pkginfofile);
- installer::files::save_file($pkginfofilename, $pkginfofile);
-
- # adapt the values in pkgmap for pkginfo file, because this file was edited
- my $pkgmapfilename = "pkgmap";
- $pkgmapfilename = $newdir . $installer::globals::separator . $pkgmapfilename;
-
- my $pkgmapfile = installer::files::read_file($pkgmapfilename);
- set_pkginfo_line($pkgmapfile, $pkginfofilename);
- installer::files::save_file($pkgmapfilename, $pkgmapfile);
-
- # changing back to startdir
- chdir($startdir);
-}
-
-###################################################
-# Creating double core01 package for Solaris x86.
-# One package with ARCH=i386 and one with
-# ARCH=i86pc. This is necessary, to inform the
-# user about the missing "small patch", if
-# packages with ARCH=i86pc are installed.
-###################################################
-
-sub fix2_solaris_x86_patch
-{
- my ($packagename, $subdir) = @_;
-
- if ( $packagename =~ /-core01\s*$/ ) # only this one package needs to be duplicated
- {
- my $startdir = cwd();
- chdir($subdir);
-
- # $packagename is: "SUNWstaroffice-core01"
- # Current working directory is: "<path>/install/en-US_inprogress"
-
- # create new package in "packages": $packagename . ".i"
- my $olddir = $packagename;
- my $newpackagename = $packagename . "\.i";
- my $newdir = $newpackagename;
-
- installer::systemactions::create_directory($newdir);
-
- my $oldinstalldir = $olddir . $installer::globals::separator . "install";
- my $newinstalldir = $newdir . $installer::globals::separator . "install";
-
- installer::systemactions::copy_complete_directory($oldinstalldir, $newinstalldir);
-
- # setting time stamp of all copied files to avoid errors from pkgchk
- my $allinstallfiles = installer::systemactions::get_all_files_from_one_directory_without_path($newinstalldir);
- set_time_stamp($oldinstalldir, $newinstalldir, $allinstallfiles);
-
- # copy "pkginfo" and "pkgmap" from $packagename to $packagename . ".i"
- my @allcopyfiles = ("pkginfo", "pkgmap");
- for ( my $i = 0; $i <= $#allcopyfiles; $i++ )
- {
- my $sourcefile = $olddir . $installer::globals::separator . $allcopyfiles[$i];
- my $destfile = $newdir . $installer::globals::separator . $allcopyfiles[$i];
- installer::systemactions::copy_one_file($sourcefile, $destfile);
- }
-
- # change in pkginfo in $packagename . ".i" the value for ARCH from i386 to i86pc
- my $pkginfofilename = "pkginfo";
- $pkginfofilename = $newdir . $installer::globals::separator . $pkginfofilename;
-
- my $pkginfofile = installer::files::read_file($pkginfofilename);
- set_old_architecture_string($pkginfofile);
- check_requires_setting($pkginfofile);
- installer::files::save_file($pkginfofilename, $pkginfofile);
-
- # adapt the values in pkgmap for pkginfo file, because this file was edited
- my $pkgmapfilename = "pkgmap";
- $pkgmapfilename = $newdir . $installer::globals::separator . $pkgmapfilename;
-
- my $pkgmapfile = installer::files::read_file($pkgmapfilename);
- set_pkginfo_line($pkgmapfile, $pkginfofilename);
- $pkgmapfile = filter_pkgmapfile($pkgmapfile);
- installer::files::save_file($pkgmapfilename, $pkgmapfile);
-
- # setting time stamp of all copied files to avoid errors from pkgchk
- set_time_stamp($olddir, $newdir, \@allcopyfiles);
-
- # changing back to startdir
- chdir($startdir);
- }
-}
-
################################################
# Files with flag HIDDEN get a dot at the
# beginning of the file name. This cannot be
commit 0aeeebe5174aae79b9835362998c617f3e19f219
Author: Tim Retout <tim at retout.co.uk>
Date: Thu Feb 16 22:52:08 2012 +0000
Remove unused md5sum subs from installer::download
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 5f186b7..facdd16 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -157,70 +157,6 @@ sub put_checksum_and_size_into_script
}
#########################################################
-# Calling md5sum
-#########################################################
-
-sub call_md5sum
-{
- my ($filename) = @_;
-
- $md5sumfile = "/usr/bin/md5sum";
-
- if ( ! -f $md5sumfile ) { installer::exiter::exit_program("ERROR: No file /usr/bin/md5sum", "call_md5sum"); }
-
- my $systemcall = "$md5sumfile $filename |";
-
- my $md5sumoutput = "";
-
- open (SUM, "$systemcall");
- $md5sumoutput = <SUM>;
- close (SUM);
-
- my $returnvalue = $?; # $? contains the return value of the 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);
- }
-
- return $md5sumoutput;
-}
-
-#########################################################
-# Calling md5sum
-#########################################################
-
-sub get_md5sum
-{
- ($md5sumoutput) = @_;
-
- my $md5sum;
-
- if ( $md5sumoutput =~ /^\s*(\w+?)\s+/ )
- {
- $md5sum = $1;
- }
- else
- {
- installer::exiter::exit_program("ERROR: Incorrect return value from /usr/bin/md5sum: $md5sumoutput", "get_md5sum");
- }
-
- my $infoline = "Setting md5sum: $md5sum\n";
- push( @installer::globals::logfileinfo, $infoline);
-
- return $md5sum;
-}
-
-#########################################################
# Determining checksum and size of tar file
#########################################################
More information about the Libreoffice-commits
mailing list