summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-09-15 14:15:39 -0700
committerKhem Raj <raj.khem@gmail.com>2010-09-15 19:16:26 -0700
commitb0e141cadc987fa8003969e5b6173b75a7c882d3 (patch)
tree5e099e92278e4f75e5b563c078223d35ae458141 /classes
parent25e515ba2ff7d9670b179fce85514f598094f13a (diff)
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 <raj.khem@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/openmoko-base.bbclass5
-rw-r--r--classes/openmoko2.bbclass10
2 files changed, 12 insertions, 3 deletions
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"
diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass
index 1dfef64963..25dea8232c 100644
--- a/classes/openmoko2.bbclass
+++ b/classes/openmoko2.bbclass
@@ -5,11 +5,17 @@ OPENMOKO_RELEASE ?= "OM-2007.2"
OPENMOKO_MIRROR ?= "svn://svn.openmoko.org/trunk"
def openmoko_two_get_license(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)
return "LGPL GPL".split()[section != "libs"]
def openmoko_two_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': return ""
elif section == 'libs': return "libraries"
elif section in 'apps tools pim'.split(): return "applications"