diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-09-19 17:48:36 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-22 12:19:42 +0100 |
commit | 19174b07962b6ed8d266badbfa2774abdd9d61d6 (patch) | |
tree | fbb8e5c8f596d8bdffb189d9f0e6040a1747e1a5 | |
parent | 8f650f2e2c8e02cc8058a29610d0d77ac1e5c64e (diff) | |
download | poky-19174b07962b6ed8d266badbfa2774abdd9d61d6.tar.gz |
uboot-config.bbclass: Use an annonymous python function
The processing needs to happen per recipe and thus it ought to use
annonymous python function instead to be triggered at event.
(From OE-Core rev: 75bde3ee02262cb3c6b91279ca277e3e5324ee5e)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/uboot-config.bbclass | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass index fc37620369..44b46ffa0b 100644 --- a/meta/classes/uboot-config.bbclass +++ b/meta/classes/uboot-config.bbclass | |||
@@ -7,14 +7,12 @@ | |||
7 | # | 7 | # |
8 | # Copyright 2013 (C) O.S. Systems Software LTDA. | 8 | # Copyright 2013 (C) O.S. Systems Software LTDA. |
9 | 9 | ||
10 | addhandler uboot_config_eventhandler | 10 | python () { |
11 | uboot_config_eventhandler[eventmask] = "bb.event.ConfigParsed" | 11 | ubootconfigflags = d.getVarFlags('UBOOT_CONFIG') |
12 | python uboot_config_eventhandler() { | ||
13 | ubootconfigflags = e.data.getVarFlags('UBOOT_CONFIG') | ||
14 | if not ubootconfigflags: | 12 | if not ubootconfigflags: |
15 | return | 13 | return |
16 | 14 | ||
17 | ubootconfig = (e.data.getVar('UBOOT_CONFIG', True) or "").split() | 15 | ubootconfig = (d.getVar('UBOOT_CONFIG', True) or "").split() |
18 | if len(ubootconfig) > 1: | 16 | if len(ubootconfig) > 1: |
19 | raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.') | 17 | raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.') |
20 | elif len(ubootconfig) == 0: | 18 | elif len(ubootconfig) == 0: |
@@ -31,9 +29,9 @@ python uboot_config_eventhandler() { | |||
31 | 29 | ||
32 | if ubootconfig == f: | 30 | if ubootconfig == f: |
33 | bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0]) | 31 | bb.debug(1, "Setting UBOOT_MACHINE to %s." % items[0]) |
34 | e.data.setVar('UBOOT_MACHINE', items[0]) | 32 | d.setVar('UBOOT_MACHINE', items[0]) |
35 | 33 | ||
36 | if items[1]: | 34 | if items[1]: |
37 | bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1]) | 35 | bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1]) |
38 | e.data.appendVar('IMAGE_FSTYPES', ' ' + items[1]) | 36 | d.appendVar('IMAGE_FSTYPES', ' ' + items[1]) |
39 | } | 37 | } |