diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-11 22:46:16 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-11 22:46:16 +0000 |
commit | c9c5d36d35a74630c11a958cc77b60bee96e3d69 (patch) | |
tree | 37b57f7c9c092623a88e895c3525ebcd23cca374 /meta | |
parent | ffbadaa8e1bbaf13234b52f881b86c5085cadf16 (diff) | |
download | openembedded-core-c9c5d36d35a74630c11a958cc77b60bee96e3d69.tar.gz openembedded-core-c9c5d36d35a74630c11a958cc77b60bee96e3d69.tar.bz2 openembedded-core-c9c5d36d35a74630c11a958cc77b60bee96e3d69.zip |
base.bbclass: Fix SRC_URI_OVERRIDES_PACKAGE_ARCH handling
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2482 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 5d26c2b7ed..643b9f429e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -845,23 +845,28 @@ def base_after_parse(d): if (old_arch == mach_arch): # Nothing to do return + + # + # We always try to scan SRC_URI for urls with machine overrides + # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0 + # override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) - - if not override or override == '0': + if override == '0': return - + paths = [] - for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]: - paths.append(bb.data.expand(os.path.join(p, mach_arch), d)) + for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: + paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)) for s in bb.data.getVar('SRC_URI', d, 1).split(): + if not s.startswith("file://"): + continue local = bb.data.expand(bb.fetch.localpath(s, d), d) for mp in paths: if local.startswith(mp): #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) - bb.data.setVar('PACKAGE_ARCH', mach_arch, d) + bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) return - python () { base_after_parse_two(d) base_after_parse(d) |