aboutsummaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-03-09 08:56:44 +0000
committerBrian Harring <ferringb@gentoo.org>2005-03-09 08:56:44 +0000
commitc1543c0b1efe696c3f7e601851b26cf4ef798191 (patch)
treea3556d954123cdf84c9b58d1604db87d4b9adee5 /pym
parentDamn I'm cool. nice bug on my part, _eclasses_ is now properly processed and... (diff)
downloadportage-cvs-c1543c0b1efe696c3f7e601851b26cf4ef798191.tar.gz
portage-cvs-c1543c0b1efe696c3f7e601851b26cf4ef798191.tar.bz2
portage-cvs-c1543c0b1efe696c3f7e601851b26cf4ef798191.zip
fs_template _ensure_dirs wasn't accounting for umask
Diffstat (limited to 'pym')
-rw-r--r--pym/cache/fs_template.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/cache/fs_template.py b/pym/cache/fs_template.py
index 0d3c032..ca7d62a 100644
--- a/pym/cache/fs_template.py
+++ b/pym/cache/fs_template.py
@@ -47,9 +47,12 @@ class FsBased(template.database):
for dir in path.lstrip(os.path.sep).rstrip(os.path.sep).split(os.path.sep):
base = os.path.join(base,dir)
if not os.path.exists(base):
- os.mkdir(base, self._perms | 0111)
- os.chown(base, -1, self._gid)
-
+ um=os.umask(0)
+ try:
+ os.mkdir(base, self._perms | 0111)
+ os.chown(base, -1, self._gid)
+ finally:
+ os.umask(um)
def gen_label(base, label):