diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-23 14:28:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-25 12:35:48 +0000 |
commit | 784ca68fcca4ffb34390d55d9343570cfdf0305f (patch) | |
tree | d9cc4dc23e5f976fa84177bd205b394c102f79d2 /meta/classes/sstate.bbclass | |
parent | 6107ee294afde395e39d084c33e8e94013c625a9 (diff) | |
download | openembedded-core-784ca68fcca4ffb34390d55d9343570cfdf0305f.tar.gz openembedded-core-784ca68fcca4ffb34390d55d9343570cfdf0305f.tar.bz2 openembedded-core-784ca68fcca4ffb34390d55d9343570cfdf0305f.zip |
sstate: Add optimisation for useradd injected dependencies
useradd.bbclass adds sstate dependencies on base-passwd, shadow-native and
shadow-sysroot. Due to the way these are injected, they interact badly with
the other dependency validation logic and end up pulling in dependencies we
don't actually need. This patch adds code to optimise those cases out.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index bc9f7ad739..edddd2fa75 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -666,6 +666,9 @@ def setscene_depvalid(task, taskdependees, notneeded, d): # Consider sysroot depending on sysroot tasks if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot': + # base-passwd/shadow-sysroot don't need their dependencies + if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")): + continue # Nothing need depend on libc-initial/gcc-cross-initial if taskdependees[task][0].endswith("-initial"): continue @@ -681,6 +684,11 @@ def setscene_depvalid(task, taskdependees, notneeded, d): # Target populate_sysroot need their dependencies return False + # This is due to the [depends] in useradd.bbclass complicating matters + # The logic *is* reversed here due to the way hard setscene dependencies are injected + if taskdependees[task][1] == 'do_package' and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd')) and taskdependees[dep][1] == 'do_populate_sysroot': + continue + # Safe fallthrough default bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep]))) return False |