diff options
author | Petr Mladek <pmladek@suse.cz> | 2013-01-08 11:54:15 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-01-08 14:23:26 +0100 |
commit | ba558a26bc93c0200d7d8bcc19a6e201d69792e4 (patch) | |
tree | bb21ddc18bc9dfa0606e4dfb9a6a756745a79b7b /solenv/bin | |
parent | 7389260dbf73aa88f8db18d04547c72a51f7d0e7 (diff) |
more easier and better sortable download names
+ get rid of "install_multi"
+ move "SDK" and "Test" from the main name to the name suffix;
use same position as "helppack" and "langpack"
+ move the content type identification "arc/deb/rpm" just
after the <arch> string
+ use "archive" instead of the unclear "arc" content identification
The new names look like:
LibreOffice_<version>_<os>_<arch>_<content>
LibreOffice_<version>_<os>_<arch>_<content>_helppack_<lang>
LibreOffice_<version>_<os>_<arch>_<content>_langpack_<lang>
LibreOffice_<version>_<os>_<arch>_<content>_sdk
LibreOffice_<version>_<os>_<arch>_<content>_test
, where the string "_<content>" is one of "_archive", "_deb", "_rpm".
This string is missing for .msi, and .dmg installers because
the content is described by the filename suffix.
Change-Id: Ifecf947ba32e3381ef284d433096f7b37a02e9f5
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/modules/installer/download.pm | 108 |
1 files changed, 41 insertions, 67 deletions
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm index 97d29a86348a..9a8ae381efb7 100644 --- a/solenv/bin/modules/installer/download.pm +++ b/solenv/bin/modules/installer/download.pm @@ -298,9 +298,18 @@ sub get_downloadname_language $languages =~ s/_en-US//; } + # do not list languages if there are too many if ( length ($languages) > $installer::globals::max_lang_length ) { - $languages = 'multi'; + $languages = ''; + } + + # do not list pure en-US, except for helppack and langpack + if ( ( $languages eq "en-US" ) && + ( ! $installer::globals::languagepack ) && + ( ! $installer::globals::helppack ) ) + { + $languages = ''; } return $languages; @@ -320,20 +329,8 @@ sub get_downloadname_productname if ( $allvariables->{'PRODUCTNAME'} eq "LOdev" ) { $start = "LibO-Dev"; } - if (( $allvariables->{'PRODUCTNAME'} eq "LibreOffice" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "LibreOffice-SDK"; } - - if (( $allvariables->{'PRODUCTNAME'} eq "LOdev" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" )) { $start = "LibO-Dev-SDK"; } - - if (( $allvariables->{'PRODUCTNAME'} eq "LibreOffice" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "TEST" )) { $start = "LibreOffice-Test"; } - - if (( $allvariables->{'PRODUCTNAME'} eq "LOdev" ) && ( $allvariables->{'POSTVERSIONEXTENSION'} eq "TEST" )) { $start = "LibO-Dev-Test"; } - - if ( $allvariables->{'PRODUCTNAME'} eq "URE" ) { $start = "LibreOffice-URE"; } - if ( $allvariables->{'PRODUCTNAME'} eq "OxygenOffice" ) { $start = "OOOP"; } - - return $start; } @@ -443,69 +440,46 @@ sub get_install_type my $type = ""; - if ( $installer::globals::languagepack ) + # content type included in the installer + if ( $installer::globals::isrpmbuild ) { - $type = "langpack"; - - if ( $installer::globals::isrpmbuild ) - { - $type = $type . "-rpm"; - } + $type .= "rpm"; + } + elsif ( $installer::globals::isdebbuild ) + { + $type .= "deb"; + } + elsif ( $installer::globals::packageformat eq "archive" ) + { + $type .= "archive"; + } - if ( $installer::globals::isdebbuild ) - { - $type = $type . "-deb"; - } + $type .= "_" if ($type); - if ( $installer::globals::packageformat eq "archive" ) - { - $type = $type . "-arc"; - } + # functionality type + if ( $installer::globals::languagepack ) + { + $type .= "langpack"; } elsif ( $installer::globals::helppack ) { - $type = "helppack"; - - if ( $installer::globals::isrpmbuild ) - { - $type = $type . "-rpm"; - } - - if ( $installer::globals::isdebbuild ) - { - $type = $type . "-deb"; - } - - if ( $installer::globals::packageformat eq "archive" ) - { - $type = $type . "-arc"; - } + $type .= "helppack"; } - else + elsif ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" ) { - $type = "install"; - - if ( $installer::globals::isrpmbuild ) - { - $type = $type . "-rpm"; - } - - if ( $installer::globals::isdebbuild ) - { - $type = $type . "-deb"; - } - - if ( $installer::globals::packageformat eq "archive" ) - { - $type = $type . "-arc"; - } - - if (( $allvariables->{'WITHJREPRODUCT'} ) && ( $allvariables->{'WITHJREPRODUCT'} == 1 )) - { - $type = $type . "-wJRE"; - } - + $type .= "sdk"; + } + elsif ( $allvariables->{'POSTVERSIONEXTENSION'} eq "TEST" ) + { + $type .= "test"; } + elsif ( $allvariables->{'PRODUCTNAME'} eq "URE" ) + { + $type .= "ure"; + } + + # get rid of trailing _ if functionality type was not set + $type =~ s/\_$//; return $type; } |