From: Mike Frysinger Date: Wed, 7 Dec 2005 00:43:17 +0000 (-0000) Subject: if PORT_LOGDIR doesnt exist, then try to create it automagically X-Git-Tag: v2.1_pre1~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cbd1581239d48618881ae9802c54e44920fcd4ce;p=portage.git if PORT_LOGDIR doesnt exist, then try to create it automagically svn path=/main/trunk/; revision=2340 --- diff --git a/pym/portage.py b/pym/portage.py index 806fecab9..3fcded694 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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)