diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-08-09 18:02:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-08-09 18:02:34 +0000 |
commit | a9849078ac15df02372b5ccc3a613c534fbbb093 (patch) | |
tree | 0de21ea766d87e414042ee0b2dd89624d06e68c1 | |
parent | 9ecf8d19aff5e67e9ab61bbea2f7804095e71dd3 (diff) | |
download | portage-a9849078ac15df02372b5ccc3a613c534fbbb093.tar.gz portage-a9849078ac15df02372b5ccc3a613c534fbbb093.tar.bz2 portage-a9849078ac15df02372b5ccc3a613c534fbbb093.zip |
Return early from global directory initialization if the current user does not have write access to $ROOT.
svn path=/main/trunk/; revision=4209
-rw-r--r-- | pym/portage.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py index 1d31065fe..0e30cc939 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1244,6 +1244,9 @@ class config: def _init_dirs(self): """Create tmp, var/tmp and var/lib/portage (relative to $ROOT).""" + if not os.access(self["ROOT"], os.W_OK): + return + dir_mode_map = { "tmp" :(-1, 01777, 0), "var/tmp" :(-1, 01777, 0), |