if PORT_LOGDIR doesnt exist, then try to create it automagically
authorMike Frysinger <vapier@gentoo.org>
Wed, 7 Dec 2005 00:43:17 +0000 (00:43 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 7 Dec 2005 00:43:17 +0000 (00:43 -0000)
svn path=/main/trunk/; revision=2340

pym/portage.py

index 806fecab968d8c20a65e811f63fb3b8d46d24e21..3fcded6945aec1956f26757a11e4630344fc288e 100644 (file)
@@ -2685,6 +2685,12 @@ def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,clea
                mysettings["D"]=mysettings["BUILDDIR"]+"/image/"
 
                if mysettings.has_key("PORT_LOGDIR"):
+                       if not os.access(mysettings["PORT_LOGDIR"],os.F_OK):
+                               try:
+                                       os.mkdir(mysettings["PORT_LOGDIR"])
+                               except OSError:
+                                       print "!!! Unable to create PORT_LOGDIR"
+                                       print "!!!",e
                        if os.access(mysettings["PORT_LOGDIR"]+"/",os.W_OK):
                                try:
                                        os.chown(mysettings["PORT_LOGDIR"],portage_uid,portage_gid)