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:45:55 +0100 |
commit | 771f89498cf46cf04613407641f2bfd9cfa7d1e3 (patch) | |
tree | a1f29b2024a117f6002de3b3cb149b56a50911e0 /meta/classes/base.bbclass | |
parent | 61ed74a72524b7f18fe7e48d5ae7f1f6b5756919 (diff) | |
download | poky-771f89498cf46cf04613407641f2bfd9cfa7d1e3.tar.gz |
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 <yao.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-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 () { | |||
382 | if flag == "defaultval": | 382 | if flag == "defaultval": |
383 | continue | 383 | continue |
384 | items = flagval.split(",") | 384 | items = flagval.split(",") |
385 | if len(items) == 3: | 385 | num = len(items) |
386 | enable, disable, depend = items | 386 | if num > 4: |
387 | rdepend = "" | 387 | bb.error("Only enable,disable,depend,rdepend can be specified!") |
388 | elif len(items) == 4: | 388 | |
389 | enable, disable, depend, rdepend = items | ||
390 | if flag in pkgconfig: | 389 | if flag in pkgconfig: |
391 | if depend: | 390 | if num >= 3 and items[2]: |
392 | extradeps.append(depend) | 391 | extradeps.append(items[2]) |
393 | if rdepend: | 392 | if num >= 4 and items[3]: |
394 | extrardeps.append(rdepend) | 393 | extrardeps.append(items[3]) |
395 | if enable: | 394 | if num >= 1 and items[0]: |
396 | extraconf.append(enable) | 395 | extraconf.append(items[0]) |
397 | elif disable: | 396 | elif num >= 2 and items[1]: |
398 | extraconf.append(disable) | 397 | extraconf.append(items[1]) |
399 | appendVar('DEPENDS', extradeps) | 398 | appendVar('DEPENDS', extradeps) |
400 | appendVar('RDEPENDS_${PN}', extrardeps) | 399 | appendVar('RDEPENDS_${PN}', extrardeps) |
401 | appendVar('EXTRA_OECONF', extraconf) | 400 | appendVar('EXTRA_OECONF', extraconf) |