diff options
author | Yao Zhao <yao.zhao@windriver.com> | 2012-08-02 12:06:36 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-19 10:31:08 +0100 |
commit | 884cab0428cff2ffd070b6f36b688ca9851fbe43 (patch) | |
tree | a9e336789256dc5d8684db7e9bc03313afac4677 /meta | |
parent | eef9d6c2d52f5264a6e7a9d882f8323f9793fd7f (diff) | |
download | openembedded-core-884cab0428cff2ffd070b6f36b688ca9851fbe43.tar.gz openembedded-core-884cab0428cff2ffd070b6f36b688ca9851fbe43.tar.bz2 openembedded-core-884cab0428cff2ffd070b6f36b688ca9851fbe43.zip |
base.bbclass: fix PACKAGECONFIG handling code
PACKAGECONFIG flag code only handles that when it has 3 or 4 items in flag,
it may have a stale data if some flags doesn't need DEPENDS and RDEPENDS.
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index acc3217b39..1a094ad384 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -382,20 +382,19 @@ python () { if flag == "defaultval": continue items = flagval.split(",") - if len(items) == 3: - enable, disable, depend = items - rdepend = "" - elif len(items) == 4: - enable, disable, depend, rdepend = items + num = len(items) + if num > 4: + bb.error("Only enable,disable,depend,rdepend can be specified!") + if flag in pkgconfig: - if depend: - extradeps.append(depend) - if rdepend: - extrardeps.append(rdepend) - if enable: - extraconf.append(enable) - elif disable: - extraconf.append(disable) + if num >= 3 and items[2]: + extradeps.append(items[2]) + if num >= 4 and items[3]: + extrardeps.append(items[3]) + if num >= 1 and items[0]: + extraconf.append(items[0]) + elif num >= 2 and items[1]: + extraconf.append(items[1]) appendVar('DEPENDS', extradeps) appendVar('RDEPENDS_${PN}', extrardeps) appendVar('EXTRA_OECONF', extraconf) |