diff options
author | Richard Purdie <richard@openedhand.com> | 2008-10-02 19:56:43 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2009-03-19 20:22:36 +0100 |
commit | 634c76d02e5796f5e908b6d6a79dcfef6f8af3d1 (patch) | |
tree | 5f8c09754a6d13c50c058b45f144702b71c94882 /classes/base.bbclass | |
parent | e3105234f8840679197b171b51203ad6c90349b3 (diff) |
base.bbclass: Add read_subpkgdata_dict function (from Poky)
git-svn-id: https://svn.o-hand.com/repos/poky@5389 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'classes/base.bbclass')
-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" |