diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-22 13:31:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-22 14:18:39 +0000 |
commit | f34d0606f87ce9dacadeb78bac35879b74f10559 (patch) | |
tree | 029f3215cb10ec4838158210c41e0c3bbe6f412c /bin | |
parent | 6a48474de9505a3700863f31839a7c53c5e18a8d (diff) | |
download | bitbake-contrib-f34d0606f87ce9dacadeb78bac35879b74f10559.tar.gz |
runqueue/bitbake-worker: Fix dry run fakeroot issues
When using the dry run option (-n), bitbake would still try and fire
a specific fakeroot worker. This is doomed to failure since it might
well not have been built.
Add in some checks to prevent the failures.
[YOCTO #5367]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bitbake-worker | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/bitbake-worker b/bin/bitbake-worker index 66b6aabfd..ff20c1ca9 100755 --- a/bin/bitbake-worker +++ b/bin/bitbake-worker @@ -97,7 +97,8 @@ def fork_off_task(cfg, data, workerdata, fn, task, taskname, appends, quieterror except TypeError: umask = taskdep['umask'][taskname] - if 'fakeroot' in taskdep and taskname in taskdep['fakeroot']: + # We can't use the fakeroot environment in a dry run as it possibly hasn't been built + if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and not cfg.dry_run: envvars = (workerdata["fakerootenv"][fn] or "").split() for key, value in (var.split('=') for var in envvars): envbackup[key] = os.environ.get(key) |