mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 15:32:27 +02:00
build: fix -D with shell functions
(Bitbake rev: 1c8be64732fdf4f3a608c090b3dc92065d6058d6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
aaa55880ac
commit
6f80455777
@@ -103,13 +103,27 @@ class TaskInvalid(TaskBase):
|
||||
self._message = "No such task '%s'" % task
|
||||
|
||||
|
||||
class tee(file):
|
||||
class LogTee(object):
|
||||
def __init__(self, logger, *files):
|
||||
self.files = files
|
||||
self.logger = logger
|
||||
|
||||
def write(self, string):
|
||||
logger.plain(string)
|
||||
file.write(self, string)
|
||||
self.logger.plain(string)
|
||||
for f in self.files:
|
||||
f.write(string)
|
||||
|
||||
def __enter__(self):
|
||||
for f in self.files:
|
||||
f.__enter__()
|
||||
return self
|
||||
|
||||
def __exit__(self, *excinfo):
|
||||
for f in self.files:
|
||||
f.__exit__(*excinfo)
|
||||
|
||||
def __repr__(self):
|
||||
return "<open[tee] file '{0}'>".format(self.name)
|
||||
return '<LogTee {0}>'.format(', '.join(repr(f.name) for f in self.files))
|
||||
|
||||
|
||||
def exec_func(func, d, dirs = None, logfile = NULL):
|
||||
|
||||
Reference in New Issue
Block a user