Browse Source

packagedata.py: Fix read_subpkgdata_dict()

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>
Richard Purdie 13 years ago
parent
commit
ad098e40e8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      meta/lib/oe/packagedata.py

+ 2 - 0
meta/lib/oe/packagedata.py

@@ -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