diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-18 13:09:39 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-19 06:28:47 -0800 |
commit | ff734f0560649c0d8743aa1ebdaef8cfb20e6628 (patch) | |
tree | 825e2b36635ff478270d22bfd1735f03244e7edd /bitbake/lib/bb/runqueue.py | |
parent | 10968b4266a74f2f55e66368784e9b9c2aa4f592 (diff) | |
download | poky-ff734f0560649c0d8743aa1ebdaef8cfb20e6628.tar.gz |
bitbake: runqueue: Fix collapsed setscene dependency tree
When we removed the postinst sstate dependency handling code from
setscene_depvalid, we noticed things being installed into the old
style sysroot for rootfs tasks which should not have been there,
causing a performance regression.
Analysis revealed that setscene dependencies were "bubbling" over
sstate tasks when they should have been stopping there. The
'continue' added by this patch avoids this issue and eusures
sstate tasks remain contained to their specific chains.
There was another bug in the code this exposed where the acconting
for tasks as they were removed from sq_revdeps was not correct. In
fixing this, what looks like a workaround in another test can then
be simplified.
After this change, populate_sysroot tasks are no longer depending
on package_write_rpm tasks for example, which would make no sense.
A before/after analysis of image dependencies only revealed improved
dependencies after this change.
Recipe specific sysroots did highlight the issue here since the
behaviour of the sysroot dependencies (and processing with depvalid)
was not matching what bitbake itself was doing, with bitbake being
incorrect. Failures were 'safe' in that too many dependencies would
get installed.
(Bitbake rev: 5ef2cb50041fa7106c8de170af73d2a54cb0b1f0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 728b5fbb28..a3b451ad6f 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -2010,6 +2010,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2010 | for tid in self.rqdata.runq_setscene_tids: | 2010 | for tid in self.rqdata.runq_setscene_tids: |
2011 | #bb.warn("Added endpoint 2 %s" % (tid)) | 2011 | #bb.warn("Added endpoint 2 %s" % (tid)) |
2012 | for dep in self.rqdata.runtaskentries[tid].depends: | 2012 | for dep in self.rqdata.runtaskentries[tid].depends: |
2013 | if tid in sq_revdeps[dep]: | ||
2014 | sq_revdeps[dep].remove(tid) | ||
2013 | if dep not in endpoints: | 2015 | if dep not in endpoints: |
2014 | endpoints[dep] = set() | 2016 | endpoints[dep] = set() |
2015 | #bb.warn(" Added endpoint 3 %s" % (dep)) | 2017 | #bb.warn(" Added endpoint 3 %s" % (dep)) |
@@ -2029,12 +2031,13 @@ class RunQueueExecuteScenequeue(RunQueueExecute): | |||
2029 | if point in self.rqdata.runq_setscene_tids: | 2031 | if point in self.rqdata.runq_setscene_tids: |
2030 | sq_revdeps_new[point] = tasks | 2032 | sq_revdeps_new[point] = tasks |
2031 | tasks = set() | 2033 | tasks = set() |
2034 | continue | ||
2032 | for dep in self.rqdata.runtaskentries[point].depends: | 2035 | for dep in self.rqdata.runtaskentries[point].depends: |
2033 | if point in sq_revdeps[dep]: | 2036 | if point in sq_revdeps[dep]: |
2034 | sq_revdeps[dep].remove(point) | 2037 | sq_revdeps[dep].remove(point) |
2035 | if tasks: | 2038 | if tasks: |
2036 | sq_revdeps_new[dep] |= tasks | 2039 | sq_revdeps_new[dep] |= tasks |
2037 | if (len(sq_revdeps[dep]) == 0 or len(sq_revdeps_new[dep]) != 0) and dep not in self.rqdata.runq_setscene_tids: | 2040 | if len(sq_revdeps[dep]) == 0 and dep not in self.rqdata.runq_setscene_tids: |
2038 | newendpoints[dep] = task | 2041 | newendpoints[dep] = task |
2039 | if len(newendpoints) != 0: | 2042 | if len(newendpoints) != 0: |
2040 | process_endpoints(newendpoints) | 2043 | process_endpoints(newendpoints) |