summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/base.bbclass14
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index a26ac9485e..e80e874360 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -453,13 +453,15 @@ python () {
453 # We always try to scan SRC_URI for urls with machine overrides 453 # We always try to scan SRC_URI for urls with machine overrides
454 # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0 454 # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
455 # 455 #
456 override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', 1) 456 override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', True)
457 if override != '0': 457 if override != '0':
458 paths = [] 458 paths = []
459 for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: 459 fpaths = (d.getVar('FILESPATH', True) or '').split(':')
460 path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) 460 machine = d.getVar('MACHINE', True)
461 if os.path.isdir(path): 461 for p in fpaths:
462 paths.append(path) 462 if os.path.basename(p) == machine and os.path.isdir(p):
463 paths.append(p)
464
463 if len(paths) != 0: 465 if len(paths) != 0:
464 for s in srcuri.split(): 466 for s in srcuri.split():
465 if not s.startswith("file://"): 467 if not s.startswith("file://"):
@@ -468,7 +470,7 @@ python () {
468 local = fetcher.localpath(s) 470 local = fetcher.localpath(s)
469 for mp in paths: 471 for mp in paths:
470 if local.startswith(mp): 472 if local.startswith(mp):
471 #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch)) 473 #bb.note("overriding PACKAGE_ARCH from %s to %s for %s" % (pkg_arch, mach_arch, pn))
472 d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}") 474 d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
473 return 475 return
474 476