diff options
Diffstat (limited to 'poky/bitbake/bin/bitbake-worker')
-rwxr-xr-x | poky/bitbake/bin/bitbake-worker | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/poky/bitbake/bin/bitbake-worker b/poky/bitbake/bin/bitbake-worker index 9334f11fb..7765b9368 100755 --- a/poky/bitbake/bin/bitbake-worker +++ b/poky/bitbake/bin/bitbake-worker @@ -118,7 +118,9 @@ def worker_child_fire(event, d): data = b"<event>" + pickle.dumps(event) + b"</event>" try: worker_pipe_lock.acquire() - worker_pipe.write(data) + while(len(data)): + written = worker_pipe.write(data) + data = data[written:] worker_pipe_lock.release() except IOError: sigterm_handler(None, None) @@ -148,11 +150,15 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha taskdep = workerdata["taskdeps"][fn] if 'umask' in taskdep and taskname in taskdep['umask']: + umask = taskdep['umask'][taskname] + elif workerdata["umask"]: + umask = workerdata["umask"] + if umask: # umask might come in as a number or text string.. try: - umask = int(taskdep['umask'][taskname],8) + umask = int(umask, 8) except TypeError: - umask = taskdep['umask'][taskname] + pass dry_run = cfg.dry_run or dry_run_exec @@ -167,7 +173,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha fakedirs = (workerdata["fakerootdirs"][fn] or "").split() for p in fakedirs: bb.utils.mkdirhier(p) - logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' % + logger.debug2('Running %s:%s under fakeroot, fakedirs: %s' % (fn, taskname, ', '.join(fakedirs))) else: envvars = (workerdata["fakerootnoenv"][fn] or "").split() @@ -321,7 +327,9 @@ class runQueueWorkerPipe(): end = len(self.queue) index = self.queue.find(b"</event>") while index != -1: - worker_fire_prepickled(self.queue[:index+8]) + msg = self.queue[:index+8] + assert msg.startswith(b"<event>") and msg.count(b"<event>") == 1 + worker_fire_prepickled(msg) self.queue = self.queue[index+8:] index = self.queue.find(b"</event>") return (end > start) |