summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 3b10c985e5..975112b6b1 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"