From: Yao Zhao Date: Thu, 2 Aug 2012 16:06:36 +0000 (-0400) Subject: base.bbclass: fix PACKAGECONFIG handling code X-Git-Tag: rev_ivi_2015_02_04~15949 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e14957b6bb40d5fc603e1489678bf6f73c4b0131;p=scm%2Fbb%2Ftizen-distro.git 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. (From OE-Core rev: 884cab0428cff2ffd070b6f36b688ca9851fbe43) Signed-off-by: Yao Zhao Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index acc3217..1a094ad 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)