diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/builder.py')
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 93b8fd0d17..2af14dc6ef 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
| @@ -68,6 +68,16 @@ class Configuration: | |||
| 68 | self.selected_recipes = [] | 68 | self.selected_recipes = [] |
| 69 | self.selected_packages = [] | 69 | self.selected_packages = [] |
| 70 | 70 | ||
| 71 | # proxy settings | ||
| 72 | self.all_proxy = params["all_proxy"] | ||
| 73 | self.http_proxy = params["http_proxy"] | ||
| 74 | self.ftp_proxy = params["ftp_proxy"] | ||
| 75 | self.https_proxy = params["https_proxy"] | ||
| 76 | self.git_proxy_host = params["git_proxy_host"] | ||
| 77 | self.git_proxy_port = params["git_proxy_port"] | ||
| 78 | self.cvs_proxy_host = params["cvs_proxy_host"] | ||
| 79 | self.cvs_proxy_port = params["cvs_proxy_port"] | ||
| 80 | |||
| 71 | def load(self, template): | 81 | def load(self, template): |
| 72 | self.curr_mach = template.getVar("MACHINE") | 82 | self.curr_mach = template.getVar("MACHINE") |
| 73 | self.curr_package_format = " ".join(template.getVar("PACKAGE_CLASSES").split("package_")).strip() | 83 | self.curr_package_format = " ".join(template.getVar("PACKAGE_CLASSES").split("package_")).strip() |
| @@ -93,6 +103,15 @@ class Configuration: | |||
| 93 | self.selected_image = template.getVar("__SELECTED_IMAGE__") | 103 | self.selected_image = template.getVar("__SELECTED_IMAGE__") |
| 94 | self.selected_recipes = template.getVar("DEPENDS").split() | 104 | self.selected_recipes = template.getVar("DEPENDS").split() |
| 95 | self.selected_packages = template.getVar("IMAGE_INSTALL").split() | 105 | self.selected_packages = template.getVar("IMAGE_INSTALL").split() |
| 106 | # proxy | ||
| 107 | self.all_proxy = template.getVar("all_proxy") | ||
| 108 | self.http_proxy = template.getVar("http_proxy") | ||
| 109 | self.ftp_proxy = template.getVar("ftp_proxy") | ||
| 110 | self.https_proxy = template.getVar("https_proxy") | ||
| 111 | self.git_proxy_host = template.getVar("GIT_PROXY_HOST") | ||
| 112 | self.git_proxy_port = template.getVar("GIT_PROXY_PORT") | ||
| 113 | self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST") | ||
| 114 | self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT") | ||
| 96 | 115 | ||
| 97 | def save(self, template, filename): | 116 | def save(self, template, filename): |
| 98 | # bblayers.conf | 117 | # bblayers.conf |
| @@ -120,6 +139,15 @@ class Configuration: | |||
| 120 | template.setVar("__SELECTED_IMAGE__", self.selected_image) | 139 | template.setVar("__SELECTED_IMAGE__", self.selected_image) |
| 121 | template.setVar("DEPENDS", self.selected_recipes) | 140 | template.setVar("DEPENDS", self.selected_recipes) |
| 122 | template.setVar("IMAGE_INSTALL", self.selected_packages) | 141 | template.setVar("IMAGE_INSTALL", self.selected_packages) |
| 142 | # proxy | ||
| 143 | template.setVar("all_proxy", self.all_proxy) | ||
| 144 | template.setVar("http_proxy", self.http_proxy) | ||
| 145 | template.setVar("ftp_proxy", self.ftp_proxy) | ||
| 146 | template.setVar("https_proxy", self.https_proxy) | ||
| 147 | template.setVar("GIT_PROXY_HOST", self.git_proxy_host) | ||
| 148 | template.setVar("GIT_PROXY_PORT", self.git_proxy_port) | ||
| 149 | template.setVar("CVS_PROXY_HOST", self.cvs_proxy_host) | ||
| 150 | template.setVar("CVS_PROXY_PORT", self.cvs_proxy_port) | ||
| 123 | 151 | ||
| 124 | class Parameters: | 152 | class Parameters: |
| 125 | '''Represents other variables like available machines, etc.''' | 153 | '''Represents other variables like available machines, etc.''' |
| @@ -146,6 +174,7 @@ class Parameters: | |||
| 146 | self.tune_pkgarch = params["tune_pkgarch"] | 174 | self.tune_pkgarch = params["tune_pkgarch"] |
| 147 | self.bb_version = params["bb_version"] | 175 | self.bb_version = params["bb_version"] |
| 148 | self.tune_arch = params["tune_arch"] | 176 | self.tune_arch = params["tune_arch"] |
| 177 | self.enable_proxy = False | ||
| 149 | 178 | ||
| 150 | class Builder(gtk.Window): | 179 | class Builder(gtk.Window): |
| 151 | 180 | ||
| @@ -373,6 +402,14 @@ class Builder(gtk.Window): | |||
| 373 | self.handler.set_image_fstypes(self.configuration.image_fstypes) | 402 | self.handler.set_image_fstypes(self.configuration.image_fstypes) |
| 374 | self.handler.set_extra_config(self.configuration.extra_setting) | 403 | self.handler.set_extra_config(self.configuration.extra_setting) |
| 375 | self.handler.set_extra_inherit("packageinfo") | 404 | self.handler.set_extra_inherit("packageinfo") |
| 405 | # set proxies | ||
| 406 | if self.parameters.enable_proxy: | ||
| 407 | self.handler.set_http_proxy(self.configuration.http_proxy) | ||
| 408 | self.handler.set_https_proxy(self.configuration.https_proxy) | ||
| 409 | self.handler.set_ftp_proxy(self.configuration.ftp_proxy) | ||
| 410 | self.handler.set_all_proxy(self.configuration.all_proxy) | ||
| 411 | self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port) | ||
| 412 | self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port) | ||
| 376 | 413 | ||
| 377 | def update_recipe_model(self, selected_image, selected_recipes): | 414 | def update_recipe_model(self, selected_image, selected_recipes): |
| 378 | self.recipe_model.set_selected_image(selected_image) | 415 | self.recipe_model.set_selected_image(selected_image) |
| @@ -773,6 +810,7 @@ class Builder(gtk.Window): | |||
| 773 | all_distros = self.parameters.all_distros, | 810 | all_distros = self.parameters.all_distros, |
| 774 | all_sdk_machines = self.parameters.all_sdk_machines, | 811 | all_sdk_machines = self.parameters.all_sdk_machines, |
| 775 | max_threads = self.parameters.max_threads, | 812 | max_threads = self.parameters.max_threads, |
| 813 | enable_proxy = self.parameters.enable_proxy, | ||
| 776 | parent = self, | 814 | parent = self, |
| 777 | flags = gtk.DIALOG_MODAL | 815 | flags = gtk.DIALOG_MODAL |
| 778 | | gtk.DIALOG_DESTROY_WITH_PARENT | 816 | | gtk.DIALOG_DESTROY_WITH_PARENT |
| @@ -783,6 +821,7 @@ class Builder(gtk.Window): | |||
| 783 | HobButton.style_button(button) | 821 | HobButton.style_button(button) |
| 784 | response = dialog.run() | 822 | response = dialog.run() |
| 785 | if response == gtk.RESPONSE_YES: | 823 | if response == gtk.RESPONSE_YES: |
| 824 | self.parameters.enable_proxy = dialog.enable_proxy | ||
| 786 | self.configuration = dialog.configuration | 825 | self.configuration = dialog.configuration |
| 787 | # DO reparse recipes | 826 | # DO reparse recipes |
| 788 | if dialog.settings_changed: | 827 | if dialog.settings_changed: |
