diff options
| author | Shane Wang <shane.wang@intel.com> | 2012-03-22 14:20:03 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-28 16:49:19 +0100 |
| commit | 8b0bc593b32c49c71ca683b9bdcdca5018862eda (patch) | |
| tree | db7927091a86c0eaa024e4e8c19811c0a3f6dce8 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
| parent | 7990d36f508a8eab4865b124045c02326680430d (diff) | |
| download | poky-8b0bc593b32c49c71ca683b9bdcdca5018862eda.tar.gz | |
Hob: allow users to setup the proxies
This patch is to read the proxy variables such as all_proxy, http_proxy, https_proxy, ftp_proxy, GIT_PROXY_HOST, GIT_PROXY_PORT, CVS_PROXY_HOST, and CVS_PROXY_PORT from the bitbake server, show them on the Settings dialog for users to change and set proxies for the build.
(From Poky rev: bbef66e4005def54d70d3720ec131fa7edc22e2a)
(Bitbake rev: 66c63167cd139706100bfa35eb4ca66c98407615)
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 8583fa49e5..9c5dc771f6 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
| @@ -313,6 +313,26 @@ class HobHandler(gobject.GObject): | |||
| 313 | value = extra_setting[key] | 313 | value = extra_setting[key] |
| 314 | self.server.runCommand(["setVariable", key, value]) | 314 | self.server.runCommand(["setVariable", key, value]) |
| 315 | 315 | ||
| 316 | def set_http_proxy(self, http_proxy): | ||
| 317 | self.server.runCommand(["setVariable", "http_proxy", http_proxy]) | ||
| 318 | |||
| 319 | def set_https_proxy(self, https_proxy): | ||
| 320 | self.server.runCommand(["setVariable", "https_proxy", https_proxy]) | ||
| 321 | |||
| 322 | def set_ftp_proxy(self, ftp_proxy): | ||
| 323 | self.server.runCommand(["setVariable", "ftp_proxy", ftp_proxy]) | ||
| 324 | |||
| 325 | def set_all_proxy(self, all_proxy): | ||
| 326 | self.server.runCommand(["setVariable", "all_proxy", all_proxy]) | ||
| 327 | |||
| 328 | def set_git_proxy(self, host, port): | ||
| 329 | self.server.runCommand(["setVariable", "GIT_PROXY_HOST", host]) | ||
| 330 | self.server.runCommand(["setVariable", "GIT_PROXY_PORT", port]) | ||
| 331 | |||
| 332 | def set_cvs_proxy(self, host, port): | ||
| 333 | self.server.runCommand(["setVariable", "CVS_PROXY_HOST", host]) | ||
| 334 | self.server.runCommand(["setVariable", "CVS_PROXY_PORT", port]) | ||
| 335 | |||
| 316 | def request_package_info_async(self): | 336 | def request_package_info_async(self): |
| 317 | self.commands_async.append(self.SUB_GENERATE_PKGINFO) | 337 | self.commands_async.append(self.SUB_GENERATE_PKGINFO) |
| 318 | self.run_next_command(self.POPULATE_PACKAGEINFO) | 338 | self.run_next_command(self.POPULATE_PACKAGEINFO) |
| @@ -446,4 +466,16 @@ class HobHandler(gobject.GObject): | |||
| 446 | params["tune_pkgarch"] = self.server.runCommand(["getVariable", "TUNE_PKGARCH"]) or "" | 466 | params["tune_pkgarch"] = self.server.runCommand(["getVariable", "TUNE_PKGARCH"]) or "" |
| 447 | params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or "" | 467 | params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or "" |
| 448 | params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or "" | 468 | params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or "" |
| 469 | |||
| 470 | params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or "" | ||
| 471 | params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or "" | ||
| 472 | |||
| 473 | params["http_proxy"] = self.server.runCommand(["getVariable", "http_proxy"]) or "" | ||
| 474 | params["ftp_proxy"] = self.server.runCommand(["getVariable", "ftp_proxy"]) or "" | ||
| 475 | params["https_proxy"] = self.server.runCommand(["getVariable", "https_proxy"]) or "" | ||
| 476 | params["all_proxy"] = self.server.runCommand(["getVariable", "all_proxy"]) or "" | ||
| 477 | |||
| 478 | params["cvs_proxy_host"] = self.server.runCommand(["getVariable", "CVS_PROXY_HOST"]) or "" | ||
| 479 | params["cvs_proxy_port"] = self.server.runCommand(["getVariable", "CVS_PROXY_PORT"]) or "" | ||
| 480 | |||
| 449 | return params | 481 | return params |
