From 914e50e5ea3c13e90dd2a8198fb6358715b976b4 Mon Sep 17 00:00:00 2001 From: Irina Patru Date: Thu, 23 Jan 2014 11:49:42 +0200 Subject: bitbake: hob: Don't always save proxy values in conf file If enable_proxy is not activated, Hob should not save the proxy values in the conf file when user hits save button. [ HOB #5308 ] (Bitbake rev: fbe0851221ecfcefea5bdd4b629a05ed4f5ac189) Signed-off-by: Irina Patru Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/builder.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/bb/ui/crumbs/builder.py') diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 1eae814943..7bc3227509 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py @@ -229,12 +229,20 @@ class Configuration: # proxy handler.set_var_in_file("enable_proxy", self.enable_proxy, "local.conf") handler.set_var_in_file("use_same_proxy", self.same_proxy, "local.conf") - handler.set_var_in_file("http_proxy", self.combine_proxy("http"), "local.conf") - handler.set_var_in_file("https_proxy", self.combine_proxy("https"), "local.conf") - handler.set_var_in_file("ftp_proxy", self.combine_proxy("ftp"), "local.conf") - handler.set_var_in_file("all_proxy", self.combine_proxy("socks"), "local.conf") - handler.set_var_in_file("CVS_PROXY_HOST", self.combine_host_only("cvs"), "local.conf") - handler.set_var_in_file("CVS_PROXY_PORT", self.combine_port_only("cvs"), "local.conf") + if self.enable_proxy == True: + handler.set_var_in_file("http_proxy", self.combine_proxy("http"), "local.conf") + handler.set_var_in_file("https_proxy", self.combine_proxy("https"), "local.conf") + handler.set_var_in_file("ftp_proxy", self.combine_proxy("ftp"), "local.conf") + handler.set_var_in_file("all_proxy", self.combine_proxy("socks"), "local.conf") + handler.set_var_in_file("CVS_PROXY_HOST", self.combine_host_only("cvs"), "local.conf") + handler.set_var_in_file("CVS_PROXY_PORT", self.combine_port_only("cvs"), "local.conf") + else: + handler.set_var_in_file("http_proxy", "", "local.conf") + handler.set_var_in_file("https_proxy", "", "local.conf") + handler.set_var_in_file("ftp_proxy", "", "local.conf") + handler.set_var_in_file("all_proxy", "", "local.conf") + handler.set_var_in_file("CVS_PROXY_HOST", "", "local.conf") + handler.set_var_in_file("CVS_PROXY_PORT", "", "local.conf") def __str__(self): s = "VERSION: '%s', BBLAYERS: '%s', MACHINE: '%s', DISTRO: '%s', DL_DIR: '%s'," % \ -- cgit v1.2.3-54-g00ecf