[Libreoffice-commits] core.git: solenv/bin

David Tardon dtardon at redhat.com
Mon Apr 29 03:47:22 PDT 2013


 solenv/bin/modules/installer/filelists.pm |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 97aa4a6044ed871771519c931863f3f66e211966
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Apr 29 12:44:51 2013 +0200

    filelists should honor USE_INTERNAL_RIGHTS flag
    
    Change-Id: I3edbae98c9bb51899e5592fae1cfe9f3632ad535

diff --git a/solenv/bin/modules/installer/filelists.pm b/solenv/bin/modules/installer/filelists.pm
index 5aa0506..cd0bae6 100644
--- a/solenv/bin/modules/installer/filelists.pm
+++ b/solenv/bin/modules/installer/filelists.pm
@@ -8,6 +8,8 @@
 
 package installer::filelists;
 
+use File::stat;
+
 use installer::files;
 use installer::globals;
 use installer::logger;
@@ -21,12 +23,17 @@ sub resolve_filelist_flag
     foreach my $file (@{$files})
     {
         my $is_filelist = 0;
+        my $use_internal_rights = 0;
         if ($file->{'Styles'})
         {
             if ($file->{'Styles'} =~ /\bFILELIST\b/)
             {
                 $is_filelist = 1;
             }
+            if ($file->{'Styles'} =~ /\bUSE_INTERNAL_RIGHTS\b/ && !$installer::globals::iswin)
+            {
+                $use_internal_rights = 1;
+            }
         }
 
         if ($is_filelist)
@@ -59,6 +66,12 @@ sub resolve_filelist_flag
                     $newfile{'filelistname'} = $file->{'Name'};
                     $newfile{'filelistpath'} = $file->{'sourcepath'};
 
+                    if ($use_internal_rights)
+                    {
+                        my $st = stat($path);
+                        $newfile{'UnixRights'} = sprintf("%o", $st->mode & 0777);
+                    }
+
                     push @newfiles, \%newfile;
                 }
             }


More information about the Libreoffice-commits mailing list