summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cache.py3
-rw-r--r--bitbake/lib/bb/runqueue.py6
2 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index d495f9e75a..fe35e132e9 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -143,6 +143,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
143 self.section = self.getvar('SECTION', metadata) 143 self.section = self.getvar('SECTION', metadata)
144 self.fakerootenv = self.getvar('FAKEROOTENV', metadata) 144 self.fakerootenv = self.getvar('FAKEROOTENV', metadata)
145 self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata) 145 self.fakerootdirs = self.getvar('FAKEROOTDIRS', metadata)
146 self.fakerootnoenv = self.getvar('FAKEROOTNOENV', metadata)
146 147
147 @classmethod 148 @classmethod
148 def init_cacheData(cls, cachedata): 149 def init_cacheData(cls, cachedata):
@@ -178,6 +179,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
178 cachedata.license = {} 179 cachedata.license = {}
179 cachedata.section = {} 180 cachedata.section = {}
180 cachedata.fakerootenv = {} 181 cachedata.fakerootenv = {}
182 cachedata.fakerootnoenv = {}
181 cachedata.fakerootdirs = {} 183 cachedata.fakerootdirs = {}
182 184
183 def add_cacheData(self, cachedata, fn): 185 def add_cacheData(self, cachedata, fn):
@@ -243,6 +245,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
243 cachedata.license[fn] = self.license 245 cachedata.license[fn] = self.license
244 cachedata.section[fn] = self.section 246 cachedata.section[fn] = self.section
245 cachedata.fakerootenv[fn] = self.fakerootenv 247 cachedata.fakerootenv[fn] = self.fakerootenv
248 cachedata.fakerootnoenv[fn] = self.fakerootnoenv
246 cachedata.fakerootdirs[fn] = self.fakerootdirs 249 cachedata.fakerootdirs[fn] = self.fakerootdirs
247 250
248 251
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:
1096 1096
1097 logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' % 1097 logger.debug(2, 'Running %s:%s under fakeroot, fakedirs: %s' %
1098 (fn, taskname, ', '.join(fakedirs))) 1098 (fn, taskname, ', '.join(fakedirs)))
1099 else:
1100 envvars = (self.rqdata.dataCache.fakerootnoenv[fn] or "").split()
1101 for key, value in (var.split('=') for var in envvars):
1102 envbackup[key] = os.environ.get(key)
1103 os.environ[key] = value
1104 fakeenv[key] = value
1099 1105
1100 sys.stdout.flush() 1106 sys.stdout.flush()
1101 sys.stderr.flush() 1107 sys.stderr.flush()