summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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