All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
@ 2015-12-17 20:58 dl9pf
  0 siblings, 0 replies; 7+ messages in thread
From: dl9pf @ 2015-12-17 20:58 UTC (permalink / raw)
  To: openembedded-devel

From: Jan-Simon Möller <dl9pf@gmx.de>

BB_FETCH_PREMIRRORONLY sets BB_NO_NETWORK (implicitly in the fetcher).
To avoid the sanity check to fail in an offline environment,
use the same override mechanism as in the fetcher.

Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
---
 meta/classes/sanity.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ad9dda8..62dce92 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -271,6 +271,9 @@ def check_connectivity(d):
     test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
     retval = ""
 
+    # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
+    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
+        bb.data.setVar("BB_NO_NETWORK", "1", self.d)
     # Only check connectivity if network enabled and the
     # CONNECTIVITY_CHECK_URIS are set
     network_enabled = not d.getVar('BB_NO_NETWORK', True)
-- 
2.6.2



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

* [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
@ 2015-12-17 21:34 dl9pf
  0 siblings, 0 replies; 7+ messages in thread
From: dl9pf @ 2015-12-17 21:34 UTC (permalink / raw)
  To: openembedded-core

From: Jan-Simon Möller <dl9pf@gmx.de>

BB_FETCH_PREMIRRORONLY sets BB_NO_NETWORK (implicitly in the fetcher).
To avoid the sanity check to fail in an offline environment,
use the same override mechanism as in the fetcher.

Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
---
 meta/classes/sanity.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ad9dda8..62dce92 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -271,6 +271,9 @@ def check_connectivity(d):
     test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
     retval = ""
 
+    # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
+    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
+        bb.data.setVar("BB_NO_NETWORK", "1", self.d)
     # Only check connectivity if network enabled and the
     # CONNECTIVITY_CHECK_URIS are set
     network_enabled = not d.getVar('BB_NO_NETWORK', True)
-- 
2.6.2



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

* [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
@ 2016-01-05 20:11 dl9pf
  2016-01-05 20:11 ` dl9pf
  0 siblings, 1 reply; 7+ messages in thread
From: dl9pf @ 2016-01-05 20:11 UTC (permalink / raw)
  To: yocto

Hi!

This patch fixes a bug in the sanity checker that is visible if
you set up a PREMIRROR and start a project from scratch using
BB_FETCH_PREMIRRORONLY set. In this case the sanity check would fail
as BB_NO_NETWORK is not set directly
(just indirectly in the fetcher by BB_FETCH_PREMIRRORONLY).

Reproduce: Set up a PREMIRROR in the local network. Disconnect from
$INTERNET and build a new project using the PREMIRROR on the local net only.

Expected result: Build works using the PREMIRROR

Actual result: Build fails due to CONNECTIVITY_CHECK

Best,
Jan-Simon


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

* [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
  2016-01-05 20:11 [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case dl9pf
@ 2016-01-05 20:11 ` dl9pf
  2016-01-07 23:42   ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: dl9pf @ 2016-01-05 20:11 UTC (permalink / raw)
  To: yocto

From: Jan-Simon Möller <dl9pf@gmx.de>

BB_FETCH_PREMIRRORONLY sets BB_NO_NETWORK (implicitly in the fetcher).
To avoid the sanity check to fail in an offline environment,
use the same override mechanism as in the fetcher.

Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
---
 meta/classes/sanity.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ad9dda8..62dce92 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -271,6 +271,9 @@ def check_connectivity(d):
     test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
     retval = ""
 
+    # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
+    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
+        bb.data.setVar("BB_NO_NETWORK", "1", self.d)
     # Only check connectivity if network enabled and the
     # CONNECTIVITY_CHECK_URIS are set
     network_enabled = not d.getVar('BB_NO_NETWORK', True)
-- 
2.6.2



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

* [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
  2016-01-05 20:17 [PATCH] [master, jethro] " dl9pf
@ 2016-01-05 20:17 ` dl9pf
  0 siblings, 0 replies; 7+ messages in thread
From: dl9pf @ 2016-01-05 20:17 UTC (permalink / raw)
  To: openembedded-core

From: Jan-Simon Möller <dl9pf@gmx.de>

BB_FETCH_PREMIRRORONLY sets BB_NO_NETWORK (implicitly in the fetcher).
To avoid the sanity check to fail in an offline environment,
use the same override mechanism as in the fetcher.

Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
---
 meta/classes/sanity.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ad9dda8..62dce92 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -271,6 +271,9 @@ def check_connectivity(d):
     test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
     retval = ""
 
+    # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
+    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
+        bb.data.setVar("BB_NO_NETWORK", "1", self.d)
     # Only check connectivity if network enabled and the
     # CONNECTIVITY_CHECK_URIS are set
     network_enabled = not d.getVar('BB_NO_NETWORK', True)
-- 
2.6.2



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

* Re: [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
  2016-01-05 20:11 ` dl9pf
@ 2016-01-07 23:42   ` Burton, Ross
  2016-01-15 20:38     ` Jan-SImon Möller
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2016-01-07 23:42 UTC (permalink / raw)
  To: dl9pf; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]

On 5 January 2016 at 20:11, <dl9pf@gmx.de> wrote:

> +    # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
> +    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not None:
> +        bb.data.setVar("BB_NO_NETWORK", "1", self.d)
>

Traceback (most recent call last):
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-intel-gpl/build/meta/classes/sanity.bbclass",
line 934, in check_sanity_eventhandler(e=<bb.event.SanityCheck object at
0x346f350>):
                 sanity_data.setVar("SANITY_USE_EVENTS", "1")
    >        reparse = check_sanity(sanity_data)
             e.data.setVar("BB_INVALIDCONF", reparse)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-intel-gpl/build/meta/classes/sanity.bbclass",
line 902, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at
0x3447dd0>):
         if last_sanity_version < sanity_version:
    >        check_sanity_version_change(status, sanity_data)
             status.addresult(check_sanity_sstate_dir_change(sstate_dir,
sanity_data))
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-intel-gpl/build/meta/classes/sanity.bbclass",
line 658, in check_sanity_version_change(status=<SanityStatus object at
0x3447510>, d=<bb.data_smart.DataSmart object at 0x3447dd0>):
         # Check that we can fetch from various network transports
    >    netcheck = check_connectivity(d)
         status.addresult(netcheck)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-intel-gpl/build/meta/classes/sanity.bbclass",
line 275, in check_connectivity(d=<bb.data_smart.DataSmart object at
0x3447dd0>):
         # Check for BB_FETCH_PREMIRRORONLY and adapt BB_NO_NETWORK
    >    if bb.data.getVar("BB_FETCH_PREMIRRORONLY", self.d, True) is not
None:
             bb.data.setVar("BB_NO_NETWORK", "1", self.d)
NameError: global name 'self' is not defined

Just use d, you don't need to use bb.data.getVar("foo", d, True) when
d.getVar("foo", True) is clearer.

Ross

[-- Attachment #2: Type: text/html, Size: 2861 bytes --]

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

* Re: [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case
  2016-01-07 23:42   ` Burton, Ross
@ 2016-01-15 20:38     ` Jan-SImon Möller
  0 siblings, 0 replies; 7+ messages in thread
From: Jan-SImon Möller @ 2016-01-15 20:38 UTC (permalink / raw)
  To: Burton, Ross; +Cc: yocto@yoctoproject.org

Hi Burton,

Thanks for the review. Clear case of brain bug from CnP. 
Yes, will resend. 

Best,
Jan-Simon

Am Donnerstag, 7. Januar 2016, 23:42:22 schrieb Burton, Ross:
> 
> Just use d, you don't need to use bb.data.getVar("foo", d, True) when
> d.getVar("foo", True) is clearer.
> 
> Ross

-- 
--
Jan-Simon Möller
dl9pf@gmx.de


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

end of thread, other threads:[~2016-01-15 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 20:11 [PATCH] Fix connectivity check for BB_FETCH_PREMIRRORONLY case dl9pf
2016-01-05 20:11 ` dl9pf
2016-01-07 23:42   ` Burton, Ross
2016-01-15 20:38     ` Jan-SImon Möller
  -- strict thread matches above, loose matches on Subject: below --
2016-01-05 20:17 [PATCH] [master, jethro] " dl9pf
2016-01-05 20:17 ` [PATCH] " dl9pf
2015-12-17 21:34 dl9pf
2015-12-17 20:58 dl9pf

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.