Makefile.in | 8 - solenv/bin/modules/installer/download.pm | 131 +++++++++++++------------------ solenv/inc/installationtest.mk | 6 - 3 files changed, 65 insertions(+), 80 deletions(-)
New commits: commit c17e15a42735b5c6a756e90263a91f8e05f9c457 Author: Petr Mladek <pmla...@suse.cz> Date: Tue Jan 8 14:46:27 2013 +0100 clean up of the code that defines the download file names Change-Id: I3241801d49673cac33eb923fb986c6ceb2c39503 diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm index 9a8ae38..21bd62f 100644 --- a/solenv/bin/modules/installer/download.pm +++ b/solenv/bin/modules/installer/download.pm @@ -431,57 +431,64 @@ sub get_download_architecture } ######################################################### -# Setting the installation type for the download name +# Setting the content type for the download name ######################################################### -sub get_install_type +sub get_download_content { my ($allvariables) = @_; - my $type = ""; + my $content = ""; # content type included in the installer if ( $installer::globals::isrpmbuild ) { - $type .= "rpm"; + $content = "rpm"; } elsif ( $installer::globals::isdebbuild ) { - $type .= "deb"; + $content = "deb"; } elsif ( $installer::globals::packageformat eq "archive" ) { - $type .= "archive"; + $content = "archive"; } - $type .= "_" if ($type); + return $content; +} + +######################################################### +# Setting the functionality type for the download name +######################################################### + +sub get_download_functionality +{ + my ($allvariables) = @_; + + my $functionality = ""; - # functionality type if ( $installer::globals::languagepack ) { - $type .= "langpack"; + $functionality = "langpack"; } elsif ( $installer::globals::helppack ) { - $type .= "helppack"; + $functionality = "helppack"; } elsif ( $allvariables->{'POSTVERSIONEXTENSION'} eq "SDK" ) { - $type .= "sdk"; + $functionality = "sdk"; } elsif ( $allvariables->{'POSTVERSIONEXTENSION'} eq "TEST" ) { - $type .= "test"; + $functionality = "test"; } elsif ( $allvariables->{'PRODUCTNAME'} eq "URE" ) { - $type .= "ure"; + $functionality = "ure"; } - # get rid of trailing _ if functionality type was not set - $type =~ s/\_$//; - - return $type; + return $functionality; } ############################################################################################### @@ -498,21 +505,25 @@ sub set_download_filename my $versionstring = get_download_version($allvariables); my $platform = get_download_platformname(); my $architecture = get_download_architecture(); - my $type = get_install_type($allvariables); + my $content = get_download_content($allvariables); + my $functionality = get_download_functionality($allvariables); my $language = get_downloadname_language($languagestringref); # Setting the extension happens automatically - my $filename = $start . "_" . $versionstring . "_" . "_" . $platform . "_" . $architecture . "_" . $type . "_" . $language; + my $filename = $start . "_" . $versionstring . "_" . $platform . "_" . $architecture . "_" . $content . "_" . $functionality . "_" . $language; - $filename =~ s/\_\_/\_/g; # necessary, if $versionstring or $platform or $language are empty - $filename =~ s/\_\s*$//; # necessary, if $language and $addon are empty + # get rid of duplicit "_" delimiters when some strings are empty + $filename =~ s/\_\_\_/\_/g; + $filename =~ s/\_\_/\_/g; + $filename =~ s/\_\s*$//; $installer::globals::ooodownloadfilename = $filename; return $filename; } + ######################################################### # Creating a tar.gz file ######################################################### commit a575f1243374e252e656888e04433adc5a3c4768 Author: Petr Mladek <pmla...@suse.cz> Date: Tue Jan 8 11:54:15 2013 +0100 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. Conflicts: Makefile.in Change-Id: Ifecf947ba32e3381ef284d433096f7b37a02e9f5 diff --git a/Makefile.in b/Makefile.in index af83e64..9c12258 100644 --- a/Makefile.in +++ b/Makefile.in @@ -325,8 +325,8 @@ dev-install: build @mkdir $(DEVINSTALLDIR) ifeq ($(OS_FOR_BUILD),WNT) cd $(SRC_ROOT)/instsetoo_native && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl LIBO_DEV_INSTALL=TRUE - unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibreOffice*_install-arc_en-US.zip" - mv "$(DEVINSTALLDIR)"/LibreOffice*_install-arc_en-US/* "$(DEVINSTALLDIR)"/opt + unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibreOffice*_archive.zip" + mv "$(DEVINSTALLDIR)"/LibreOffice*_archive/* "$(DEVINSTALLDIR)"/opt else ifeq ($(DISABLE_LINKOO),TRUE) @ooinstall $(DEVINSTALLDIR)/opt @@ -352,8 +352,8 @@ install-tb: @mkdir $(DEVINSTALLDIR) ifeq ($(OS_FOR_BUILD),WNT) cd $(SRC_ROOT)/instsetoo_native && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl LIBO_DEV_INSTALL=TRUE - unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibreOffice*_install-arc_en-US.zip" - mv "$(DEVINSTALLDIR)"/LibreOffice*_install-arc_en-US/* "$(DEVINSTALLDIR)"/opt + unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibreOffice*_archive.zip" + mv "$(DEVINSTALLDIR)"/LibreOffice*_archive/* "$(DEVINSTALLDIR)"/opt else @ooinstall $(DEVINSTALLDIR)/opt @install-gdb-printers diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm index 97d29a8..9a8ae38 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; } diff --git a/solenv/inc/installationtest.mk b/solenv/inc/installationtest.mk index c9ed719..e8286d6 100644 --- a/solenv/inc/installationtest.mk +++ b/solenv/inc/installationtest.mk @@ -97,10 +97,10 @@ my_javaenv = \ .IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" && "$(CROSS_COMPILING)" != "YES" OOO_EXTRACT_TO:=$(shell cygpath -m `mktemp -dt ooosmoke.XXXXXX`) $(MISC)/$(TARGET)/installation.flag : $(shell \ - ls $(installationtest_instset)/LibreOffice_*_install-arc_$(defaultlangiso).zip) + ls $(installationtest_instset)/LibreOffice_*_archive.zip) $(COMMAND_ECHO)$(MKDIRHIER) $(@:d) - $(COMMAND_ECHO)unzip -q $(installationtest_instset)/LibreOffice_*_install-arc_$(defaultlangiso).zip -d "$(OOO_EXTRACT_TO)" - $(COMMAND_ECHO)mv "$(OOO_EXTRACT_TO)"/LibreOffice_*_install-arc_$(defaultlangiso) "$(OOO_EXTRACT_TO)"/opt + $(COMMAND_ECHO)unzip -q $(installationtest_instset)/LibreOffice_*_archive.zip -d "$(OOO_EXTRACT_TO)" + $(COMMAND_ECHO)mv "$(OOO_EXTRACT_TO)"/LibreOffice_*_archive "$(OOO_EXTRACT_TO)"/opt $(COMMAND_ECHO)echo "$(OOO_EXTRACT_TO)" > $@ .END _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits