summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-02-21 17:46:42 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-22 22:10:56 +0000
commitf2b572072c754048aaafdc4c42b71af87d61d9e7 (patch)
tree3d21d261b98af238270cd795f3765a162ec4097d /meta
parent264d1254e5ac11613af06c0f1c53c736f54e9f54 (diff)
downloadopenembedded-core-f2b572072c754048aaafdc4c42b71af87d61d9e7.tar.gz
openembedded-core-f2b572072c754048aaafdc4c42b71af87d61d9e7.tar.bz2
openembedded-core-f2b572072c754048aaafdc4c42b71af87d61d9e7.zip
base.bbclass: check all entries of FILESPATH for MACHINE overrides
The logic which looks for MACHINE overrides in SRC_URI and updates PACKAGE_ARCH was checking only certain subdirectories of the recipes parent which, amongst other issues, doesn't account for SRC_URI overrides in layers. This patch changes the logic such that all FILESPATH entries are checked for children named for MACHINE. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 () {
# We always try to scan SRC_URI for urls with machine overrides
# unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
#
- override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', 1)
+ override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', True)
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)
+ fpaths = (d.getVar('FILESPATH', True) or '').split(':')
+ machine = d.getVar('MACHINE', True)
+ for p in fpaths:
+ if os.path.basename(p) == machine and os.path.isdir(p):
+ paths.append(p)
+
if len(paths) != 0:
for s in srcuri.split():
if not s.startswith("file://"):
@@ -468,7 +470,7 @@ python () {
local = fetcher.localpath(s)
for mp in paths:
if local.startswith(mp):
- #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch))
+ #bb.note("overriding PACKAGE_ARCH from %s to %s for %s" % (pkg_arch, mach_arch, pn))
d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
return