Disable mirrors for connectivity checks
cover Disable mirrors for connectivity checks
I realised today that we are using mirrors when running the network connectivity checks. This could significantly reduce the utility of this sanity check.
The single patch in this series rectifies the issue.
Regards,
Joshua
The following changes since commit 8df322abfd3fa8c460fd73c83c1ef0b5e419dc11:
core-image-minimal: Add missing POKY_EXTRA_IMAGE variable (2011-09-14 01:27:08 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/work
Joshua Lock (1):
sanity: disable mirrors for connectivity check
meta/classes/sanity.bbclass | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.6
PATCH 1/1 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.
--- meta/classes/sanity.bbclass | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
meta/classes/sanity.bbclass +6 -2
@@ -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
Signature · 1 line
1.7.6
Richard Purdie
AppliedRe: [PATCH 1/1] sanity: disable mirrors for connectivity check
Quoted 8 lines · Joshua Lock
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 <[email protected]>--- meta/classes/sanity.bbclass | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Merged to master, thanks.
Richard
Re: [PATCH 1/1] sanity: disable mirrors for connectivity check
In reply to Joshua LockAny comments?
Quoted 34 lines · Joshua Lock
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 <[email protected]>--- meta/classes/sanity.bbclass | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)meta/classes/sanity.bbclass +6
-2@@ -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
Signature · 3 lines
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre