From 12c6bcbf49d8be27545c132e6f8a18ab4b8fbccd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Nov 2011 22:19:38 +0000 Subject: Add FAKEROOTNOENV variable Add a FAKEROOTNOENV which does the opposite of the FAKEROOTENV variable and is data loaded into the environment for tasks without the fakeroot flag. The intent here is to provide a way to control the environment when we aren't needing fakeroot context which allows us to unload the preload from memory entirely and gain a valuable speedup. I'm not 100% happy with needing this at the bitbake level, particularly with the cache hit but it does give a valuable speedup. (Bitbake rev: 05c29ab0b2ad3c521414cabb6a92bca15c6e919c) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index aca06b57be..d0d6f3a998 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1096,6 +1096,12 @@ class RunQueueExecute: logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' % (fn, taskname, ', '.join(fakedirs))) + else: + envvars = (self.rqdata.dataCache.fakerootnoenv[fn] or "").split() + for key, value in (var.split('=') for var in envvars): + envbackup[key] = os.environ.get(key) + os.environ[key] = value + fakeenv[key] = value sys.stdout.flush() sys.stderr.flush() -- cgit v1.2.3-54-g00ecf