diff options
author | Richard Purdie <richard@openedhand.com> | 2007-11-25 23:47:36 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-11-25 23:47:36 +0000 |
commit | 4743a3fbed9663aa04ea100bf869c63eef6d72a1 (patch) | |
tree | c0ddc24b3470892552c92f7a86ca2d91e13adf1f /meta/classes/base.bbclass | |
parent | 251672acd9841a9d6fe5cf940eb5cd36baeff869 (diff) | |
download | poky-4743a3fbed9663aa04ea100bf869c63eef6d72a1.tar.gz |
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/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): | |||
747 | 747 | ||
748 | def packaged(pkg, d): | 748 | def packaged(pkg, d): |
749 | import os, bb | 749 | import os, bb |
750 | return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK) | 750 | return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK) |
751 | 751 | ||
752 | def read_pkgdatafile(fn): | 752 | def read_pkgdatafile(fn): |
753 | pkgdata = {} | 753 | pkgdata = {} |
@@ -771,16 +771,23 @@ def read_pkgdatafile(fn): | |||
771 | 771 | ||
772 | return pkgdata | 772 | return pkgdata |
773 | 773 | ||
774 | def get_subpkgedata_fn(pkg, d): | ||
775 | import bb, os | ||
776 | archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") | ||
777 | archs.reverse() | ||
778 | for arch in archs: | ||
779 | fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d) | ||
780 | if os.path.exists(fn): | ||
781 | return fn | ||
782 | return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) | ||
783 | |||
774 | def has_subpkgdata(pkg, d): | 784 | def has_subpkgdata(pkg, d): |
775 | import bb, os | 785 | import bb, os |
776 | fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) | 786 | return os.access(get_subpkgedata_fn(pkg, d), os.R_OK) |
777 | return os.access(fn, os.R_OK) | ||
778 | 787 | ||
779 | def read_subpkgdata(pkg, d): | 788 | def read_subpkgdata(pkg, d): |
780 | import bb, os | 789 | import bb, os |
781 | fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) | 790 | return read_pkgdatafile(get_subpkgedata_fn(pkg, d)) |
782 | return read_pkgdatafile(fn) | ||
783 | |||
784 | 791 | ||
785 | def has_pkgdata(pn, d): | 792 | def has_pkgdata(pn, d): |
786 | import bb, os | 793 | import bb, os |