projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f66169
)
Fix apply_permissions logic for cases where mode is unspecified.
author
Zac Medico
<zmedico@gentoo.org>
Wed, 22 Nov 2006 06:20:17 +0000
(06:20 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 22 Nov 2006 06:20:17 +0000
(06:20 -0000)
svn path=/main/trunk/; revision=5115
pym/portage_util.py
patch
|
blob
|
history
diff --git
a/pym/portage_util.py
b/pym/portage_util.py
index 4c7e3176f6f85366fd316285f49dbfa40e8238df..1e7afe4b637f98fa4b27b282f6eca8d17ce6283c 100644
(file)
--- a/
pym/portage_util.py
+++ b/
pym/portage_util.py
@@
-558,7
+558,10
@@
def apply_permissions(filename, uid=-1, gid=-1, mode=-1, mask=-1,
# bits, so those bits are restored if necessary.
if modified and new_mode == -1 and \
(st_mode & stat.S_ISUID or st_mode & stat.S_ISGID):
- new_mode = mode & 07777
+ if mode == -1:
+ new_mode = st_mode
+ elif mode & stat.S_ISUID or mode & stat.S_ISGID:
+ new_mode = mode & 07777
if not follow_links and stat.S_ISLNK(stat_cached.st_mode):
# Mode doesn't matter for symlinks.