diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-12-07 00:43:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-12-07 00:43:17 +0000 |
commit | cbd1581239d48618881ae9802c54e44920fcd4ce (patch) | |
tree | 4115d2f97cb8e7cf3a728ba22d9390ddcc04038e | |
parent | 1d91b2e2b70f92b1c1038a407f6b657e54a81019 (diff) | |
download | portage-cbd1581239d48618881ae9802c54e44920fcd4ce.tar.gz portage-cbd1581239d48618881ae9802c54e44920fcd4ce.tar.bz2 portage-cbd1581239d48618881ae9802c54e44920fcd4ce.zip |
if PORT_LOGDIR doesnt exist, then try to create it automagically
svn path=/main/trunk/; revision=2340
-rw-r--r-- | pym/portage.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |