From cbd1581239d48618881ae9802c54e44920fcd4ce Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 7 Dec 2005 00:43:17 +0000 Subject: if PORT_LOGDIR doesnt exist, then try to create it automagically svn path=/main/trunk/; revision=2340 --- pym/portage.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit v1.2.3-1-g7c22