[OE-core] [PATCH 12/40] classes/package_rpm.bbclass: Change the way the PV is transformed
Mark Hatle
mark.hatle at windriver.com
Wed Jun 22 17:36:06 UTC 2011
There were some odd instances where the PKGV could not be loaded in the old
way. Change to verify that PKGV exists before attempting to retrieve the
value from the key.
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
meta/classes/package_rpm.bbclass | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9a854f3..b4bd374 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -329,10 +329,11 @@ python write_specfile () {
ver = depends_dict[dep]
if dep and ver:
if '-' in ver:
- subd = oe.packagedata.read_subpkgdata_dict(dep, d)
- pv = subd['PKGV']
- reppv = pv.replace('-', '+')
- ver = ver.replace(pv, reppv)
+ subd = oe.packagedata.read_subpkgdata(dep, d)
+ if 'PKGV' in subd:
+ pv = subd['PKGV']
+ reppv = pv.replace('-', '+')
+ ver = ver.replace(pv, reppv)
newdeps_dict[dep] = ver
depends = bb.utils.join_deps(newdeps_dict)
bb.data.setVar(varname, depends.strip(), d)
--
1.7.3.4
More information about the Openembedded-core
mailing list