diff options
author | Andras Timar <atimar@suse.com> | 2011-12-04 15:32:26 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2011-12-04 15:32:26 +0100 |
commit | 0411cd764bc960ad737d67cffac3fa81d483e317 (patch) | |
tree | 8eedcdbcc558b52a145945020d3be409b4afae13 /solenv/bin | |
parent | 9c9dbc1e26a268e0f1e7ceaccec384b3cde70a2b (diff) |
remove packaging for Java Desktop System (JDS)
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/make_installer.pl | 33 | ||||
-rw-r--r-- | solenv/bin/modules/installer/epmfile.pm | 46 | ||||
-rw-r--r-- | solenv/bin/modules/installer/globals.pm | 6 | ||||
-rw-r--r-- | solenv/bin/modules/installer/parameter.pm | 21 | ||||
-rw-r--r-- | solenv/bin/modules/installer/systemactions.pm | 8 | ||||
-rw-r--r-- | solenv/bin/modules/installer/worker.pm | 256 |
6 files changed, 0 insertions, 370 deletions
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index 5ebd70fea515..c9d9f02109ad 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -632,14 +632,12 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) { $installer::globals::addlicensefile = 0; # no license files for patches $installer::globals::makedownload = 0; - $installer::globals::makejds = 0; } if ( $installer::globals::languagepack ) { $installer::globals::addchildprojects = 0; $installer::globals::addsystemintegration = 0; - $installer::globals::makejds = 0; $installer::globals::addlicensefile = 0; $installer::globals::makedownload = 1; } @@ -648,7 +646,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) { $installer::globals::addchildprojects = 0; $installer::globals::addsystemintegration = 0; - $installer::globals::makejds = 0; $installer::globals::addlicensefile = 0; $installer::globals::makedownload = 1; } @@ -1872,36 +1869,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) installer::worker::analyze_and_save_logfile($loggingdir, $downloaddir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); } } - - ####################################################### - # Creating jds installation set - ####################################################### - - if ( $installer::globals::makejds ) - { - my $create_jds = 0; - - if ( $allvariableshashref->{'JDSBUILD'} ) { $create_jds = 1; } - if (! $installer::globals::issolarispkgbuild ) { $create_jds = 0; } - - if (( $is_success ) && ( $create_jds )) - { - if ( ! $installer::globals::jds_language_controlled ) - { - my $correct_language = installer::worker::check_jds_language($allvariableshashref, $languagestringref); - $installer::globals::correct_jds_language = $correct_language; - $installer::globals::jds_language_controlled = 1; - } - - if ( $installer::globals::correct_jds_language ) - { - my $jdsdir = installer::worker::create_jds_sets($finalinstalldir, $allvariableshashref, $languagestringref, $languagesarrayref, $includepatharrayref); - installer::worker::clean_jds_temp_dirs(); - installer::worker::analyze_and_save_logfile($loggingdir, $jdsdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); - } - } - } - } # end of "if (!( $installer::globals::iswindowsbuild ))" if ( $installer::globals::debug ) { installer::logger::debuginfo("\nEnd of part 2a: All non-Windows platforms\n"); } diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm index eff03a5ee1af..76c1792191bd 100644 --- a/solenv/bin/modules/installer/epmfile.pm +++ b/solenv/bin/modules/installer/epmfile.pm @@ -2391,52 +2391,6 @@ sub create_packages_without_epm # It might be necessary to save uncompressed Solaris packages - if ( $allvariables->{'JDSBUILD'} ) - { - if ( ! $installer::globals::jds_language_controlled ) - { - my $correct_language = installer::worker::check_jds_language($allvariables, $languagestringref); - $installer::globals::correct_jds_language = $correct_language; - $installer::globals::jds_language_controlled = 1; - } - - if ( $installer::globals::correct_jds_language ) - { - if ( $installer::globals::saved_packages_path eq "" ) - { - $packagestempdir = installer::systemactions::create_directories("jds", $languagestringref); - $installer::globals::saved_packages_path = $packagestempdir; - push(@installer::globals::jdsremovedirs, $packagestempdir); - } - - $systemcall = "cd $destinationdir; cp -p -R $packagename $installer::globals::saved_packages_path;"; - make_systemcall($systemcall); - installer::logger::print_message( "... $systemcall ...\n" ); - - # Setting unix rights to "775" for all created directories inside the package, - # that is saved in temp directory - - $systemcall = "cd $packagestempdir; find $packagename -type d | xargs -i chmod 775 \{\} \;"; - installer::logger::print_message( "... $systemcall ...\n" ); - - $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); - } - } - } - # compressing packages if ( ! $installer::globals::solarisdontcompress ) diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 28eba099bf32..2510cc0594ff 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -176,7 +176,6 @@ BEGIN $globaltempdirname = "ooopackaging"; $cyg_temppath = ""; $temppathdefined = 0; - $jdstemppathdefined = 0; $packageversion = 1; $packagerevision = 1; $rpm = ""; @@ -314,10 +313,6 @@ BEGIN $addsystemintegration = 0; $added_directories = 0; $makedownload = 1; - $makejds = 1; - $jdsexcludefilename = ""; - $jds_language_controlled = 0; - $correct_jds_language = 0; @installsetfiles = (); @binarytableonlyfiles = (); @allscpactions = (); @@ -489,7 +484,6 @@ BEGIN @forced_properties = ("SERVICETAG_PRODUCTNAME", "SERVICETAG_PRODUCTVERSION", "SERVICETAG_PARENTNAME", "SERVICETAG_SOURCE", "SERVICETAG_URN"); @removedirs = (); - @jdsremovedirs = (); @emptypackages = (); %fontpackageexists = (); diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm index 9c5ec8c24394..5f9638ffd8c9 100644 --- a/solenv/bin/modules/installer/parameter.pm +++ b/solenv/bin/modules/installer/parameter.pm @@ -168,7 +168,6 @@ sub getparameter $installer::globals::simple = 1; $installer::globals::call_epm = 0; $installer::globals::makedownload = 0; - $installer::globals::makejds = 0; $installer::globals::strip = 0; my $path = shift(@ARGV); $path =~ s/^\Q$installer::globals::destdir\E//; @@ -413,21 +412,6 @@ sub setglobalvariables installer::systemactions::create_directory($installer::globals::unpackpath); } - # setting jds exclude file list - - if ( $installer::globals::isrpmbuild ) - { - $installer::globals::jdsexcludefilename = "jds_excludefiles_linux.txt"; - } - if ( $installer::globals::issolarissparcbuild ) - { - $installer::globals::jdsexcludefilename = "jds_excludefiles_solaris_sparc.txt"; - } - if ( $installer::globals::issolarisx86build ) - { - $installer::globals::jdsexcludefilename = "jds_excludefiles_solaris_intel.txt"; - } - # setting and creating the temppath if (( $ENV{'TMP'} ) || ( $ENV{'TEMP'} ) || ( $ENV{'TMPDIR'} )) @@ -451,9 +435,6 @@ sub setglobalvariables if ( ! -d $installer::globals::temppath ) { installer::exiter::exit_program("ERROR: Failed to create directory $installer::globals::temppath ! Possible reason: Wrong privileges in directory $dirsave .", "setglobalvariables"); } - $installer::globals::jdstemppath = $installer::globals::temppath; - $installer::globals::jdstemppath =~ s/i_/j_/; - push(@installer::globals::jdsremovedirs, $installer::globals::jdstemppath); $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension; installer::systemactions::create_directory($installer::globals::temppath); if ( $^O =~ /cygwin/i ) @@ -463,12 +444,10 @@ sub setglobalvariables chomp( $installer::globals::cyg_temppath = qx{cygpath -w "$installer::globals::cyg_temppath"} ); } $installer::globals::temppathdefined = 1; - $installer::globals::jdstemppathdefined = 1; } else { $installer::globals::temppathdefined = 0; - $installer::globals::jdstemppathdefined = 0; } # only one cab file, if Windows msp patches shall be prepared diff --git a/solenv/bin/modules/installer/systemactions.pm b/solenv/bin/modules/installer/systemactions.pm index 09b4cb1882a3..559953ae5067 100644 --- a/solenv/bin/modules/installer/systemactions.pm +++ b/solenv/bin/modules/installer/systemactions.pm @@ -226,14 +226,6 @@ sub create_directories $path =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes and backslashes $path = $path . $installer::globals::separator; } - elsif ( ( $newdirectory eq "jds" ) ) - { - if ( $installer::globals::jdstemppathdefined ) { $path = $installer::globals::jdstemppath; } - else { $path = $installer::globals::unpackpath; } - $path =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes and backslashes - $path = $path . $installer::globals::separator; - installer::systemactions::create_directory($path); - } else { $path = $installer::globals::unpackpath . $installer::globals::separator; diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm index 312f30007f0a..a7da80f99a64 100644 --- a/solenv/bin/modules/installer/worker.pm +++ b/solenv/bin/modules/installer/worker.pm @@ -434,7 +434,6 @@ sub analyze_and_save_logfile if ( $installer::globals::updatepack ) { if ( $installdir =~ /_download_inprogress/ ) { $destdir = installer::systemactions::rename_string_in_directory($installdir, "_download_inprogress", "_download"); } - elsif ( $installdir =~ /_jds_inprogress/ ) { $destdir = installer::systemactions::rename_string_in_directory($installdir, "_jds_inprogress", "_jds"); } elsif ( $installdir =~ /_msp_inprogress/ ) { $destdir = installer::systemactions::rename_string_in_directory($installdir, "_msp_inprogress", "_msp"); } else { @@ -523,25 +522,6 @@ sub clean_output_tree } } -############################################################### -# Removing all directories that are saved in the -# global directory @installer::globals::jdsremovedirs -############################################################### - -sub clean_jds_temp_dirs -{ - installer::logger::print_message( "... cleaning jds directories ...\n" ); - - for ( my $i = 0; $i <= $#installer::globals::jdsremovedirs; $i++ ) - { - if ( -d $installer::globals::jdsremovedirs[$i] ) - { - installer::logger::print_message( "... removing directory $installer::globals::jdsremovedirs[$i] ...\n" ); - installer::systemactions::remove_complete_directory($installer::globals::jdsremovedirs[$i], 1); - } - } -} - ########################################################### # Setting one language in the language independent # array of include paths with $(LANG) @@ -1872,69 +1852,6 @@ sub is_matching return $matches; } -############################################################### -# Copying all Solaris packages or RPMs from installation set -############################################################### - -sub copy_all_packages -{ - my ($allexcludepackages, $sourcedir, $destdir) = @_; - - my $infoline = ""; - - $sourcedir =~ s/\/\s*$//; - $destdir =~ s/\/\s*$//; - - # $allexcludepackages is a list of RPMs and packages, that shall NOT be included into jds product - my $allpackages = get_all_packages_in_installdir($sourcedir); - - for ( my $i = 0; $i <= $#{$allpackages}; $i++ ) - { - my $onepackage = ${$allpackages}[$i]; - - my $packagename = $onepackage; - - if ( $installer::globals::issolarispkgbuild ) # on Solaris $onepackage contains the complete path - { - installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$packagename); - } - - if ( ! installer::existence::exists_in_array($packagename, $allexcludepackages)) - { - if ( ! is_matching($packagename, $allexcludepackages ) ) - { - - if ( $installer::globals::isrpmbuild ) - { - my $sourcepackage = $sourcedir . $installer::globals::separator . $packagename; - my $destfile = $destdir . $installer::globals::separator . $packagename; - if ( ! -f $sourcepackage ) { installer::exiter::exit_program("ERROR: Could not find RPM $sourcepackage!", "copy_all_packages"); } - installer::systemactions::hardlink_one_file($sourcepackage, $destfile); - } - - if ( $installer::globals::issolarispkgbuild ) - { - my $destinationdir = $destdir . $installer::globals::separator . $packagename; - if ( ! -d $onepackage ) { installer::exiter::exit_program("ERROR: Could not find Solaris package $onepackage!", "copy_all_packages"); } - - my $systemcall = "cp -p -R $onepackage $destinationdir"; - make_systemcall($systemcall); - } - } - else - { - $infoline = "Excluding package (matching): $onepackage\n"; - push( @installer::globals::logfileinfo, $infoline); - } - } - else - { - $infoline = "Excluding package (precise name): $onepackage\n"; - push( @installer::globals::logfileinfo, $infoline); - } - } -} - ###################################################### # Making systemcall ###################################################### @@ -1960,179 +1877,6 @@ sub make_systemcall } } -########################################################### -# Copying all Solaris packages or RPMs from solver -########################################################### - -sub copy_additional_packages -{ - my ($allcopypackages, $destdir, $includepatharrayref) = @_; - - my $infoline = "Copy additional packages into installation set.\n"; - push( @installer::globals::logfileinfo, $infoline); - - $destdir =~ s/\/\s*$//; - - for ( my $i = 0; $i <= $#{$allcopypackages}; $i++ ) - { - my $onepackage = ${$allcopypackages}[$i]; - $infoline = "Copy package: $onepackage\n"; - push( @installer::globals::logfileinfo, $infoline); - - # this package must be delivered into the solver - - my $packagesourceref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$onepackage, $includepatharrayref, 0); - if ($$packagesourceref eq "") { installer::exiter::exit_program("ERROR: Could not find jds file $onepackage!", "copy_additional_packages"); } - - if ( $onepackage =~ /\.tar\.gz\s*$/ ) - { - my $systemcall = "cd $destdir; cat $$packagesourceref | gunzip | tar -xf -"; - make_systemcall($systemcall); - } - else - { - my $destfile = $destdir . $installer::globals::separator . $onepackage; - installer::systemactions::copy_one_file($$packagesourceref, $destfile); - } - } -} - -########################################################### -# Creating jds installation sets -########################################################### - -sub create_jds_sets -{ - my ($installationdir, $allvariableshashref, $languagestringref, $languagesarrayref, $includepatharrayref) = @_; - - installer::logger::print_message( "\n******************************************\n" ); - installer::logger::print_message( "... creating jds installation set ...\n" ); - installer::logger::print_message( "******************************************\n" ); - - installer::logger::include_header_into_logfile("Creating jds installation sets:"); - - my $firstdir = $installationdir; - installer::pathanalyzer::get_path_from_fullqualifiedname(\$firstdir); - - my $lastdir = $installationdir; - installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$lastdir); - - if ( $lastdir =~ /\./ ) { $lastdir =~ s/\./_jds_inprogress\./ } - else { $lastdir = $lastdir . "_jds_inprogress"; } - - # removing existing directory "_native_packed_inprogress" and "_native_packed_witherror" and "_native_packed" - - my $jdsdir = $firstdir . $lastdir; - if ( -d $jdsdir ) { installer::systemactions::remove_complete_directory($jdsdir); } - - my $olddir = $jdsdir; - $olddir =~ s/_inprogress/_witherror/; - if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); } - - $olddir = $jdsdir; - $olddir =~ s/_inprogress//; - if ( -d $olddir ) { installer::systemactions::remove_complete_directory($olddir); } - - # creating the new directory - - installer::systemactions::create_directory($jdsdir); - - $installer::globals::saveinstalldir = $jdsdir; - - # find and read jds files list - my $filelistname = $installer::globals::jdsexcludefilename; - - my $filelistnameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$filelistname, "", 0); - if ($$filelistnameref eq "") { installer::exiter::exit_program("ERROR: Could not find jds list file $filelistname!", "create_jds_sets"); } - - my $listfile = installer::files::read_file($$filelistnameref); - - my $infoline = "Found jds list file: $$filelistnameref\n"; - push( @installer::globals::logfileinfo, $infoline); - - # substituting the variables - substitute_dollar_variables($listfile, $allvariableshashref); - - # determining the packages/RPMs to copy - my $allexcludepackages = get_section_from_file($listfile, "excludefiles"); - my $allcopypackages = get_section_from_file($listfile, "copyfiles"); - - # determining the source directory - my $alldirs = installer::systemactions::get_all_directories($installationdir); - my $sourcedir = ${$alldirs}[0]; # there is only one directory - - if ( $installer::globals::issolarisbuild ) { $sourcedir = $installer::globals::saved_packages_path; } - - # copy all packages/RPMs - copy_all_packages($allexcludepackages, $sourcedir, $jdsdir); - copy_additional_packages($allcopypackages, $jdsdir, $includepatharrayref); - - return $jdsdir; -} - -############################################################################# -# Checking, whether this installation set contains the correct languages -############################################################################# - -sub check_jds_language -{ - my ($allvariableshashref, $languagestringref) = @_; - - my $infoline = ""; - - if ( ! $allvariableshashref->{'JDSLANG'} ) { installer::exiter::exit_program("ERROR: For building JDS installation sets \"JDSLANG\" must be defined!", "check_jds_language"); } - my $languagestring = $allvariableshashref->{'JDSLANG'}; - - my $sortedarray1 = installer::converter::convert_stringlist_into_array(\$languagestring, ","); - - installer::sorter::sorting_array_of_strings($sortedarray1); - - my $sortedarray2 = installer::converter::convert_stringlist_into_array($languagestringref, "_"); - installer::sorter::sorting_array_of_strings($sortedarray2); - - my $string1 = installer::converter::convert_array_to_comma_separated_string($sortedarray1); - my $string2 = installer::converter::convert_array_to_comma_separated_string($sortedarray2); - - my $arrays_are_equal = compare_arrays($sortedarray1, $sortedarray2); - - return $arrays_are_equal; -} - -################################################################################### -# Comparing two arrays. The arrays are equal, if the complete content is equal. -################################################################################### - -sub compare_arrays -{ - my ($array1, $array2) = @_; - - my $arrays_are_equal = 1; - - # checking the size - - if ( ! ( $#{$array1} == $#{$array2} )) { $arrays_are_equal = 0; } # different size - - if ( $arrays_are_equal ) # only make further investigations if size is equal - { - for ( my $i = 0; $i <= $#{$array1}; $i++ ) - { - # ingnoring whitespaces at end and beginning - ${$array1}[$i] =~ s/^\s*//; - ${$array2}[$i] =~ s/^\s*//; - ${$array1}[$i] =~ s/\s*$//; - ${$array2}[$i] =~ s/\s*$//; - - if ( ! ( ${$array1}[$i] eq ${$array2}[$i] )) - { - $arrays_are_equal = 0; - last; - } - } - } - - return $arrays_are_equal; -} - ################################################################# # Copying the files defined as ScpActions into the # installation set. |