For bug #82378, only set permissions on PORT_LOGDIR if it is created automatically.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Jun 2007 05:58:17 +0000 (05:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Jun 2007 05:58:17 +0000 (05:58 -0000)
svn path=/main/trunk/; revision=6743

pym/portage/__init__.py

index 901e25875def4138649884e9703f6a13ce2c04f4..c931ed32a7bf5bd411dfda05f5b41f521d8e759b 100644 (file)
@@ -3365,8 +3365,10 @@ def prepare_build_dirs(myroot, mysettings, cleanup):
                        del mysettings["PORT_LOGDIR"]
        if "PORT_LOGDIR" in mysettings:
                try:
-                       portage.util.ensure_dirs(mysettings["PORT_LOGDIR"],
-                               uid=portage_uid, gid=portage_gid, mode=02770)
+                       modified = portage.util.ensure_dirs(mysettings["PORT_LOGDIR"])
+                       if modified:
+                               apply_secpass_permissions(mysettings["PORT_LOGDIR"],
+                                       uid=portage_uid, gid=portage_gid, mode=02770)
                except portage.exception.PortageException, e:
                        writemsg("!!! %s\n" % str(e), noiselevel=-1)
                        writemsg("!!! Permission issues with PORT_LOGDIR='%s'\n" % \