aboutsummaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-03-02 06:29:44 +0000
committerBrian Harring <ferringb@gentoo.org>2005-03-02 06:29:44 +0000
commit191cdb9fbc0987ed35bd4fd02d4541b45f51c02f (patch)
treec04f924bf9ba7ed192aaef53df0dae50b522c957 /pym
parentforce correct owner/perms on portage logging file. (diff)
downloadportage-cvs-191cdb9fbc0987ed35bd4fd02d4541b45f51c02f.tar.gz
portage-cvs-191cdb9fbc0987ed35bd4fd02d4541b45f51c02f.tar.bz2
portage-cvs-191cdb9fbc0987ed35bd4fd02d4541b45f51c02f.zip
blah. logfile again.
Diffstat (limited to 'pym')
-rw-r--r--pym/ebuild.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/ebuild.py b/pym/ebuild.py
index d1c3fce..3ee1438 100644
--- a/pym/ebuild.py
+++ b/pym/ebuild.py
@@ -2,7 +2,7 @@
# ebuild.py; Ebuild classes/abstraction of phase processing, and communicating with a ebuild-daemon.sh instance
# Copyright 2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#$Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/ebuild.py,v 1.13 2005/03/02 06:24:12 ferringb Exp $
+#$Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/ebuild.py,v 1.14 2005/03/02 06:29:44 ferringb Exp $
import os,sys,traceback
@@ -896,9 +896,11 @@ class ebuild_handler:
mysettings["LOG_PF"]=mysettings["PF"]
mysettings["LOG_COUNTER"]=str(db[myroot]["vartree"].dbapi.get_counter_tick_core("/"))
mysettings["PORTAGE_LOGFILE"]="%s/%s-%s.log" % (mysettings["PORT_LOGDIR"],mysettings["LOG_COUNTER"],mysettings["LOG_PF"])
- if os.path.exists(mysettings["PORTAGE_LOGFILE"]):
- os.chmod(mysettings["PORTAGE_LOGFILE"], 0664)
- os.chown(mysettings["PORtAGE_LOGFILE"], -1,portage_gid)
+ if not os.path.exists(mysettings["PORTAGE_LOGFILE"]):
+ # touch the file.
+ open(mysettings["PORTAGE_LOGFILE"], "w").close()
+ os.chmod(mysettings["PORTAGE_LOGFILE"], 0664)
+ os.chown(mysettings["PORtAGE_LOGFILE"], -1,portage_gid)
except ValueError, e:
mysettings["PORT_LOGDIR"]=""
print "!!! Unable to chown/chmod PORT_LOGDIR. Disabling logging."