aboutsummaryrefslogtreecommitdiffstats
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-08-19 09:53:31 -0700
committerChris Larson <chris_larson@mentor.com>2010-08-20 17:56:07 -0700
commit2b7ea6f52dfa7c6cdbbb426e13efba1b4914e7b9 (patch)
tree6d0a2664ce14ff6b40f106a2888257e91791c85b /classes/base.bbclass
parente325cc7b38be32e6352f19b4712f96144be3ffe5 (diff)
downloadopenembedded-2b7ea6f52dfa7c6cdbbb426e13efba1b4914e7b9.tar.gz
Fix the package_arch=machine_arch logic to use FILESPATH*
- Use FILESPATHPKG and FILESPATHBASE to locate the machine specific dirs - Use the fetch urldata rather than poking at urls ourselves - Move the logic into utils.bbclass as def'd python functions - Simplify Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass21
1 files changed, 4 insertions, 17 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 02c7875c03..89f983f548 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -442,23 +442,10 @@ python () {
# unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
#
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)
- if len(paths) != 0:
- for s in srcuri.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" % (pkg_arch, mach_arch))
- bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
- bb.data.setVar('MULTIMACH_ARCH', mach_arch, d)
- return
+ if override != '0' and is_machine_specific(d):
+ bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
+ bb.data.setVar('MULTIMACH_ARCH', mach_arch, d)
+ return
multiarch = pkg_arch