summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-26 19:07:21 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-01-28 10:40:12 +0100
commita3eb01f1675d473580c3b1fa87072852f97b6daa (patch)
tree15eb24cac246ec67a5c01a19054b35a1ebb15113 /solenv
parenta845ba982c742d9a4b9b427ea38b96a0f5989ad4 (diff)
packaging: remove resolve_variables_in_downloadname
OOODOWNLOADNAME was set in the global section of openoffice.lst, so the code always did set the target path with set_download_filename. Thus remove the superfluous sub and then also the no longer used OOODOWNLOADNAME variables In the same vein: the "script that extracts a tarball that is appended to it" method is no longer in use since many years, delete that as well. Change-Id: I43481a3ec09e064ef77138e1cbfc1dba6854f2d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110017 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 443f65e9aff72442348e8e0c7162762c7a68ee05) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109990 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer.pm6
-rw-r--r--solenv/bin/modules/installer/download.pm86
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm12
3 files changed, 5 insertions, 99 deletions
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 0beb2ab4bd26..a4075fec5126 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -896,8 +896,7 @@ sub run {
# Creating directories
####################################################
- if ( $allvariableshashref->{'OOODOWNLOADNAME'} ) { installer::download::set_download_filename($languagestringref, $allvariableshashref); }
- else { installer::download::resolve_variables_in_downloadname($allvariableshashref, "", $languagestringref); }
+ installer::download::set_download_filename($languagestringref, $allvariableshashref);
$installdir = installer::worker::create_installation_directory($shipinstalldir, $languagestringref, \$current_install_number);
@@ -1660,8 +1659,7 @@ sub run {
if ( $installer::globals::iswindowsbuild )
{
$create_download = 0;
- if ( $allvariableshashref->{'OOODOWNLOADNAME'} ) { $$downloadname = installer::download::set_download_filename($languagestringref, $allvariableshashref); }
- else { $$downloadname = installer::download::resolve_variables_in_downloadname($allvariableshashref, $$downloadname, $languagestringref); }
+ $$downloadname = installer::download::set_download_filename($languagestringref, $allvariableshashref);
installer::systemactions::rename_one_file( $finalinstalldir . $installer::globals::separator . $installer::globals::shortmsidatabasename, $finalinstalldir . $installer::globals::separator . $$downloadname . ".msi" );
}
if (( $is_success ) && ( $create_download ) && ( $ENV{'ENABLE_DOWNLOADSETS'} ))
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 466bb4433205..b0e414abbd06 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -541,48 +541,6 @@ sub create_tar_gz_file_from_directory
return $targzname;
}
-#########################################################
-# Setting the variables in the download name
-#########################################################
-
-sub resolve_variables_in_downloadname
-{
- my ($allvariables, $downloadname, $languagestringref) = @_;
-
- # Typical name: soa-{productversion}-{extension}-bin-{os}-{languages}
-
- my $productversion = "";
- if ( $allvariables->{'PRODUCTVERSION'} ) { $productversion = $allvariables->{'PRODUCTVERSION'}; }
- $downloadname =~ s/\{productversion\}/$productversion/;
-
- my $packageversion = "";
- if ( $allvariables->{'PACKAGEVERSION'} ) { $packageversion = $allvariables->{'PACKAGEVERSION'}; }
- $downloadname =~ s/\{packageversion\}/$packageversion/;
-
- my $extension = "";
- if ( $allvariables->{'PRODUCTEXTENSION'} ) { $extension = $allvariables->{'PRODUCTEXTENSION'}; }
- $extension = lc($extension);
- $downloadname =~ s/\{extension\}/$extension/;
-
- my $os = "";
- if ( $installer::globals::iswindowsbuild ) { $os = "windows"; }
- elsif ( $installer::globals::issolarissparcbuild ) { $os = "solsparc"; }
- elsif ( $installer::globals::issolarisx86build ) { $os = "solia"; }
- elsif ( $installer::globals::islinuxbuild ) { $os = "linux"; }
- elsif ( $installer::globals::ismacbuild ) { $os = "macosxx"; }
- else { $os = ""; }
- $downloadname =~ s/\{os\}/$os/;
-
- my $languages = $$languagestringref;
- $downloadname =~ s/\{languages\}/$languages/;
-
- $downloadname =~ s/\-\-\-/\-/g;
- $downloadname =~ s/\-\-/\-/g;
- $downloadname =~ s/\-\s*$//;
-
- return $downloadname;
-}
-
##############################################################
# Returning the complete block in all languages
# for a specified string
@@ -701,8 +659,7 @@ sub create_download_sets
# evaluating the name of the download file
- if ( $allvariableshashref->{'OOODOWNLOADNAME'} ) { $downloadname = set_download_filename($languagestringref, $allvariableshashref); }
- else { $downloadname = resolve_variables_in_downloadname($allvariableshashref, $downloadname, $languagestringref); }
+ $downloadname = set_download_filename($languagestringref, $allvariableshashref);
if ( ! $installer::globals::iswindowsbuild ) # Unix specific part
{
@@ -711,46 +668,7 @@ sub create_download_sets
my $usefakeroot = 0;
if (( $installer::globals::issolarisbuild ) || ( $installer::globals::islinuxbuild )) { $usefakeroot = 1; }
- if ( $allvariableshashref->{'OOODOWNLOADNAME'} )
- {
- my $downloadfile = create_tar_gz_file_from_directory($installationdir, $usefakeroot, $downloaddir, $downloadname);
- }
- else
- {
- # find and read setup script template
- my $scriptfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/downloadscript.sh";
-
- if (! -f $scriptfilename) { installer::exiter::exit_program("ERROR: Could not find script file $scriptfilename!", "create_download_sets"); }
- my $scriptfile = installer::files::read_file($scriptfilename);
-
- $infoline = "Found script file $scriptfilename \n";
- push( @installer::globals::logfileinfo, $infoline);
-
- # add product name into script template
- put_productname_into_script($scriptfile, $allvariableshashref);
-
- # replace linenumber in script template
- put_linenumber_into_script($scriptfile);
-
- # create tar file
- my $temporary_tarfile_name = $downloaddir . $installer::globals::separator . 'installset.tar';
- my $size = tar_package($installationdir, $temporary_tarfile_name, $usefakeroot);
- installer::exiter::exit_program("ERROR: Could not create tar file $temporary_tarfile_name!", "create_download_sets") unless $size;
-
- # calling sum to determine checksum and size of the tar file
- my $sumout = call_sum($temporary_tarfile_name);
-
- # writing checksum and size into scriptfile
- put_checksum_and_size_into_script($scriptfile, $sumout);
-
- # saving the script file
- my $newscriptfilename = determine_scriptfile_name($downloadname);
- $newscriptfilename = save_script_file($downloaddir, $newscriptfilename, $scriptfile);
-
- installer::logger::print_message( "... including installation set into $newscriptfilename ... \n" );
- # Append tar file to script
- include_tar_into_script($newscriptfilename, $temporary_tarfile_name);
- }
+ my $downloadfile = create_tar_gz_file_from_directory($installationdir, $usefakeroot, $downloaddir, $downloadname);
}
return $downloaddir;
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index d289c18c185f..63ba3fe1ee8b 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -531,17 +531,7 @@ sub create_simple_package
my $locallanguage = $installer::globals::csp_languagestring;
- if ( $allvariables->{'OOODOWNLOADNAME'} )
- {
- $packagename = installer::download::set_download_filename(\$locallanguage, $allvariables);
- }
- else
- {
- $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname");
- if ( $installer::globals::languagepack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "langpackdownloadname"); }
- if ( $installer::globals::helppack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "helppackdownloadname"); }
- $packagename = installer::download::resolve_variables_in_downloadname($allvariables, $$downloadname, \$locallanguage);
- }
+ $packagename = installer::download::set_download_filename(\$locallanguage, $allvariables);
}
# Work around Windows problems with long pathnames (see issue 50885) by