diff options
author | David Tardon <dtardon@redhat.com> | 2013-04-29 12:44:51 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-29 12:46:53 +0200 |
commit | 97aa4a6044ed871771519c931863f3f66e211966 (patch) | |
tree | 2f4b5593c90b1f25c98f20045238d5cc75731850 /solenv | |
parent | c559b13b80ab4c8ca4e6ca713bce388ea650e02c (diff) |
filelists should honor USE_INTERNAL_RIGHTS flag
Change-Id: I3edbae98c9bb51899e5592fae1cfe9f3632ad535
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/filelists.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/filelists.pm b/solenv/bin/modules/installer/filelists.pm index 5aa0506df9b2..cd0bae6af5fc 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; } } |