[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-3' - solenv/bin

Stephan Bergmann sbergman at redhat.com
Fri Mar 23 20:18:31 UTC 2018


 solenv/bin/modules/installer.pm             |   31 +++++++++++++---------------
 solenv/bin/modules/installer/scriptitems.pm |    9 +++++---
 2 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit fb9867c7473117345b3010618380ed5849170dc9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 16 14:21:01 2018 +0100

    sdk/lib dir missing from Linux installation sets
    
    ...after cfd2691e5bf398304d7816227b933e53907b6204 "[API CHANGE] Remove salcpprt
    static library" had removed the sole regular File item from gid_Dir_Lib_Sdk,
    leaving only Unixlink items.  But the solenv/bin/modules/installer.pm code used
    to only auto-create any directories that contain regular Files.  Changed that to
    also consider Unixlinks in addition to regular Files.
    
    And to add insult to injury, the code in
    solenv/bin/modules/installer/simplepackage.pm creating the actual symlinks
    represented by the Unixlink items silently does nothing when a symlink cannot be
    created (because the partent dir is missing).  To be fixed in another follow-up
    commit.
    
    Change-Id: Ic7a682a17ac59c789c85c56c825dd623bc59428c
    (cherry picked from commit f07e2496963baf8f7c0fecc79e7a420544075d98)
    Reviewed-on: https://gerrit.libreoffice.org/51420
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 3d88b9986e14..151462f94ffc 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -636,6 +636,18 @@ sub run {
 
         installer::scpzipfiles::resolving_scpzip_replace_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref);
 
+        #########################################################
+        # language dependent unix links part
+        #########################################################
+
+        installer::logger::print_message( "... analyzing unix links ...\n" );
+
+        my $unixlinksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($unixlinksinproductarrayref, $languagesarrayref);
+
+        installer::scriptitems::changing_name_of_language_dependent_keys($unixlinksinproductlanguageresolvedarrayref);
+
+        installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($unixlinksinproductlanguageresolvedarrayref, $dirsinproductarrayref);
+
         ############################################
         # Collecting directories for epm list file
         ############################################
@@ -649,8 +661,7 @@ sub run {
         # It will be possible, that in the setup script only those directoies have to be defined,
         # that have a CREATE flag. All other directories are created, if they contain at least one file.
 
-        my ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
-
+        my ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref, $unixlinksinproductlanguageresolvedarrayref);
         ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash);
 
         #########################################################
@@ -690,18 +701,6 @@ sub run {
         installer::scriptitems::resolve_links_with_flag_relative($linksinproductlanguageresolvedarrayref);
 
         #########################################################
-        # language dependent unix links part
-        #########################################################
-
-        installer::logger::print_message( "... analyzing unix links ...\n" );
-
-        my $unixlinksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($unixlinksinproductarrayref, $languagesarrayref);
-
-        installer::scriptitems::changing_name_of_language_dependent_keys($unixlinksinproductlanguageresolvedarrayref);
-
-        installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($unixlinksinproductlanguageresolvedarrayref, $dirsinproductarrayref);
-
-        #########################################################
         # language dependent part for profiles and profileitems
         #########################################################
 
@@ -814,7 +813,7 @@ sub run {
             @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks
 
             # Collecting the directories again, to include only the language specific directories
-            ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
+            ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref, $unixlinksinproductlanguageresolvedarrayref);
             ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash);
             @$directoriesforepmarrayref = sort { $a->{"HostName"} cmp $b->{"HostName"} } @$directoriesforepmarrayref;
 
@@ -835,7 +834,7 @@ sub run {
             @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in helppacks
 
             # Collecting the directories again, to include only the language specific directories
-            ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref);
+            ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref, $unixlinksinproductlanguageresolvedarrayref);
             ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash);
             @$directoriesforepmarrayref = sort { $a->{"HostName"} cmp $b->{"HostName"} } @$directoriesforepmarrayref;
 
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index db2b67c5c9bb..774578d8f9f9 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -1590,7 +1590,10 @@ sub optimize_list
 
 sub collect_directories_from_filesarray
 {
-    my ($filesarrayref) = @_;
+    my ($filesarrayref, $unixlinksarrayref) = @_;
+    my @allfiles;
+    push @allfiles, @{$filesarrayref};
+    push @allfiles, @{$unixlinksarrayref};
 
     my @alldirectories = ();
     my %alldirectoryhash = ();
@@ -1600,9 +1603,9 @@ sub collect_directories_from_filesarray
     # Preparing this already as hash, although the only needed value at the moment is the HostName
     # But also adding: "specificlanguage" and "Dir" (for instance gid_Dir_Program)
 
-    for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
+    for ( my $i = 0; $i <= $#allfiles; $i++ )
     {
-        my $onefile = ${$filesarrayref}[$i];
+        my $onefile = $allfiles[$i];
         my $destinationpath = $onefile->{'destination'};
         installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationpath);
         $destinationpath =~ s/\Q$installer::globals::separator\E\s*$//;     # removing ending slashes or backslashes


More information about the Libreoffice-commits mailing list