Patchwork [bitbake-devel,09/32] Hob: fix a bug in builder.configuration.curr_mach

login
register
mail settings
Submitter Shane Wang
Date Feb. 29, 2012, 2:15 p.m.
Message ID <b9a15c08e9cf984a4ce6577ba341a4bcf796482a.1330523904.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/22445/
State New
Headers show

Comments

Shane Wang - Feb. 29, 2012, 2:15 p.m.
When the user changes the machine to be "--select a machine--", the builder.configuration.curr_mach should be set to empty.
Otherwise, if the user adds more layers after the above, the action will trigger recipe parsing, which is not correct.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Joshua Lock - Feb. 29, 2012, 9:29 p.m.
On 29/02/12 06:15, Shane Wang wrote:
> When the user changes the machine to be "--select a machine--", the builder.configuration.curr_mach should be set to empty.
> Otherwise, if the user adds more layers after the above, the action will trigger recipe parsing, which is not correct.
>
> Signed-off-by: Shane Wang<shane.wang@intel.com>

Signed-off-by: Joshua Lock <josh@linux.intel.com>

> ---
>   bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> index 4083360..cd86606 100644
> --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -243,6 +243,7 @@ class ImageConfigurationPage (HobPage):
>       def machine_combo_changed_cb(self, machine_combo):
>           combo_item = machine_combo.get_active_text()
>           if not combo_item or combo_item == self.__dummy_machine__:
> +            self.builder.configuration.curr_mach = ""
>               self.builder.switch_page(self.builder.MACHINE_SELECTION)
>           else:
>               self.builder.configuration.curr_mach = combo_item

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 4083360..cd86606 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -243,6 +243,7 @@  class ImageConfigurationPage (HobPage):
     def machine_combo_changed_cb(self, machine_combo):
         combo_item = machine_combo.get_active_text()
         if not combo_item or combo_item == self.__dummy_machine__:
+            self.builder.configuration.curr_mach = ""
             self.builder.switch_page(self.builder.MACHINE_SELECTION)
         else:
             self.builder.configuration.curr_mach = combo_item