diff options
author | Brian Harring <ferringb@gentoo.org> | 2005-03-09 08:56:44 +0000 |
---|---|---|
committer | Brian Harring <ferringb@gentoo.org> | 2005-03-09 08:56:44 +0000 |
commit | c1543c0b1efe696c3f7e601851b26cf4ef798191 (patch) | |
tree | a3556d954123cdf84c9b58d1604db87d4b9adee5 /pym | |
parent | Damn I'm cool. nice bug on my part, _eclasses_ is now properly processed and... (diff) | |
download | portage-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.py | 9 |
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): |