]> code.ossystems Code Review - openembedded-core.git/commitdiff
packagedata.py: Fix read_subpkgdata_dict()
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Jun 2011 15:01:18 +0000 (16:01 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Jun 2011 15:01:20 +0000 (16:01 +0100)
If both VAR and VAR_foo are in subd, we need to ensure VAR_foo gets
returned. Currently the code would work randomly. The only current
user is the rpm packaging backend.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/packagedata.py

index ee10a233fa92a4a7c9900d8437207d76b7ba1867..918e7ad2cc22de9bdd23116795ddec0cfc7c28b3 100644 (file)
@@ -58,6 +58,8 @@ def read_subpkgdata_dict(pkg, d):
     subd = read_pkgdatafile(get_subpkgedata_fn(pkg, d))
     for var in subd:
         newvar = var.replace("_" + pkg, "")
+        if newvar == var and var + "_" + pkg in subd:
+            continue
         ret[newvar] = subd[var]
     return ret