From b0e141cadc987fa8003969e5b6173b75a7c882d3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Sep 2010 14:15:39 -0700 Subject: openmoko2.bbclass, openmoko-base.bbclass: Fix openmoko_two_get_license and openmoko_two_get_subdir Usually openmoko inheriting recipes have SECTION like openmoko/libs etc then the code works well but for packages e.g. -dev -dbg same section is not true and the functions fail File "openmoko2.bbclass", line 2, in openmoko_two_get_subdir ValueError: need more than 1 value to unpack This patch makes sure to split the string only if SECTION contains '/' Signed-off-by: Khem Raj --- classes/openmoko-base.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes/openmoko-base.bbclass') diff --git a/classes/openmoko-base.bbclass b/classes/openmoko-base.bbclass index f1ca536c54..b5459d5066 100644 --- a/classes/openmoko-base.bbclass +++ b/classes/openmoko-base.bbclass @@ -4,7 +4,10 @@ OPENMOKO_RELEASE ?= "OM-2007.2" OPENMOKO_MIRROR ?= "svn://svn.openmoko.org/trunk" def openmoko_base_get_subdir(d): - openmoko, section = bb.data.getVar('SECTION', d, 1).split("/") + if bb.data.getVar('SECTION', d, 1).find("/") != -1: + openmoko, section = bb.data.getVar('SECTION', d, 1).split("/") + else: + section = bb.data.getVar('SECTION', d, 1) if section == 'base' or section == 'libs': return "" elif section in 'apps tools pim'.split(): return "applications" elif section == "panel-plugin": return "panel-plugins" -- cgit 1.2.3-korg