summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-11-25 23:47:36 +0000
committerRichard Purdie <richard@openedhand.com>2007-11-25 23:47:36 +0000
commit4743a3fbed9663aa04ea100bf869c63eef6d72a1 (patch)
treec0ddc24b3470892552c92f7a86ca2d91e13adf1f /meta/classes
parent251672acd9841a9d6fe5cf940eb5cd36baeff869 (diff)
downloadopenembedded-core-4743a3fbed9663aa04ea100bf869c63eef6d72a1.tar.gz
openembedded-core-4743a3fbed9663aa04ea100bf869c63eef6d72a1.tar.bz2
openembedded-core-4743a3fbed9663aa04ea100bf869c63eef6d72a1.zip
base.bbclass: Fix PKGDATA to work properly with multimachine
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3238 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass19
1 files changed, 13 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e5005b02ce..ef6c2ad7f7 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -747,7 +747,7 @@ def explode_deps(s):
def packaged(pkg, d):
import os, bb
- return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
+ return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
def read_pkgdatafile(fn):
pkgdata = {}
@@ -771,16 +771,23 @@ def read_pkgdatafile(fn):
return pkgdata
+def get_subpkgedata_fn(pkg, d):
+ import bb, os
+ archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
+ archs.reverse()
+ for arch in archs:
+ fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d)
+ if os.path.exists(fn):
+ return fn
+ return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
+
def has_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
- return os.access(fn, os.R_OK)
+ return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
def read_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
- return read_pkgdatafile(fn)
-
+ return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
def has_pkgdata(pn, d):
import bb, os