summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-30 21:17:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:04 +0100
commitfcac678c6c74185f411e8548165c824bf087d37f (patch)
tree93e06d5887b434cb14aa73561e7dc97948d1ae14 /bitbake
parent29c8eb4759714ace5056933e793076cbc4377888 (diff)
downloadpoky-fcac678c6c74185f411e8548165c824bf087d37f.tar.gz
bitbake: cooker: Ensure buildFile doesn't have lasting side effects
BB_SERVER_TIMEOUT=100 oe-selftest -r devtool.DevtoolTests.test_devtool_build_image fails, the reason is that internally, the limited_deps flag is set in the bitbake server and then never cleared. This causes the sysroots to be setup incorrectly (as per the limited dependency case) and builds break. There is also potential for corruption of recipecaches. Add shutdown/cleanup code to ensure these effects don't 'stick'. This bug is particularly nasty as you can destroy TMPDIR with large sysroots in build work directories which are prone to break. Also ensure mtime cache is cleared (to match buildTargets) and that no lasting changes are made to siggen either which ensures: BB_SERVER_TIMEOUT=100 oe-selftest -r devtool.DevtoolTests.test_devtool_upgrade_git devtool.DevtoolTests.test_devtool_virtual_kernel_modify works. (Bitbake rev: 0a7ee8c8378bba9877c260b1aee782878f1935b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 1ed3fd4cea..ab3de91dac 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1276,6 +1276,7 @@ class BBCooker:
1276 fn = self.matchFile(fn) 1276 fn = self.matchFile(fn)
1277 1277
1278 self.buildSetVars() 1278 self.buildSetVars()
1279 self.reset_mtime_caches()
1279 1280
1280 bb_cache = bb.cache.Cache(self.databuilder, self.data_hash, self.caches_array) 1281 bb_cache = bb.cache.Cache(self.databuilder, self.data_hash, self.caches_array)
1281 1282
@@ -1356,6 +1357,10 @@ class BBCooker:
1356 if fireevents: 1357 if fireevents:
1357 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.databuilder.mcdata[mc]) 1358 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.databuilder.mcdata[mc])
1358 self.command.finishAsyncCommand(msg) 1359 self.command.finishAsyncCommand(msg)
1360 # We trashed self.recipecaches above
1361 self.parsecache_valid = False
1362 self.configuration.limited_deps = False
1363 bb.parse.siggen.reset(self.data)
1359 if quietlog: 1364 if quietlog:
1360 bb.runqueue.logger.setLevel(rqloglevel) 1365 bb.runqueue.logger.setLevel(rqloglevel)
1361 return False 1366 return False