summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 870831a3b2..721dd8d0be 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -71,6 +71,7 @@ class Configuration:
71 self.all_proxy = self.http_proxy = self.ftp_proxy = self.https_proxy = "" 71 self.all_proxy = self.http_proxy = self.ftp_proxy = self.https_proxy = ""
72 self.git_proxy_host = self.git_proxy_port = "" 72 self.git_proxy_host = self.git_proxy_port = ""
73 self.cvs_proxy_host = self.cvs_proxy_port = "" 73 self.cvs_proxy_host = self.cvs_proxy_port = ""
74 self.enable_proxy = None
74 75
75 def clear_selection(self): 76 def clear_selection(self):
76 self.selected_image = None 77 self.selected_image = None
@@ -100,6 +101,9 @@ class Configuration:
100 self.default_task = params["default_task"] 101 self.default_task = params["default_task"]
101 102
102 # proxy settings 103 # proxy settings
104 self.enable_proxy = params["http_proxy"] != "" or params["https_proxy"] != "" or params["ftp_proxy"] != "" \
105 or params["git_proxy_host"] != "" or params["git_proxy_port"] != "" \
106 or params["cvs_proxy_host"] != "" or params["cvs_proxy_port"] != "" or params["all_proxy"] != ""
103 self.all_proxy = params["all_proxy"] 107 self.all_proxy = params["all_proxy"]
104 self.http_proxy = params["http_proxy"] 108 self.http_proxy = params["http_proxy"]
105 self.ftp_proxy = params["ftp_proxy"] 109 self.ftp_proxy = params["ftp_proxy"]
@@ -147,6 +151,7 @@ class Configuration:
147 self.selected_recipes = template.getVar("DEPENDS").split() 151 self.selected_recipes = template.getVar("DEPENDS").split()
148 self.selected_packages = template.getVar("IMAGE_INSTALL").split() 152 self.selected_packages = template.getVar("IMAGE_INSTALL").split()
149 # proxy 153 # proxy
154 self.enable_proxy = eval(template.getVar("enable_proxy"))
150 self.all_proxy = template.getVar("all_proxy") 155 self.all_proxy = template.getVar("all_proxy")
151 self.http_proxy = template.getVar("http_proxy") 156 self.http_proxy = template.getVar("http_proxy")
152 self.ftp_proxy = template.getVar("ftp_proxy") 157 self.ftp_proxy = template.getVar("ftp_proxy")
@@ -184,6 +189,7 @@ class Configuration:
184 template.setVar("DEPENDS", self.selected_recipes) 189 template.setVar("DEPENDS", self.selected_recipes)
185 template.setVar("IMAGE_INSTALL", self.user_selected_packages) 190 template.setVar("IMAGE_INSTALL", self.user_selected_packages)
186 # proxy 191 # proxy
192 template.setVar("enable_proxy", self.enable_proxy)
187 template.setVar("all_proxy", self.all_proxy) 193 template.setVar("all_proxy", self.all_proxy)
188 template.setVar("http_proxy", self.http_proxy) 194 template.setVar("http_proxy", self.http_proxy)
189 template.setVar("ftp_proxy", self.ftp_proxy) 195 template.setVar("ftp_proxy", self.ftp_proxy)
@@ -213,7 +219,6 @@ class Parameters:
213 self.all_sdk_machines = [] 219 self.all_sdk_machines = []
214 self.all_layers = [] 220 self.all_layers = []
215 self.image_names = [] 221 self.image_names = []
216 self.enable_proxy = False
217 222
218 # for build log to show 223 # for build log to show
219 self.bb_version = "" 224 self.bb_version = ""
@@ -582,13 +587,20 @@ class Builder(gtk.Window):
582 self.handler.set_extra_inherit("packageinfo") 587 self.handler.set_extra_inherit("packageinfo")
583 self.handler.set_extra_inherit("image_types") 588 self.handler.set_extra_inherit("image_types")
584 # set proxies 589 # set proxies
585 if self.parameters.enable_proxy: 590 if self.configuration.enable_proxy == True:
586 self.handler.set_http_proxy(self.configuration.http_proxy) 591 self.handler.set_http_proxy(self.configuration.http_proxy)
587 self.handler.set_https_proxy(self.configuration.https_proxy) 592 self.handler.set_https_proxy(self.configuration.https_proxy)
588 self.handler.set_ftp_proxy(self.configuration.ftp_proxy) 593 self.handler.set_ftp_proxy(self.configuration.ftp_proxy)
589 self.handler.set_all_proxy(self.configuration.all_proxy) 594 self.handler.set_all_proxy(self.configuration.all_proxy)
590 self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port) 595 self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port)
591 self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port) 596 self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port)
597 elif self.configuration.enable_proxy == False:
598 self.handler.set_http_proxy('')
599 self.handler.set_https_proxy('')
600 self.handler.set_ftp_proxy('')
601 self.handler.set_all_proxy('')
602 self.handler.set_git_proxy('', '')
603 self.handler.set_cvs_proxy('', '')
592 604
593 def update_recipe_model(self, selected_image, selected_recipes): 605 def update_recipe_model(self, selected_image, selected_recipes):
594 self.recipe_model.set_selected_image(selected_image) 606 self.recipe_model.set_selected_image(selected_image)
@@ -1010,7 +1022,6 @@ class Builder(gtk.Window):
1010 all_distros = self.parameters.all_distros, 1022 all_distros = self.parameters.all_distros,
1011 all_sdk_machines = self.parameters.all_sdk_machines, 1023 all_sdk_machines = self.parameters.all_sdk_machines,
1012 max_threads = self.parameters.max_threads, 1024 max_threads = self.parameters.max_threads,
1013 enable_proxy = self.parameters.enable_proxy,
1014 parent = self, 1025 parent = self,
1015 flags = gtk.DIALOG_MODAL 1026 flags = gtk.DIALOG_MODAL
1016 | gtk.DIALOG_DESTROY_WITH_PARENT 1027 | gtk.DIALOG_DESTROY_WITH_PARENT
@@ -1022,7 +1033,6 @@ class Builder(gtk.Window):
1022 response = dialog.run() 1033 response = dialog.run()
1023 settings_changed = False 1034 settings_changed = False
1024 if response == gtk.RESPONSE_YES: 1035 if response == gtk.RESPONSE_YES:
1025 self.parameters.enable_proxy = dialog.enable_proxy
1026 self.configuration = dialog.configuration 1036 self.configuration = dialog.configuration
1027 self.save_defaults() # remember settings 1037 self.save_defaults() # remember settings
1028 settings_changed = dialog.settings_changed 1038 settings_changed = dialog.settings_changed