summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-14 15:09:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-16 18:07:27 +0100
commitdfc13c9ae719ccbcf048c1d5e7cdb7bd6978137d (patch)
treef5ada0f8e9904f0f131aaf049cf91c62d110d07a /meta/classes/sanity.bbclass
parent6be481711aa0a3782522fdd6de2e1ec52f4deed5 (diff)
downloadpoky-dfc13c9ae719ccbcf048c1d5e7cdb7bd6978137d.tar.gz
sanity: disable mirrors for connectivity check
It's difficult to test a range of fetchers when using mirrors, therefore create a throwaway copy of the datastore and delete the MIRROR and PREMIRROR variables to ensure they aren't used in the connectivity check. (From OE-Core rev: 31cb3974eeaf2a808e8da3864e70986578c58cb9) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass8
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