From ca9d2d3b0793f4baac2b8a6e90d4d95ced47663b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 8 Apr 2007 19:36:54 +0000 Subject: [PATCH] =?utf8?q?Only=20apply=20permissions=20to=20ccache,=20conf?= =?utf8?q?cache,=20and=20distcc=20dirs=20when=20they=20are=20created=20in?= =?utf8?q?=20order=20to=20avoid=20interference=20with=20whatever=20the=20u?= =?utf8?q?ser's=20preferred=20permissions=20are.=20=20Thanks=20to=20Diego?= =?utf8?q?=20Petten=C3=B2=20=20for=20reporting.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=6354 --- pym/portage/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3e09e9992..072262a31 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3219,12 +3219,12 @@ def prepare_build_dirs(myroot, mysettings, cleanup): "confcache":{ "basedir_var":"CONFCACHE_DIR", "default_dir":os.path.join(mysettings["PORTAGE_TMPDIR"], "confcache"), - "always_recurse":True}, + "always_recurse":False}, "distcc":{ "basedir_var":"DISTCC_DIR", "default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"), "subdirs":("lock", "state"), - "always_recurse":True} + "always_recurse":False} } dirmode = 02070 filemode = 060 @@ -3241,11 +3241,10 @@ def prepare_build_dirs(myroot, mysettings, cleanup): for subdir in kwargs["subdirs"]: mydirs.append(os.path.join(basedir, subdir)) for mydir in mydirs: - modified = portage.util.ensure_dirs(mydir, - gid=portage_gid, mode=dirmode, mask=modemask) - # To avoid excessive recursive stat calls, we trigger - # recursion when the top level directory does not initially - # match our permission requirements. + modified = portage.util.ensure_dirs(mydir) + # Generally, we only want to apply permissions for + # initial creation. Otherwise, we don't know exactly what + # permissions the user wants, so should leave them as-is. if modified or kwargs["always_recurse"]: if modified: writemsg("Adjusting permissions recursively: '%s'\n" % mydir, -- 2.26.2