Sorry, wrong list. Please disregard this.<br><br><div class="gmail_quote">On Mon, Sep 10, 2012 at 1:41 PM, Bogdan Marinescu <span dir="ltr"><<a href="mailto:bogdan.a.marinescu@intel.com" target="_blank">bogdan.a.marinescu@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Proxy settings were not properly saved between Hob runs. This<br>
fix is mostly a backport of code in master.<br>
<br>
[YOCTO #3024]<br>
<br>
Signed-off-by: Bogdan Marinescu <<a href="mailto:bogdan.a.marinescu@intel.com">bogdan.a.marinescu@intel.com</a>><br>
---<br>
bitbake/lib/bb/ui/crumbs/builder.py | 18 ++++++++---<br>
bitbake/lib/bb/ui/crumbs/hig.py | 58 +++++++++++++++++------------------<br>
2 files changed, 43 insertions(+), 33 deletions(-)<br>
<br>
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py<br>
index df85326..000a838 100755<br>
--- a/bitbake/lib/bb/ui/crumbs/builder.py<br>
+++ b/bitbake/lib/bb/ui/crumbs/builder.py<br>
@@ -70,6 +70,7 @@ class Configuration:<br>
self.all_proxy = self.http_proxy = self.ftp_proxy = self.https_proxy = ""<br>
self.git_proxy_host = self.git_proxy_port = ""<br>
self.cvs_proxy_host = self.cvs_proxy_port = ""<br>
+ self.enable_proxy = None<br>
<br>
def clear_selection(self):<br>
self.selected_image = None<br>
@@ -99,6 +100,9 @@ class Configuration:<br>
self.default_task = params["default_task"]<br>
<br>
# proxy settings<br>
+ self.enable_proxy = params["http_proxy"] != "" or params["https_proxy"] != "" or params["ftp_proxy"] != "" \<br>
+ or params["git_proxy_host"] != "" or params["git_proxy_port"] != "" \<br>
+ or params["cvs_proxy_host"] != "" or params["cvs_proxy_port"] != "" or params["all_proxy"] != ""<br>
self.all_proxy = params["all_proxy"]<br>
self.http_proxy = params["http_proxy"]<br>
self.ftp_proxy = params["ftp_proxy"]<br>
@@ -146,6 +150,7 @@ class Configuration:<br>
self.selected_recipes = template.getVar("DEPENDS").split()<br>
self.selected_packages = template.getVar("IMAGE_INSTALL").split()<br>
# proxy<br>
+ self.enable_proxy = eval(template.getVar("enable_proxy"))<br>
self.all_proxy = template.getVar("all_proxy")<br>
self.http_proxy = template.getVar("http_proxy")<br>
self.ftp_proxy = template.getVar("ftp_proxy")<br>
@@ -183,6 +188,7 @@ class Configuration:<br>
template.setVar("DEPENDS", self.selected_recipes)<br>
template.setVar("IMAGE_INSTALL", self.user_selected_packages)<br>
# proxy<br>
+ template.setVar("enable_proxy", self.enable_proxy)<br>
template.setVar("all_proxy", self.all_proxy)<br>
template.setVar("http_proxy", self.http_proxy)<br>
template.setVar("ftp_proxy", self.ftp_proxy)<br>
@@ -212,7 +218,6 @@ class Parameters:<br>
self.all_sdk_machines = []<br>
self.all_layers = []<br>
self.image_names = []<br>
- self.enable_proxy = False<br>
<br>
# for build log to show<br>
self.bb_version = ""<br>
@@ -581,13 +586,20 @@ class Builder(gtk.Window):<br>
self.handler.set_extra_inherit("packageinfo")<br>
self.handler.set_extra_inherit("image_types")<br>
# set proxies<br>
- if self.parameters.enable_proxy:<br>
+ if self.configuration.enable_proxy == True:<br>
self.handler.set_http_proxy(self.configuration.http_proxy)<br>
self.handler.set_https_proxy(self.configuration.https_proxy)<br>
self.handler.set_ftp_proxy(self.configuration.ftp_proxy)<br>
self.handler.set_all_proxy(self.configuration.all_proxy)<br>
self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port)<br>
self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port)<br>
+ elif self.configuration.enable_proxy == False:<br>
+ self.handler.set_http_proxy('')<br>
+ self.handler.set_https_proxy('')<br>
+ self.handler.set_ftp_proxy('')<br>
+ self.handler.set_all_proxy('')<br>
+ self.handler.set_git_proxy('', '')<br>
+ self.handler.set_cvs_proxy('', '')<br>
<br>
def update_recipe_model(self, selected_image, selected_recipes):<br>
self.recipe_model.set_selected_image(selected_image)<br>
@@ -1009,7 +1021,6 @@ class Builder(gtk.Window):<br>
all_distros = self.parameters.all_distros,<br>
all_sdk_machines = self.parameters.all_sdk_machines,<br>
max_threads = self.parameters.max_threads,<br>
- enable_proxy = self.parameters.enable_proxy,<br>
parent = self,<br>
flags = gtk.DIALOG_MODAL<br>
| gtk.DIALOG_DESTROY_WITH_PARENT<br>
@@ -1021,7 +1032,6 @@ class Builder(gtk.Window):<br>
response = dialog.run()<br>
settings_changed = False<br>
if response == gtk.RESPONSE_YES:<br>
- self.parameters.enable_proxy = dialog.enable_proxy<br>
self.configuration = dialog.configuration<br>
self.save_defaults() # remember settings<br>
settings_changed = dialog.settings_changed<br>
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py<br>
index 4baf960..b6c970b 100644<br>
--- a/bitbake/lib/bb/ui/crumbs/hig.py<br>
+++ b/bitbake/lib/bb/ui/crumbs/hig.py<br>
@@ -309,7 +309,7 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
<br>
def __init__(self, title, configuration, all_image_types,<br>
all_package_formats, all_distros, all_sdk_machines,<br>
- max_threads, enable_proxy, parent, flags, buttons=None):<br>
+ max_threads, parent, flags, buttons=None):<br>
super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons)<br>
<br>
# class members from other objects<br>
@@ -320,7 +320,6 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
self.all_distros = all_distros<br>
self.all_sdk_machines = all_sdk_machines<br>
self.max_threads = max_threads<br>
- self.enable_proxy = enable_proxy<br>
<br>
# class members for internal use<br>
self.distro_combo = None<br>
@@ -356,7 +355,8 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))<br>
data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))<br>
data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))<br>
- if self.enable_proxy:<br>
+ data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))<br>
+ if self.configuration.enable_proxy:<br>
data += ("ALL_PROXY: " + self._get_sorted_value(self.configuration.all_proxy))<br>
data += ("HTTP_PROXY: " + self._get_sorted_value(self.configuration.http_proxy))<br>
data += ("HTTPS_PROXY: " + self._get_sorted_value(self.configuration.https_proxy))<br>
@@ -531,55 +531,55 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)<br>
self.proxy_checkbox = gtk.CheckButton("Enable proxy")<br>
self.proxy_checkbox.set_tooltip_text("Check this box to setup the proxy you specified")<br>
- self.proxy_checkbox.set_active(self.enable_proxy)<br>
+ self.proxy_checkbox.set_active(self.configuration.enable_proxy)<br>
self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)<br>
sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set all proxy:</span>")<br>
tooltip = "Set the all proxy that will be used if the proxy for a URL isn't specified."<br>
proxy_widget, self.all_proxy_text = self.gen_entry_widget(self.configuration.all_proxy, self, tooltip, False)<br>
- self.all_proxy_text.set_editable(self.enable_proxy)<br>
- self.all_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.all_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.all_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set http proxy:</span>")<br>
tooltip = "Set the http proxy that will be used in do_fetch() source code"<br>
proxy_widget, self.http_proxy_text = self.gen_entry_widget(self.configuration.http_proxy, self, tooltip, False)<br>
- self.http_proxy_text.set_editable(self.enable_proxy)<br>
- self.http_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.http_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.http_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set https proxy:</span>")<br>
tooltip = "Set the https proxy that will be used in do_fetch() source code"<br>
proxy_widget, self.https_proxy_text = self.gen_entry_widget(self.configuration.https_proxy, self, tooltip, False)<br>
- self.https_proxy_text.set_editable(self.enable_proxy)<br>
- self.https_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.https_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.https_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set ftp proxy:</span>")<br>
tooltip = "Set the ftp proxy that will be used in do_fetch() source code"<br>
proxy_widget, self.ftp_proxy_text = self.gen_entry_widget(self.configuration.ftp_proxy, self, tooltip, False)<br>
- self.ftp_proxy_text.set_editable(self.enable_proxy)<br>
- self.ftp_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.ftp_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.ftp_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set git proxy:</span>")<br>
tooltip = "Set the git proxy that will be used in do_fetch() source code"<br>
proxy_widget, self.git_proxy_text = self.gen_entry_widget(self.configuration.git_proxy_host + ':' + self.configuration.git_proxy_port, self, tooltip, False)<br>
- self.git_proxy_text.set_editable(self.enable_proxy)<br>
- self.git_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.git_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.git_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
label = self.gen_label_widget("<span weight=\"bold\">Set cvs proxy:</span>")<br>
tooltip = "Set the cvs proxy that will be used in do_fetch() source code"<br>
proxy_widget, self.cvs_proxy_text = self.gen_entry_widget(self.configuration.cvs_proxy_host + ':' + self.configuration.cvs_proxy_port, self, tooltip, False)<br>
- self.cvs_proxy_text.set_editable(self.enable_proxy)<br>
- self.cvs_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.cvs_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.cvs_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
sub_vbox.pack_start(label, expand=False, fill=False)<br>
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)<br>
<br>
@@ -600,19 +600,19 @@ class AdvancedSettingDialog (CrumbsDialog):<br>
return advanced_vbox<br>
<br>
def proxy_checkbox_toggled_cb(self, button):<br>
- self.enable_proxy = self.proxy_checkbox.get_active()<br>
- self.all_proxy_text.set_editable(self.enable_proxy)<br>
- self.all_proxy_text.set_sensitive(self.enable_proxy)<br>
- self.http_proxy_text.set_editable(self.enable_proxy)<br>
- self.http_proxy_text.set_sensitive(self.enable_proxy)<br>
- self.https_proxy_text.set_editable(self.enable_proxy)<br>
- self.https_proxy_text.set_sensitive(self.enable_proxy)<br>
- self.ftp_proxy_text.set_editable(self.enable_proxy)<br>
- self.ftp_proxy_text.set_sensitive(self.enable_proxy)<br>
- self.git_proxy_text.set_editable(self.enable_proxy)<br>
- self.git_proxy_text.set_sensitive(self.enable_proxy)<br>
- self.cvs_proxy_text.set_editable(self.enable_proxy)<br>
- self.cvs_proxy_text.set_sensitive(self.enable_proxy)<br>
+ self.configuration.enable_proxy = self.proxy_checkbox.get_active()<br>
+ self.all_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.all_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
+ self.http_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.http_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
+ self.https_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.https_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
+ self.ftp_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.ftp_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
+ self.git_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.git_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
+ self.cvs_proxy_text.set_editable(self.configuration.enable_proxy)<br>
+ self.cvs_proxy_text.set_sensitive(self.configuration.enable_proxy)<br>
<br>
def response_cb(self, dialog, response_id):<br>
package_format = []<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br>