summaryrefslogtreecommitdiffstats
path: root/meta
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
parent251672acd9841a9d6fe5cf940eb5cd36baeff869 (diff)
downloadpoky-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')
-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):
747 747
748def packaged(pkg, d): 748def 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
752def read_pkgdatafile(fn): 752def 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
774def 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
774def has_subpkgdata(pkg, d): 784def 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
779def read_subpkgdata(pkg, d): 788def 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
785def has_pkgdata(pn, d): 792def has_pkgdata(pn, d):
786 import bb, os 793 import bb, os