diff options
author | Khem Raj <raj.khem@gmail.com> | 2010-09-15 14:15:39 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-09-15 19:16:26 -0700 |
commit | b0e141cadc987fa8003969e5b6173b75a7c882d3 (patch) | |
tree | 5e099e92278e4f75e5b563c078223d35ae458141 /classes/openmoko-base.bbclass | |
parent | 25e515ba2ff7d9670b179fce85514f598094f13a (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/openmoko-base.bbclass')
-rw-r--r-- | classes/openmoko-base.bbclass | 5 |
1 files changed, 4 insertions, 1 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" |