From 9ff001cba1196b91be16ff9290919de820a2d44c Mon Sep 17 00:00:00 2001 From: Shane Wang Date: Sun, 15 Apr 2012 02:58:59 +0800 Subject: Hob: reset user recipe selection and package selection after settings are changed Reset user recipe list and package list after the user changes the settings and triggers recipe reparsing. This is to continue to fix the bug [Yocto #2255] [Yocto #2255] (Bitbake rev: 95f4e9dc351f67442844ff52f90fc154fa95ba95) Signed-off-by: Shane Wang Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 12 ++++++++---- bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py | 4 +--- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'bitbake/lib/bb/ui') diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 5dd2b13a50..48053b35c5 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -60,9 +60,7 @@ class Configuration: # bblayers.conf self.layers = [] # image/recipes/packages - self.selected_image = None - self.selected_recipes = [] - self.selected_packages = [] + self.clear_selection() self.user_selected_packages = [] @@ -73,6 +71,11 @@ class Configuration: self.git_proxy_host = self.git_proxy_port = "" self.cvs_proxy_host = self.cvs_proxy_port = "" + def clear_selection(self): + self.selected_image = None + self.selected_recipes = [] + self.selected_packages = [] + def update(self, params): # settings self.curr_distro = params["distro"] @@ -988,10 +991,11 @@ class Builder(gtk.Window): return response == gtk.RESPONSE_YES, settings_changed def reparse_post_adv_settings(self): - # DO reparse recipes if not self.configuration.curr_mach: self.update_config_async() else: + self.configuration.clear_selection() + # DO reparse recipes self.populate_recipe_package_info_async() def deploy_image(self, image_name): diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py index 64c512d502..0463ee8564 100644 --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py @@ -264,9 +264,7 @@ class ImageConfigurationPage (HobPage): self.builder.configuration.curr_mach = combo_item if self.machine_combo_changed_by_manual: - self.builder.configuration.selected_image = None - self.builder.configuration.selected_recipes = [] - self.builder.configuration.selected_packages = [] + self.builder.configuration.clear_selection() # reset machine_combo_changed_by_manual self.machine_combo_changed_by_manual = True -- cgit v1.2.3-54-g00ecf