All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message
@ 2021-05-05 17:56 Michael Opdenacker
  2021-05-06  9:25 ` [OE-core] " Quentin Schulz
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2021-05-05 17:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 meta/classes/sanity.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index a377917f2a..e907a3566f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message
  2021-05-05 17:56 [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message Michael Opdenacker
@ 2021-05-06  9:25 ` Quentin Schulz
  2021-05-06 12:14   ` Michael Opdenacker
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2021-05-06  9:25 UTC (permalink / raw)
  To: Michael Opdenacker; +Cc: openembedded-core

Hi Michael,

On Wed, May 05, 2021 at 07:56:15PM +0200, Michael Opdenacker wrote:
> 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.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>  meta/classes/sanity.bbclass | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index a377917f2a..e907a3566f 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -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"

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message
  2021-05-06  9:25 ` [OE-core] " Quentin Schulz
@ 2021-05-06 12:14   ` Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2021-05-06 12:14 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: openembedded-core

Hi Quentin,

Thanks for the review!

On 5/6/21 11:25 AM, Quentin Schulz wrote:
> Hi Michael,
>
> On Wed, May 05, 2021 at 07:56:15PM +0200, Michael Opdenacker wrote:
>> 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.
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>  meta/classes/sanity.bbclass | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
>> index a377917f2a..e907a3566f 100644
>> --- a/meta/classes/sanity.bbclass
>> +++ b/meta/classes/sanity.bbclass
>> @@ -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"
> 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!

Sure, I was definitely planning to add such documentation.

Any other thoughts about making this error message more helpful?

Cheers,

Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message
       [not found] <167C3D553755CCE6.2490@lists.openembedded.org>
@ 2021-05-05 18:03 ` Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2021-05-05 18:03 UTC (permalink / raw)
  To: openembedded-core

Hello,

On 5/5/21 7:56 PM, Michael Opdenacker wrote:
> 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.
>
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>  meta/classes/sanity.bbclass | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index a377917f2a..e907a3566f 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -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


I just had the issue today, https://www.example.com/ being blocked on my
local network.

I'll also submit a documentation patch, as CONNECTIVITY_CHECK_URIS
doesn't appear in the documentation at all.

But who needs documentation with helpful error messages ;-) ?

Cheers,

Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-06 12:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 17:56 [PATCH] sanity.bbclass: mention CONNECTIVITY_CHECK_URIS in network failure message Michael Opdenacker
2021-05-06  9:25 ` [OE-core] " Quentin Schulz
2021-05-06 12:14   ` Michael Opdenacker
     [not found] <167C3D553755CCE6.2490@lists.openembedded.org>
2021-05-05 18:03 ` Michael Opdenacker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.