summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/sstatesig.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index ee7cbad0d9..5a64882fba 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -1,6 +1,6 @@
1import bb.siggen 1import bb.siggen
2 2
3def sstate_rundepfilter(fn, recipename, task, dep, depname): 3def sstate_rundepfilter(fn, recipename, task, dep, depname, dataCache):
4 # Return True if we should keep the dependency, False to drop it 4 # Return True if we should keep the dependency, False to drop it
5 def isNative(x): 5 def isNative(x):
6 return x.endswith("-native") 6 return x.endswith("-native")
@@ -8,13 +8,16 @@ def sstate_rundepfilter(fn, recipename, task, dep, depname):
8 return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate") 8 return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate")
9 def isNativeSDK(x): 9 def isNativeSDK(x):
10 return x.endswith("-nativesdk") 10 return x.endswith("-nativesdk")
11 def isKernel(fn):
12 inherits = " ".join(dataCache.inherits[fn])
13 return inherits.find("module-base.bbclass") != -1 or inherits.find("linux-kernel-base.bbclass") != -1
11 14
12 # Always include our own inter-task dependencies 15 # Always include our own inter-task dependencies
13 if recipename == depname: 16 if recipename == depname:
14 return True 17 return True
15 18
16 # Quilt (patch application) changing isn't likely to affect anything 19 # Quilt (patch application) changing isn't likely to affect anything
17 if depname == "quilt-native": 20 if depname == "quilt-native" and recipename != "quilt-native":
18 return False 21 return False
19 # Don't change native/cross/nativesdk recipe dependencies any further 22 # Don't change native/cross/nativesdk recipe dependencies any further
20 if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename): 23 if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename):
@@ -30,6 +33,17 @@ def sstate_rundepfilter(fn, recipename, task, dep, depname):
30 if depname in ['sysvinit-inittab', 'shadow-securetty', 'opkg-config-base', 'netbase', 'formfactor', 'xserver-xf86-config', 'pointercal', 'base-files']: 33 if depname in ['sysvinit-inittab', 'shadow-securetty', 'opkg-config-base', 'netbase', 'formfactor', 'xserver-xf86-config', 'pointercal', 'base-files']:
31 return False 34 return False
32 35
36 # Kernel modules are well namespaced. We don't want to depend on the kernel's checksum
37 # if we're just doing an RRECOMMENDS_xxx = "kernel-module-*", not least because the checksum
38 # is machine specific.
39 # Therefore if we're not a kernel or a module recipe (inheriting the kernel classes)
40 # and we reccomend a kernel-module, we exclude the dependency.
41 depfn = dep.rsplit(".", 1)[0]
42 if dataCache and isKernel(depfn) and not isKernel(fn):
43 for pkg in dataCache.runrecs[fn]:
44 if " ".join(dataCache.runrecs[fn][pkg]).find("kernel-module-") != -1:
45 return False
46
33 # Default to keep dependencies 47 # Default to keep dependencies
34 return True 48 return True
35 49
@@ -37,15 +51,15 @@ class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
37 name = "OEBasic" 51 name = "OEBasic"
38 def init_rundepcheck(self, data): 52 def init_rundepcheck(self, data):
39 pass 53 pass
40 def rundep_check(self, fn, recipename, task, dep, depname): 54 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
41 return sstate_rundepfilter(fn, recipename, task, dep, depname) 55 return sstate_rundepfilter(fn, recipename, task, dep, depname, dataCache)
42 56
43class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): 57class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
44 name = "OEBasicHash" 58 name = "OEBasicHash"
45 def init_rundepcheck(self, data): 59 def init_rundepcheck(self, data):
46 pass 60 pass
47 def rundep_check(self, fn, recipename, task, dep, depname): 61 def rundep_check(self, fn, recipename, task, dep, depname, dataCache = None):
48 return sstate_rundepfilter(fn, recipename, task, dep, depname) 62 return sstate_rundepfilter(fn, recipename, task, dep, depname, dataCache)
49 63
50# Insert these classes into siggen's namespace so it can see and select them 64# Insert these classes into siggen's namespace so it can see and select them
51bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic 65bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic