Patchwork [bitbake-devel] hob: save button from settings called a nonexisting method

login
register
mail settings
Submitter Cristiana Voicu
Date July 1, 2013, 8:09 a.m.
Message ID <1372666192-31059-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/52721/
State New
Headers show

Comments

Cristiana Voicu - July 1, 2013, 8:09 a.m.
The method was removed when the process for saving configuration
in Hob was changed. Replace the call with the right function.

[YOCTO #4793]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py         |    6 +++---
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
Paul Eggleton - July 1, 2013, 6:20 p.m.
Hi Cristiana,

On Monday 01 July 2013 11:09:52 Cristiana Voicu wrote:
> The method was removed when the process for saving configuration
> in Hob was changed. Replace the call with the right function.
> 
> [YOCTO #4793]
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
>  bitbake/lib/bb/ui/crumbs/builder.py         |    6 +++---
>  bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    2 ++
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/bitbake/lib/bb/ui/crumbs/builder.py
> b/bitbake/lib/bb/ui/crumbs/builder.py index d5df60f..8571014 100755
> --- a/bitbake/lib/bb/ui/crumbs/builder.py
> +++ b/bitbake/lib/bb/ui/crumbs/builder.py
> @@ -191,7 +191,7 @@ class Configuration:
>          self.split_proxy("socks", params["socks_proxy"])
>          self.split_proxy("cvs", params["cvs_proxy_host"] + ":" +
> params["cvs_proxy_port"])
> 
> -    def save(self, handler, template, defaults=False):
> +    def save(self, handler, defaults=False):
>          # bblayers.conf
>          handler.set_var_in_file("BBLAYERS", self.layers, "bblayers.conf")
>          # local.conf
> @@ -1229,7 +1229,7 @@ class Builder(gtk.Window):
>          settings_changed = False
>          if response == gtk.RESPONSE_YES:
>              self.configuration = dialog.configuration
> -            self.save_defaults() # remember settings
> +            self.configuration.save(self.handler, True) # remember settings
> settings_changed = dialog.settings_changed
>          dialog.destroy()
>          return response == gtk.RESPONSE_YES, settings_changed
> @@ -1257,7 +1257,7 @@ class Builder(gtk.Window):
>          settings_changed = False
>          if response == gtk.RESPONSE_YES:
>              self.configuration = dialog.configuration
> -            self.save_defaults() # remember settings
> +            self.configuration.save(self.handler, True) # remember settings
> settings_changed = dialog.settings_changed
>              if dialog.proxy_settings_changed:
>                  self.set_user_config_proxies()
> diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 1b9596f..8788083 100644
> --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -146,7 +146,9 @@ class HobHandler(gobject.GObject):
>          elif next_command == self.SUB_MATCH_CLASS:
>              self.runCommand(["findFilesMatchingInDir", "rootfs_",
> "classes"]) elif next_command == self.SUB_PARSE_CONFIG:
> +            self.runCommand(["enableDataTracking"])
>              self.runCommand(["parseConfigurationFiles", "conf/.hob.conf",
> ""]) 
> +            self.runCommand(["disableDataTracking"])

This change doesn't seem to be mentioned in the commit message, is this meant 
to be part of this patch?

Cheers,
Paul

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index d5df60f..8571014 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -191,7 +191,7 @@  class Configuration:
         self.split_proxy("socks", params["socks_proxy"])
         self.split_proxy("cvs", params["cvs_proxy_host"] + ":" + params["cvs_proxy_port"])
 
-    def save(self, handler, template, defaults=False):
+    def save(self, handler, defaults=False):
         # bblayers.conf
         handler.set_var_in_file("BBLAYERS", self.layers, "bblayers.conf")
         # local.conf
@@ -1229,7 +1229,7 @@  class Builder(gtk.Window):
         settings_changed = False
         if response == gtk.RESPONSE_YES:
             self.configuration = dialog.configuration
-            self.save_defaults() # remember settings
+            self.configuration.save(self.handler, True) # remember settings
             settings_changed = dialog.settings_changed
         dialog.destroy()
         return response == gtk.RESPONSE_YES, settings_changed
@@ -1257,7 +1257,7 @@  class Builder(gtk.Window):
         settings_changed = False
         if response == gtk.RESPONSE_YES:
             self.configuration = dialog.configuration
-            self.save_defaults() # remember settings
+            self.configuration.save(self.handler, True) # remember settings
             settings_changed = dialog.settings_changed
             if dialog.proxy_settings_changed:
                 self.set_user_config_proxies()
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 1b9596f..8788083 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -146,7 +146,9 @@  class HobHandler(gobject.GObject):
         elif next_command == self.SUB_MATCH_CLASS:
             self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
         elif next_command == self.SUB_PARSE_CONFIG:
+            self.runCommand(["enableDataTracking"])
             self.runCommand(["parseConfigurationFiles", "conf/.hob.conf", ""])
+            self.runCommand(["disableDataTracking"])
         elif next_command == self.SUB_GNERATE_TGTS:
             self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
         elif next_command == self.SUB_GENERATE_PKGINFO: