summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-10-02 19:56:43 +0000
committerRichard Purdie <richard@openedhand.com>2008-10-02 19:56:43 +0000
commit6e62524f3780f20eea282fa3aa5f0a30c3d0b8b6 (patch)
tree76a3a89a0efa01ead8d91bf16c59ae0a1869c728
parent5bcae485f5074031ee989e9c8fb81f3e9114c770 (diff)
downloadopenembedded-core-6e62524f3780f20eea282fa3aa5f0a30c3d0b8b6.tar.gz
openembedded-core-6e62524f3780f20eea282fa3aa5f0a30c3d0b8b6.tar.bz2
openembedded-core-6e62524f3780f20eea282fa3aa5f0a30c3d0b8b6.tar.xz
openembedded-core-6e62524f3780f20eea282fa3aa5f0a30c3d0b8b6.zip
base.bbclass: Add read_subpkgdata_dict function
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5389 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/classes/base.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 3b10c985e..975112b6b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -936,6 +936,19 @@ python read_subpackage_metadata () {
bb.data.setVar(key, sdata[key], d)
}
+
+#
+# Collapse FOO_pkg variables into FOO
+#
+def read_subpkgdata_dict(pkg, d):
+ import bb
+ ret = {}
+ subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d))
+ for var in subd:
+ newvar = var.replace("_" + pkg, "")
+ ret[newvar] = subd[var]
+ return ret
+
# Make sure MACHINE isn't exported
# (breaks binutils at least)
MACHINE[unexport] = "1"