From bc267ef6febb810470aeeb03e091d1a8d6c60e70 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 22 Nov 2013 13:31:47 +0000 Subject: bitbake: 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] (Bitbake rev: f34d0606f87ce9dacadeb78bac35879b74f10559) Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-worker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/bin') diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 66b6aabfdb..ff20c1ca98 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf