summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-23 14:28:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-25 12:42:48 +0000
commit0d2a301bca4eb9d43243f1a03c1cd1ab3f27f30a (patch)
tree86a2556de9936f584edf769cdf20d952f863fd30 /meta/classes/sstate.bbclass
parent32472926832ed1344889c992c1919a2a8b778b2c (diff)
downloadpoky-0d2a301bca4eb9d43243f1a03c1cd1ab3f27f30a.tar.gz
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. (From OE-Core rev: 784ca68fcca4ffb34390d55d9343570cfdf0305f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass8
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):
666 666
667 # Consider sysroot depending on sysroot tasks 667 # Consider sysroot depending on sysroot tasks
668 if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot': 668 if taskdependees[task][1] == 'do_populate_sysroot' and taskdependees[dep][1] == 'do_populate_sysroot':
669 # base-passwd/shadow-sysroot don't need their dependencies
670 if taskdependees[dep][0].endswith(("base-passwd", "shadow-sysroot")):
671 continue
669 # Nothing need depend on libc-initial/gcc-cross-initial 672 # Nothing need depend on libc-initial/gcc-cross-initial
670 if taskdependees[task][0].endswith("-initial"): 673 if taskdependees[task][0].endswith("-initial"):
671 continue 674 continue
@@ -681,6 +684,11 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
681 # Target populate_sysroot need their dependencies 684 # Target populate_sysroot need their dependencies
682 return False 685 return False
683 686
687 # This is due to the [depends] in useradd.bbclass complicating matters
688 # The logic *is* reversed here due to the way hard setscene dependencies are injected
689 if taskdependees[task][1] == 'do_package' and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd')) and taskdependees[dep][1] == 'do_populate_sysroot':
690 continue
691
684 # Safe fallthrough default 692 # Safe fallthrough default
685 bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep]))) 693 bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep])))
686 return False 694 return False