diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 0848870803..f1fee83a14 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1067,6 +1067,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" |