summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-28 16:18:47 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:27:57 +1200
commit3e7627417303deb605619ec8653166dc3ade58fe (patch)
tree4b8c462a640ea006160047651955cfca88cc7e7d
parent2c1ea0d7e87f7ffb4dc5b2d44203ca6f3533370f (diff)
downloadbitbake-contrib-3e7627417303deb605619ec8653166dc3ade58fe.tar.gz
cooker: ensure we can run buildFileInternal() after cache is populated
If you run some other operations that result in the cache being populated, and then call buildFileInternal(), then you can end up in a situation where the cache already contains information about the recipe. For example in OE this can now happen when you use devtool upgrade. Normally this doesn't cause any problems, unless you have a non-absolute path in BBLAYERS - in buildFileInternal() we are calling matchfile() which will convert the filename to absolute, but later when taskdata goes to find the providers of the recipe it finds the non-absolute path, sets up the task information using this and then the runqueue can't find any tasks matching the absolute path. To fix this, back out the optimisation I did earlier in bitbake rev ba53e067a2d448dd63b4ca252557ce98aa8e6321 to avoid calling parseConfiguration() again, which is unfortunate but does result in the cached information being that causes the problem being cleared out. This fixes "Task do_unpack does not exist for target ..." running devtool upgrade within intel-iot-refkit. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--lib/bb/cooker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index db034b9e8..1434f01cc 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1242,10 +1242,6 @@ class BBCooker:
# specify a target to be built, so show a warning
bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.")
- # Parse the configuration here. We need to do it explicitly here since
- # buildFile() doesn't use the cache
- self.parseConfiguration()
-
self.buildFileInternal(buildfile, task)
def buildFileInternal(self, buildfile, task, fireevents=True, quietlog=False):
@@ -1253,6 +1249,10 @@ class BBCooker:
Build the file matching regexp buildfile
"""
+ # Parse the configuration here. We need to do it explicitly here since
+ # buildFile() doesn't use the cache
+ self.parseConfiguration()
+
# If we are told to do the None task then query the default task
if (task == None):
task = self.configuration.cmd