mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

Where we have machine specific recipes with well defined behaviour, it makes no sense to rebuild recipes with these as dependencies whenever the machine changes. This patch lists those well behaved recipes and excludes them from the task signatures so we can change MACHINE without invalidating existing PACKAGE_ARCH binaries. (From OE-Core rev: 07e34778fc74126af1380bf249fd34a5e3df12c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
53 lines
2.0 KiB
Python
53 lines
2.0 KiB
Python
import bb.siggen
|
|
|
|
def sstate_rundepfilter(fn, recipename, task, dep, depname):
|
|
# Return True if we should keep the dependency, False to drop it
|
|
def isNative(x):
|
|
return x.endswith("-native")
|
|
def isCross(x):
|
|
return x.endswith("-cross") or x.endswith("-cross-initial") or x.endswith("-cross-intermediate")
|
|
def isNativeSDK(x):
|
|
return x.endswith("-nativesdk")
|
|
|
|
# Always include our own inter-task dependencies
|
|
if recipename == depname:
|
|
return True
|
|
|
|
# Quilt (patch application) changing isn't likely to affect anything
|
|
if depname == "quilt-native":
|
|
return False
|
|
# Don't change native/cross/nativesdk recipe dependencies any further
|
|
if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename):
|
|
return True
|
|
|
|
# Only target packages beyond here
|
|
|
|
# Drop native/cross/nativesdk dependencies from target recipes
|
|
if isNative(depname) or isCross(depname) or isNativeSDK(depname):
|
|
return False
|
|
|
|
# Exclude well defined machine specific configurations which don't change ABI
|
|
if depname in ['sysvinit-inittab', 'shadow-securetty', 'opkg-config-base', 'netbase', 'formfactor', 'xserver-xf86-config', 'pointercal', 'base-files']:
|
|
return False
|
|
|
|
# Default to keep dependencies
|
|
return True
|
|
|
|
class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
|
|
name = "OEBasic"
|
|
def init_rundepcheck(self, data):
|
|
pass
|
|
def rundep_check(self, fn, recipename, task, dep, depname):
|
|
return sstate_rundepfilter(fn, recipename, task, dep, depname)
|
|
|
|
class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
|
|
name = "OEBasicHash"
|
|
def init_rundepcheck(self, data):
|
|
pass
|
|
def rundep_check(self, fn, recipename, task, dep, depname):
|
|
return sstate_rundepfilter(fn, recipename, task, dep, depname)
|
|
|
|
# Insert these classes into siggen's namespace so it can see and select them
|
|
bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
|
|
bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
|