From dfc13c9ae719ccbcf048c1d5e7cdb7bd6978137d Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Wed, 14 Sep 2011 15:09:28 -0700 Subject: 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 Signed-off-by: Richard Purdie --- meta/classes/sanity.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'meta/classes/sanity.bbclass') 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): # CONNECTIVITY_CHECK_URIS are set network_enabled = not bb.data.getVar('BB_NO_NETWORK', d, True) check_enabled = len(test_uris) + # Take a copy of the data store and unset MIRRORS and PREMIRROS + data = bb.data.createCopy(d) + data.delVar('PREMIRRORS') + data.delVar('MIRRORS') if check_enabled and network_enabled: try: - fetcher = bb.fetch2.Fetch(test_uris, d) + fetcher = bb.fetch2.Fetch(test_uris, data) fetcher.checkstatus() except Exception: # Allow the message to be configured so that users can be # pointed to a support mechanism. - msg = bb.data.getVar('CONNECTIVITY_CHECK_MSG', d, True) or "" + msg = bb.data.getVar('CONNECTIVITY_CHECK_MSG', data, True) or "" if len(msg) == 0: msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n" retval = msg -- cgit v1.2.3-54-g00ecf