summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-03-29 20:01:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-29 21:25:53 +0100
commita8c03230341644b1a2589f89ff40fdfb382534e8 (patch)
treed2edf1794859e5d26b4849d359586b87c8cde582
parente24f10e275e30caa06a5f97b742be1a0996255d7 (diff)
downloadpoky-a8c03230341644b1a2589f89ff40fdfb382534e8.tar.gz
Hob: Remember user settings when reparse config
When config reparse is issued (e.x, adding a layer), we will firstly remember the past user settings by setting them to bitbake server, and then do the reparse. (Bitbake rev: 8a1f6953a082d8002585bfd9e8a67d2a7f69d6aa) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py13
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py8
2 files changed, 10 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 8cbc2944ee..f278b584b6 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -198,7 +198,7 @@ class Parameters:
198class Builder(gtk.Window): 198class Builder(gtk.Window):
199 199
200 (MACHINE_SELECTION, 200 (MACHINE_SELECTION,
201 LAYER_CHANGED, 201 CONFIG_UPDATED,
202 RCPPKGINFO_POPULATING, 202 RCPPKGINFO_POPULATING,
203 RCPPKGINFO_POPULATED, 203 RCPPKGINFO_POPULATED,
204 BASEIMG_SELECTED, 204 BASEIMG_SELECTED,
@@ -222,7 +222,7 @@ class Builder(gtk.Window):
222 222
223 __step2page__ = { 223 __step2page__ = {
224 MACHINE_SELECTION : IMAGE_CONFIGURATION, 224 MACHINE_SELECTION : IMAGE_CONFIGURATION,
225 LAYER_CHANGED : IMAGE_CONFIGURATION, 225 CONFIG_UPDATED : IMAGE_CONFIGURATION,
226 RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION, 226 RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
227 RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION, 227 RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
228 BASEIMG_SELECTED : IMAGE_CONFIGURATION, 228 BASEIMG_SELECTED : IMAGE_CONFIGURATION,
@@ -329,7 +329,7 @@ class Builder(gtk.Window):
329 if not os.path.exists(layer+'/conf/layer.conf'): 329 if not os.path.exists(layer+'/conf/layer.conf'):
330 return False 330 return False
331 331
332 self.switch_page(self.LAYER_CHANGED) 332 self.switch_page(self.CONFIG_UPDATED)
333 333
334 self.template.destroy() 334 self.template.destroy()
335 self.template = None 335 self.template = None
@@ -357,10 +357,11 @@ class Builder(gtk.Window):
357 if next_step == self.MACHINE_SELECTION: # init step 357 if next_step == self.MACHINE_SELECTION: # init step
358 self.image_configuration_page.show_machine() 358 self.image_configuration_page.show_machine()
359 359
360 elif next_step == self.LAYER_CHANGED: 360 elif next_step == self.CONFIG_UPDATED:
361 # after layers is changd by users 361 # after layers is changd by users
362 self.image_configuration_page.show_machine() 362 self.image_configuration_page.show_machine()
363 self.handler.refresh_layers(self.configuration.layers) 363 self.set_user_config()
364 self.handler.parse_generate_configuration()
364 365
365 elif next_step == self.RCPPKGINFO_POPULATING: 366 elif next_step == self.RCPPKGINFO_POPULATING:
366 # MACHINE CHANGED action or SETTINGS CHANGED 367 # MACHINE CHANGED action or SETTINGS CHANGED
@@ -775,7 +776,7 @@ class Builder(gtk.Window):
775 self.configuration.layers = dialog.layers 776 self.configuration.layers = dialog.layers
776 # DO refresh layers 777 # DO refresh layers
777 if dialog.layers_changed: 778 if dialog.layers_changed:
778 self.switch_page(self.LAYER_CHANGED) 779 self.switch_page(self.CONFIG_UPDATED)
779 dialog.destroy() 780 dialog.destroy()
780 781
781 def show_load_template_dialog(self): 782 def show_load_template_dialog(self):
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index e5e0b4243d..11444ad459 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -243,11 +243,9 @@ class HobHandler(gobject.GObject):
243 self.commands_async.append(self.SUB_PARSE_CONFIG) 243 self.commands_async.append(self.SUB_PARSE_CONFIG)
244 self.run_next_command(self.PARSE_CONFIG) 244 self.run_next_command(self.PARSE_CONFIG)
245 245
246 def refresh_layers(self, bblayers): 246 def parse_generate_configuration(self):
247 self.init_cooker() 247 self.commands_async.append(self.SUB_PARSE_CONFIG)
248 self.set_bblayers(bblayers) 248 self.generate_configuration()
249 self.commands_async.append(self.SUB_PARSE_CONFIG)
250 self.generate_configuration()
251 249
252 def set_extra_inherit(self, bbclass): 250 def set_extra_inherit(self, bbclass):
253 inherits = self.server.runCommand(["getVariable", "INHERIT"]) or "" 251 inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""