diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-08-31 11:30:46 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-31 23:30:04 +0100 |
commit | 1524222c84ebaae8cd2add016f7f33ac1c20bfdd (patch) | |
tree | 91d9067dea3575cf29f81fee7ff3a90171745fa2 /bitbake | |
parent | 8f716abaa48a61a264a854ce081ee551e6a8fbbc (diff) | |
download | poky-1524222c84ebaae8cd2add016f7f33ac1c20bfdd.tar.gz |
bitbake: 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.
(Bitbake rev: f120355eaec4571ba6d60fc5f7ae9e1f31d846d1)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a2c1b40203..1ed3fd4cea 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1255,10 +1255,6 @@ class BBCooker: | |||
1255 | # specify a target to be built, so show a warning | 1255 | # specify a target to be built, so show a warning |
1256 | bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") | 1256 | bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.") |
1257 | 1257 | ||
1258 | # Parse the configuration here. We need to do it explicitly here since | ||
1259 | # buildFile() doesn't use the cache | ||
1260 | self.parseConfiguration() | ||
1261 | |||
1262 | self.buildFileInternal(buildfile, task) | 1258 | self.buildFileInternal(buildfile, task) |
1263 | 1259 | ||
1264 | def buildFileInternal(self, buildfile, task, fireevents=True, quietlog=False): | 1260 | def buildFileInternal(self, buildfile, task, fireevents=True, quietlog=False): |
@@ -1266,6 +1262,10 @@ class BBCooker: | |||
1266 | Build the file matching regexp buildfile | 1262 | Build the file matching regexp buildfile |
1267 | """ | 1263 | """ |
1268 | 1264 | ||
1265 | # Parse the configuration here. We need to do it explicitly here since | ||
1266 | # buildFile() doesn't use the cache | ||
1267 | self.parseConfiguration() | ||
1268 | |||
1269 | # If we are told to do the None task then query the default task | 1269 | # If we are told to do the None task then query the default task |
1270 | if (task == None): | 1270 | if (task == None): |
1271 | task = self.configuration.cmd | 1271 | task = self.configuration.cmd |