Skip to contentSkip to conversation

sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message

PATCH In review Michael Opdenacker 2 participants 3 messages May 5, 2021 – May 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message

This expands the error message when a network failure is detected. It happens that some ISPs or networks block the default example.com domain. Therefore, instead of disabling network access, it lets the user know how to modify the test URL.

---
 meta/classes/sanity.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/classes/sanity.bbclass +6 -3
index a377917f2a..e907a3566f 100644
@@ -392,9 +392,12 @@ def check_connectivity(d):
             msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
             if len(msg) == 0:
                 msg = "%s.\n" % err
-                msg += "    Please ensure your host's network is configured correctly,\n"
-                msg += "    or set BB_NO_NETWORK = \"1\" to disable network access if\n"
-                msg += "    all required sources are on local disk.\n"
+                msg += "    Please ensure your host's network is configured correctly.\n"
+                msg += "    If your ISP or network is blocking the above URL,\n"
+                msg += "    try with another domain name, for example by setting:\n"
+                msg += "    CONNECTIVITY_CHECK_URIS = \"https://www.yoctoproject.org/\""
+                msg += "    You could also set BB_NO_NETWORK = \"1\" to disable network\n"
+                msg += "    access if all required sources are on local disk.\n"
             retval = msg
 
     return retval
Signature · 1 line
2.25.1
#1 lore raw

Hi Michael,

Quoted 17 lines · Michael Opdenacker

This expands the error message when a network failure is detected. It happens that some ISPs or networks block the default example.com domain. Therefore, instead of disabling network access, it lets the user know how to modify the test URL.

---
 meta/classes/sanity.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/classes/sanity.bbclass +0 -0
index a377917f2a..e907a3566f 100644
@@ -392,9 +392,12 @@ def check_connectivity(d):
             msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
             if len(msg) == 0:

meta/classes/sanity.bbclass def check_connectivity(d): · line 400

Quoted 10 lines
meta/classes/sanity.bbclass +6 -3
                 msg = "%s.\n" % err
-                msg += "    Please ensure your host's network is configured correctly,\n"
-                msg += "    or set BB_NO_NETWORK = \"1\" to disable network access if\n"
-                msg += "    all required sources are on local disk.\n"
+                msg += "    Please ensure your host's network is configured correctly.\n"
+                msg += "    If your ISP or network is blocking the above URL,\n"
+                msg += "    try with another domain name, for example by setting:\n"
+                msg += "    CONNECTIVITY_CHECK_URIS = \"https://www.yoctoproject.org/\""
+                msg += "    You could also set BB_NO_NETWORK = \"1\" to disable network\n"
+                msg += "    access if all required sources are on local disk.\n"

I have my doubts that we want to explicit all ways to get rid of the message. I'd see more an indication to look at the documentation for this.... and since I wanted to check what we had in the docs for CONNECTIVITY_CHECK_URIS I discovered we don't have anything for that variable in YP documentation!

That would be a nice addition even if you keep the message as is!

Thanks for the patch :)

Cheers,
Quentin

#2 lore raw

Hi Quentin,

Thanks for the review!

Quoted 36 lines · Quentin Schulz

Hi Michael,

Quoted 17 lines · Michael Opdenacker

This expands the error message when a network failure is detected. It happens that some ISPs or networks block the default example.com domain. Therefore, instead of disabling network access, it lets the user know how to modify the test URL.

---
 meta/classes/sanity.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/classes/sanity.bbclass +0 -0
index a377917f2a..e907a3566f 100644
@@ -392,9 +392,12 @@ def check_connectivity(d):
             msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
             if len(msg) == 0:

meta/classes/sanity.bbclass def check_connectivity(d): · line 400

Quoted 10 lines
meta/classes/sanity.bbclass +6 -3
                 msg = "%s.\n" % err
-                msg += "    Please ensure your host's network is configured correctly,\n"
-                msg += "    or set BB_NO_NETWORK = \"1\" to disable network access if\n"
-                msg += "    all required sources are on local disk.\n"
+                msg += "    Please ensure your host's network is configured correctly.\n"
+                msg += "    If your ISP or network is blocking the above URL,\n"
+                msg += "    try with another domain name, for example by setting:\n"
+                msg += "    CONNECTIVITY_CHECK_URIS = \"https://www.yoctoproject.org/\""
+                msg += "    You could also set BB_NO_NETWORK = \"1\" to disable network\n"
+                msg += "    access if all required sources are on local disk.\n"

I have my doubts that we want to explicit all ways to get rid of the message. I'd see more an indication to look at the documentation for this.... and since I wanted to check what we had in the docs for CONNECTIVITY_CHECK_URIS I discovered we don't have anything for that variable in YP documentation!

Quoted 1 line

That would be a nice addition even if you keep the message as is!

Sure, I was definitely planning to add such documentation.

Any other thoughts about making this error message more helpful?

Cheers,

Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com