diff options
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 19 |
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 |