summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2009-06-23 11:55:29 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2009-07-10 14:25:46 -0300
commit6633c4c95a713bc365f5d87acc4a94621ed50034 (patch)
treea85e83fa4dc5c021a4d6ea623f4eaa4dd7a93e6b /classes
parent04f92bf788fd4f38f0cee0a5de93ce7d4f0b94f0 (diff)
base.bbclass: add support for machine configuration fallback
To avoid duplicating a lot of configurations for similar machines we needed to introduce a new concept of machine fallback. It basically means that when a list is set in MACHINE_FALLBACK variable, following is done: - those machines are added to the override list, after the machine itself; - if any of these machines matches, the package is dealt as machine specific one. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index bc50c67d4b..7f2e81f139 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1179,10 +1179,11 @@ def base_after_parse(d):
override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1)
if override != '0':
paths = []
- for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
- path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
- if os.path.isdir(path):
- paths.append(path)
+ for a in [ "${MACHINE}" ] + bb.data.getVar('MACHINE_FALLBACK', d).split():
+ for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
+ path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, a), d)
+ if os.path.isdir(path):
+ paths.append(path)
if len(paths) != 0:
for s in srcuri.split():
if not s.startswith("file://"):