diff options
| -rw-r--r-- | meta/classes/sanity.bbclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 93008cc685..6ed43b268f 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
| @@ -94,14 +94,18 @@ def check_connectivity(d): | |||
| 94 | # CONNECTIVITY_CHECK_URIS are set | 94 | # CONNECTIVITY_CHECK_URIS are set |
| 95 | network_enabled = not bb.data.getVar('BB_NO_NETWORK', d, True) | 95 | network_enabled = not bb.data.getVar('BB_NO_NETWORK', d, True) |
| 96 | check_enabled = len(test_uris) | 96 | check_enabled = len(test_uris) |
| 97 | # Take a copy of the data store and unset MIRRORS and PREMIRROS | ||
| 98 | data = bb.data.createCopy(d) | ||
| 99 | data.delVar('PREMIRRORS') | ||
| 100 | data.delVar('MIRRORS') | ||
| 97 | if check_enabled and network_enabled: | 101 | if check_enabled and network_enabled: |
| 98 | try: | 102 | try: |
| 99 | fetcher = bb.fetch2.Fetch(test_uris, d) | 103 | fetcher = bb.fetch2.Fetch(test_uris, data) |
| 100 | fetcher.checkstatus() | 104 | fetcher.checkstatus() |
| 101 | except Exception: | 105 | except Exception: |
| 102 | # Allow the message to be configured so that users can be | 106 | # Allow the message to be configured so that users can be |
| 103 | # pointed to a support mechanism. | 107 | # pointed to a support mechanism. |
| 104 | msg = bb.data.getVar('CONNECTIVITY_CHECK_MSG', d, True) or "" | 108 | msg = bb.data.getVar('CONNECTIVITY_CHECK_MSG', data, True) or "" |
| 105 | if len(msg) == 0: | 109 | if len(msg) == 0: |
| 106 | msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n" | 110 | msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n" |
| 107 | retval = msg | 111 | retval = msg |
