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

pym/portage.py

index 8cc167dbf438dbb20d898721bf7cd1532a98fee5..8e8f87b7aebd2ac6e13ec5ea869edb5280417a40 100644 (file)
@@ -3262,8 +3262,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" % \