diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sanity.bbclass | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 9c3ab1ff2e..e2095ddd48 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -54,9 +54,12 @@ python check_bblayers_conf() { | |||
54 | f.write(''.join(lines)) | 54 | f.write(''.join(lines)) |
55 | } | 55 | } |
56 | 56 | ||
57 | def raise_sanity_error(msg, d): | 57 | def raise_sanity_error(msg, d, network_error=False): |
58 | if d.getVar("SANITY_USE_EVENTS", True) == "1": | 58 | if d.getVar("SANITY_USE_EVENTS", True) == "1": |
59 | bb.event.fire(bb.event.SanityCheckFailed(msg), d) | 59 | try: |
60 | bb.event.fire(bb.event.SanityCheckFailed(msg, network_error), d) | ||
61 | except TypeError: | ||
62 | bb.event.fire(bb.event.SanityCheckFailed(msg), d) | ||
60 | return | 63 | return |
61 | 64 | ||
62 | bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration. | 65 | bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration. |
@@ -169,8 +172,9 @@ def check_sanity_tmpdir_change(tmpdir, data): | |||
169 | # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS) | 172 | # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS) |
170 | testmsg = check_create_long_filename(tmpdir, "TMPDIR") | 173 | testmsg = check_create_long_filename(tmpdir, "TMPDIR") |
171 | # Check that we can fetch from various network transports | 174 | # Check that we can fetch from various network transports |
175 | errmsg = check_connectivity(data) | ||
172 | testmsg = testmsg + check_connectivity(data) | 176 | testmsg = testmsg + check_connectivity(data) |
173 | return testmsg | 177 | return testmsg, errmsg == "" |
174 | 178 | ||
175 | def check_sanity_version_change(data): | 179 | def check_sanity_version_change(data): |
176 | # Sanity checks to be done when SANITY_VERSION changes | 180 | # Sanity checks to be done when SANITY_VERSION changes |
@@ -534,16 +538,18 @@ def check_sanity(sanity_data): | |||
534 | last_sstate_dir = line.split()[1] | 538 | last_sstate_dir = line.split()[1] |
535 | 539 | ||
536 | sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1) | 540 | sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1) |
541 | network_error = False | ||
537 | if last_sanity_version < sanity_version: | 542 | if last_sanity_version < sanity_version: |
538 | messages = messages + check_sanity_version_change(sanity_data) | 543 | messages = messages + check_sanity_version_change(sanity_data) |
539 | messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data) | 544 | err, network_error = check_sanity_tmpdir_change(tmpdir, sanity_data) |
545 | messages = messages + err | ||
540 | messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data) | 546 | messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data) |
541 | else: | 547 | else: |
542 | if last_tmpdir != tmpdir: | 548 | if last_tmpdir != tmpdir: |
543 | messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data) | 549 | err, network_error = check_sanity_tmpdir_change(tmpdir, sanity_data) |
550 | messages = messages + err | ||
544 | if last_sstate_dir != sstate_dir: | 551 | if last_sstate_dir != sstate_dir: |
545 | messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data) | 552 | messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data) |
546 | |||
547 | if os.path.exists("conf") and not messages: | 553 | if os.path.exists("conf") and not messages: |
548 | f = file(sanityverfile, 'w') | 554 | f = file(sanityverfile, 'w') |
549 | f.write("SANITY_VERSION %s\n" % sanity_version) | 555 | f.write("SANITY_VERSION %s\n" % sanity_version) |
@@ -614,7 +620,7 @@ def check_sanity(sanity_data): | |||
614 | messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space." | 620 | messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space." |
615 | 621 | ||
616 | if messages != "": | 622 | if messages != "": |
617 | raise_sanity_error(sanity_data.expand(messages), sanity_data) | 623 | raise_sanity_error(sanity_data.expand(messages), sanity_data, network_error) |
618 | 624 | ||
619 | # Create a copy of the datastore and finalise it to ensure appends and | 625 | # Create a copy of the datastore and finalise it to ensure appends and |
620 | # overrides are set - the datastore has yet to be finalised at ConfigParsed | 626 | # overrides are set - the datastore has yet to be finalised at ConfigParsed |