diff options
| author | Bogdan Marinescu <bogdan.a.marinescu@intel.com> | 2012-10-11 14:45:07 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-24 21:13:06 +0100 |
| commit | 6cc2f06d43fed2b3cdec84cb21bbc45742b2608a (patch) | |
| tree | b19c1cf266afeacaf570c279bb45d5ab467f38a3 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
| parent | d93898b2c530681362e42d1b0477fa593a625046 (diff) | |
| download | poky-6cc2f06d43fed2b3cdec84cb21bbc45742b2608a.tar.gz | |
bitbake: event/hob: Add a button for network tests in the proxy settings
This patch allows the user to check the network connectivity in
the "Proxy" page ("Settings" dialog) by adding a button which provides
this functionality. It also disables retrigerring sanity checks if the
proxy values are changed, since now the proxy checks are explicit.
Note that this patch depends on a patch in oe-core
("sanity.bbclass: trigger network tests explicitly"). It will
not work properly if the patch in oe-core is not merged.
[YOCTO #3026]
(Bitbake rev: cb1354d29c0be27aee57b9783c724457ef6725fb)
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@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 | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 5d038f45ca..7d3af6c725 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
| @@ -65,10 +65,17 @@ class HobHandler(gobject.GObject): | |||
| 65 | "package-populated" : (gobject.SIGNAL_RUN_LAST, | 65 | "package-populated" : (gobject.SIGNAL_RUN_LAST, |
| 66 | gobject.TYPE_NONE, | 66 | gobject.TYPE_NONE, |
| 67 | ()), | 67 | ()), |
| 68 | "network-passed" : (gobject.SIGNAL_RUN_LAST, | ||
| 69 | gobject.TYPE_NONE, | ||
| 70 | ()), | ||
| 71 | "network-failed" : (gobject.SIGNAL_RUN_LAST, | ||
| 72 | gobject.TYPE_NONE, | ||
| 73 | ()), | ||
| 68 | } | 74 | } |
| 69 | 75 | ||
| 70 | (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK) = range(6) | 76 | (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK, NETWORK_TEST) = range(7) |
| 71 | (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(11) | 77 | (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK, |
| 78 | SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE, SUB_NETWORK_TEST) = range(12) | ||
| 72 | 79 | ||
| 73 | def __init__(self, server, recipe_model, package_model): | 80 | def __init__(self, server, recipe_model, package_model): |
| 74 | super(HobHandler, self).__init__() | 81 | super(HobHandler, self).__init__() |
| @@ -146,6 +153,8 @@ class HobHandler(gobject.GObject): | |||
| 146 | self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"]) | 153 | self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"]) |
| 147 | elif next_command == self.SUB_SANITY_CHECK: | 154 | elif next_command == self.SUB_SANITY_CHECK: |
| 148 | self.runCommand(["triggerEvent", "bb.event.SanityCheck()"]) | 155 | self.runCommand(["triggerEvent", "bb.event.SanityCheck()"]) |
| 156 | elif next_command == self.SUB_NETWORK_TEST: | ||
| 157 | self.runCommand(["triggerEvent", "bb.event.NetworkTest()"]) | ||
| 149 | elif next_command == self.SUB_BUILD_RECIPES: | 158 | elif next_command == self.SUB_BUILD_RECIPES: |
| 150 | self.clear_busy() | 159 | self.clear_busy() |
| 151 | self.building = True | 160 | self.building = True |
| @@ -254,6 +263,12 @@ class HobHandler(gobject.GObject): | |||
| 254 | message["total"] = event.total | 263 | message["total"] = event.total |
| 255 | message["title"] = "Parsing recipes: " | 264 | message["title"] = "Parsing recipes: " |
| 256 | self.emit("parsing-completed", message) | 265 | self.emit("parsing-completed", message) |
| 266 | elif isinstance(event, bb.event.NetworkTestFailed): | ||
| 267 | self.emit("network-failed") | ||
| 268 | self.run_next_command() | ||
| 269 | elif isinstance(event, bb.event.NetworkTestPassed): | ||
| 270 | self.emit("network-passed") | ||
| 271 | self.run_next_command() | ||
| 257 | 272 | ||
| 258 | if self.error_msg and not self.commands_async: | 273 | if self.error_msg and not self.commands_async: |
| 259 | self.display_error() | 274 | self.display_error() |
| @@ -348,6 +363,10 @@ class HobHandler(gobject.GObject): | |||
| 348 | self.commands_async.append(self.SUB_SANITY_CHECK) | 363 | self.commands_async.append(self.SUB_SANITY_CHECK) |
| 349 | self.run_next_command(self.SANITY_CHECK) | 364 | self.run_next_command(self.SANITY_CHECK) |
| 350 | 365 | ||
| 366 | def trigger_network_test(self): | ||
| 367 | self.commands_async.append(self.SUB_NETWORK_TEST) | ||
| 368 | self.run_next_command(self.NETWORK_TEST) | ||
| 369 | |||
| 351 | def generate_configuration(self): | 370 | def generate_configuration(self): |
| 352 | self.commands_async.append(self.SUB_PARSE_CONFIG) | 371 | self.commands_async.append(self.SUB_PARSE_CONFIG) |
| 353 | self.commands_async.append(self.SUB_PATH_LAYERS) | 372 | self.commands_async.append(self.SUB_PATH_LAYERS) |
