]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity: disable mirrors for connectivity check
authorJoshua Lock <josh@linux.intel.com>
Wed, 14 Sep 2011 22:09:28 +0000 (15:09 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Sep 2011 17:07:19 +0000 (18:07 +0100)
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index 93008cc6855ce67ea9e53cd8493f9670b649acb2..6ed43b268f548fd9fd3f4d22e11e1f3a24fe31e3 100644 (file)
@@ -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