diff options
author | Chris Larson <clarson@kergoth.com> | 2004-05-27 05:03:02 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-05-27 05:03:02 +0000 |
commit | 75fd96e8844935e716c19e3ed823d5fae3ed15b2 (patch) | |
tree | 0215ec089c8901a010ba8ae5408f46a43243041f /bin/oe/build.py | |
parent | 83ef6a0cd741c6ca03ca8766958110175d64b410 (diff) | |
download | bitbake-75fd96e8844935e716c19e3ed823d5fae3ed15b2.tar.gz |
Adapt oe.build code to pipe our logs through tee if OEDEBUG is set.
Diffstat (limited to 'bin/oe/build.py')
-rw-r--r-- | bin/oe/build.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/oe/build.py b/bin/oe/build.py index ab9e2f29f..9022d52cb 100644 --- a/bin/oe/build.py +++ b/bin/oe/build.py @@ -175,8 +175,16 @@ def exec_func_shell(func, d): # open logs si = file('/dev/null', 'r') - so = file(logfile, 'a') - se = file(logfile, 'a+', 0) + try: + if data.getVar("OEDEBUG", d): + so = os.popen("tee \"%s\"" % logfile, "w") + se = so + else: + so = file(logfile, 'w') + se = so + except OSError, e: + oe.error("opening log files: %s" % e) + pass # dup the existing fds so we dont lose them osi = [os.dup(sys.stdin.fileno()), sys.stdin.fileno()] |