hob: Don't always save proxy values in conf file
PATCH 1/2 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 ]
Signed-off-by Irina Patru <[email protected]>
--- bitbake/lib/bb/ui/crumbs/builder.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
bitbake/lib/bb/ui/crumbs/builder.py +14 -6
@@ -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'," % \
Signature · 1 line
1.7.9.5
PATCH 2/2 hob: No need for enable_proxy and same_proxy in conf file
Hob doesn't read these variable from file and bitbake doesn't use them, so they shouldn't be set in conf file.
Signed-off-by Irina Patru <[email protected]>
--- bitbake/lib/bb/ui/crumbs/builder.py | 2 -- 1 file changed, 2 deletions(-)
bitbake/lib/bb/ui/crumbs/builder.py +0 -2
@@ -227,8 +227,6 @@ class Configuration: handler.set_var_in_file("DEPENDS", self.selected_recipes, "local.conf") handler.set_var_in_file("IMAGE_INSTALL", self.user_selected_packages, "local.conf") # 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") 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")
Signature · 1 line
1.7.9.5