All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
@ 2017-01-20 21:18 Reyna, David
  2017-01-23 16:50 ` Joshua Lock
  0 siblings, 1 reply; 13+ messages in thread
From: Reyna, David @ 2017-01-20 21:18 UTC (permalink / raw)
  To: toaster, AVERY, BRIAN

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..f1fc551 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                # break tie if missing 'native[sdk]:' prefix
+                if (len(candidates) == 2) and hasattr(event,'_package'):
+                    if (0 <= str(event._package).find('native-')):
+                        identifier = 'native:' + identifier
+                    if (0 <= str(event._package).find('nativesdk-')):
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]
 
         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
-- 
1.9.1


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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-01-20 21:18 [PATCH] toaster: resolve missing 'native[sdk]:' prefixes Reyna, David
@ 2017-01-23 16:50 ` Joshua Lock
  0 siblings, 0 replies; 13+ messages in thread
From: Joshua Lock @ 2017-01-23 16:50 UTC (permalink / raw)
  To: Reyna, David, toaster, AVERY, BRIAN

On Fri, 2017-01-20 at 21:18 +0000, Reyna, David wrote:
> Some task events are missing the 'virtual:native[sdk]:' prefixes.
> The Toaster has code to help match missing prefixes, but needs
> additional help resolving between 'native:' and 'nativesdk:', by
> way of the '_package' event field.
> 
> [YOCTO #10849]
> 
> Signed-off-by: David Reyna <David.Reyna@windriver.com>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
> b/bitbake/lib/bb/ui/buildinfohelper.py
> index 5ed150d..f1fc551 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
>                  candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
>                  if len(candidates) == 1:
>                      identifier = candidates[0]
> +                # break tie if missing 'native[sdk]:' prefix
> +                if (len(candidates) == 2) and
> hasattr(event,'_package'):
> +                    if (0 <= str(event._package).find('native-')):

Do we really need to create a new string object frmo event._package?
Isn't it already a string? What else might it be? None?

I think this might be more idiomatic Python if it were something like:

if event._package and event._package.startswith("native-"):

or, if the native- component isn't at the start

if event._package and "native-" in event._package:

> +                        identifier = 'native:' + identifier
> +                    if (0 <= str(event._package).find('nativesdk-
> ')):
> +                        identifier = 'nativesdk:' + identifier
> +                    candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> +                    if len(candidates) == 1:
> +                        identifier = candidates[0]
>  
>          assert identifier in self.internal_state['taskdata']
>          identifierlist = identifier.split(":")
> -- 
> 1.9.1


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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-06 22:07   ` Brian Avery
@ 2017-03-08 15:56     ` Reyna, David
  0 siblings, 0 replies; 13+ messages in thread
From: Reyna, David @ 2017-03-08 15:56 UTC (permalink / raw)
  To: Brian Avery; +Cc: toaster

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

I have replicated this error with 10849 fix in my tree, so this is something new. I am working on it.

- David

From: Brian Avery [mailto:avery.brian@gmail.com]
Sent: Monday, March 06, 2017 2:07 PM
To: Reyna, David
Cc: toaster@yoctoproject.org
Subject: Re: [Toaster] [PATCH] toaster: resolve missing 'native[sdk]:' prefixes

Unfortunately, https://bugzilla.yoctoproject.org/show_bug.cgi?id=11132 is preventing a full end to end test, so we should reverify this bug fix once the above is fixed.
-bavery
an intel employee

On Mon, Mar 6, 2017 at 2:05 PM, Brian Avery <avery.brian@gmail.com<mailto:avery.brian@gmail.com>> wrote:

submitted to bitbake

https://patchwork.openembedded.org/patch/137831/
-bavery
an intel employee

On Wed, Mar 1, 2017 at 4:24 PM, David Reyna <david.reyna@windriver.com<mailto:david.reyna@windriver.com>> wrote:
From: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..92d1a1c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                elif len(candidates) > 1 and hasattr(event,'_package'):
+                    if 'native-' in event._package:
+                        identifier = 'native:' + identifier
+                    if 'nativesdk-' in event._package:
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]

         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
--
1.9.1

--
_______________________________________________
toaster mailing list
toaster@yoctoproject.org<mailto:toaster@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/toaster



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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-06 22:06   ` Reyna, David
@ 2017-03-08  3:23     ` Brian Avery
  0 siblings, 0 replies; 13+ messages in thread
From: Brian Avery @ 2017-03-08  3:23 UTC (permalink / raw)
  To: Reyna, David; +Cc: toaster

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

yes. I fixed some of the stuff on the Contribute to Toaster page. Seemed to
work :).
-brian
an intel employee

On Mon, Mar 6, 2017 at 2:06 PM, Reyna, David <david.reyna@windriver.com>
wrote:

> Thanks! So you updated process seems to work?
>
>
>
> - David
>
>
>
> *From:* Brian Avery [mailto:avery.brian@gmail.com]
> *Sent:* Monday, March 06, 2017 2:05 PM
> *To:* Reyna, David
> *Cc:* toaster@yoctoproject.org
> *Subject:* Re: [Toaster] [PATCH] toaster: resolve missing 'native[sdk]:'
> prefixes
>
>
>
> submitted to bitbake
>
> https://patchwork.openembedded.org/patch/137831/
>
> -bavery
>
> an intel employee
>
>
>
> On Wed, Mar 1, 2017 at 4:24 PM, David Reyna <david.reyna@windriver.com>
> wrote:
>
> From: David Reyna <David.Reyna@windriver.com>
>
>
> Some task events are missing the 'virtual:native[sdk]:' prefixes.
> The Toaster has code to help match missing prefixes, but needs
> additional help resolving between 'native:' and 'nativesdk:', by
> way of the '_package' event field.
>
> [YOCTO #10849]
>
> Signed-off-by: David Reyna <David.Reyna@windriver.com>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/
> buildinfohelper.py
> index 5ed150d..92d1a1c 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
>                  candidates = [x for x in self.internal_state['taskdata'].keys()
> if x.endswith(identifier)]
>                  if len(candidates) == 1:
>                      identifier = candidates[0]
> +                elif len(candidates) > 1 and hasattr(event,'_package'):
> +                    if 'native-' in event._package:
> +                        identifier = 'native:' + identifier
> +                    if 'nativesdk-' in event._package:
> +                        identifier = 'nativesdk:' + identifier
> +                    candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> +                    if len(candidates) == 1:
> +                        identifier = candidates[0]
>
>          assert identifier in self.internal_state['taskdata']
>          identifierlist = identifier.split(":")
> --
> 1.9.1
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
>
>

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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-06 22:05 ` Brian Avery
  2017-03-06 22:06   ` Reyna, David
@ 2017-03-06 22:07   ` Brian Avery
  2017-03-08 15:56     ` Reyna, David
  1 sibling, 1 reply; 13+ messages in thread
From: Brian Avery @ 2017-03-06 22:07 UTC (permalink / raw)
  To: David Reyna; +Cc: toaster

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

Unfortunately, https://bugzilla.yoctoproject.org/show_bug.cgi?id=11132 is
preventing a full end to end test, so we should reverify this bug fix once
the above is fixed.
-bavery
an intel employee

On Mon, Mar 6, 2017 at 2:05 PM, Brian Avery <avery.brian@gmail.com> wrote:

> submitted to bitbakehttps://patchwork.openembedded.org/patch/137831/
>
> -bavery
> an intel employee
>
> On Wed, Mar 1, 2017 at 4:24 PM, David Reyna <david.reyna@windriver.com>
> wrote:
>
>> From: David Reyna <David.Reyna@windriver.com>
>>
>> Some task events are missing the 'virtual:native[sdk]:' prefixes.
>> The Toaster has code to help match missing prefixes, but needs
>> additional help resolving between 'native:' and 'nativesdk:', by
>> way of the '_package' event field.
>>
>> [YOCTO #10849]
>>
>> Signed-off-by: David Reyna <David.Reyna@windriver.com>
>> ---
>>  bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
>> b/bitbake/lib/bb/ui/buildinfohelper.py
>> index 5ed150d..92d1a1c 100644
>> --- a/bitbake/lib/bb/ui/buildinfohelper.py
>> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
>> @@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
>>                  candidates = [x for x in self.internal_state['taskdata'].keys()
>> if x.endswith(identifier)]
>>                  if len(candidates) == 1:
>>                      identifier = candidates[0]
>> +                elif len(candidates) > 1 and hasattr(event,'_package'):
>> +                    if 'native-' in event._package:
>> +                        identifier = 'native:' + identifier
>> +                    if 'nativesdk-' in event._package:
>> +                        identifier = 'nativesdk:' + identifier
>> +                    candidates = [x for x in
>> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
>> +                    if len(candidates) == 1:
>> +                        identifier = candidates[0]
>>
>>          assert identifier in self.internal_state['taskdata']
>>          identifierlist = identifier.split(":")
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> toaster mailing list
>> toaster@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/toaster
>>
>
>

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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-06 22:05 ` Brian Avery
@ 2017-03-06 22:06   ` Reyna, David
  2017-03-08  3:23     ` Brian Avery
  2017-03-06 22:07   ` Brian Avery
  1 sibling, 1 reply; 13+ messages in thread
From: Reyna, David @ 2017-03-06 22:06 UTC (permalink / raw)
  To: Brian Avery; +Cc: toaster

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

Thanks! So you updated process seems to work?

- David

From: Brian Avery [mailto:avery.brian@gmail.com]
Sent: Monday, March 06, 2017 2:05 PM
To: Reyna, David
Cc: toaster@yoctoproject.org
Subject: Re: [Toaster] [PATCH] toaster: resolve missing 'native[sdk]:' prefixes


submitted to bitbake

https://patchwork.openembedded.org/patch/137831/
-bavery
an intel employee

On Wed, Mar 1, 2017 at 4:24 PM, David Reyna <david.reyna@windriver.com<mailto:david.reyna@windriver.com>> wrote:
From: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..92d1a1c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                elif len(candidates) > 1 and hasattr(event,'_package'):
+                    if 'native-' in event._package:
+                        identifier = 'native:' + identifier
+                    if 'nativesdk-' in event._package:
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]

         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
--
1.9.1

--
_______________________________________________
toaster mailing list
toaster@yoctoproject.org<mailto:toaster@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/toaster


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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-02  0:24 David Reyna
@ 2017-03-06 22:05 ` Brian Avery
  2017-03-06 22:06   ` Reyna, David
  2017-03-06 22:07   ` Brian Avery
  0 siblings, 2 replies; 13+ messages in thread
From: Brian Avery @ 2017-03-06 22:05 UTC (permalink / raw)
  To: David Reyna; +Cc: toaster

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

submitted to bitbakehttps://patchwork.openembedded.org/patch/137831/

-bavery
an intel employee

On Wed, Mar 1, 2017 at 4:24 PM, David Reyna <david.reyna@windriver.com>
wrote:

> From: David Reyna <David.Reyna@windriver.com>
>
> Some task events are missing the 'virtual:native[sdk]:' prefixes.
> The Toaster has code to help match missing prefixes, but needs
> additional help resolving between 'native:' and 'nativesdk:', by
> way of the '_package' event field.
>
> [YOCTO #10849]
>
> Signed-off-by: David Reyna <David.Reyna@windriver.com>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/
> buildinfohelper.py
> index 5ed150d..92d1a1c 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
>                  candidates = [x for x in self.internal_state['taskdata'].keys()
> if x.endswith(identifier)]
>                  if len(candidates) == 1:
>                      identifier = candidates[0]
> +                elif len(candidates) > 1 and hasattr(event,'_package'):
> +                    if 'native-' in event._package:
> +                        identifier = 'native:' + identifier
> +                    if 'nativesdk-' in event._package:
> +                        identifier = 'nativesdk:' + identifier
> +                    candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> +                    if len(candidates) == 1:
> +                        identifier = candidates[0]
>
>          assert identifier in self.internal_state['taskdata']
>          identifierlist = identifier.split(":")
> --
> 1.9.1
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>

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

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

* [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
@ 2017-03-02  0:24 David Reyna
  2017-03-06 22:05 ` Brian Avery
  0 siblings, 1 reply; 13+ messages in thread
From: David Reyna @ 2017-03-02  0:24 UTC (permalink / raw)
  To: toaster

From: David Reyna <David.Reyna@windriver.com>

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..92d1a1c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                elif len(candidates) > 1 and hasattr(event,'_package'):
+                    if 'native-' in event._package:
+                        identifier = 'native:' + identifier
+                    if 'nativesdk-' in event._package:
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]
 
         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
-- 
1.9.1



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

* [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
@ 2017-03-02  0:12 Reyna, David
  0 siblings, 0 replies; 13+ messages in thread
From: Reyna, David @ 2017-03-02  0:12 UTC (permalink / raw)
  To: toaster, AVERY, BRIAN

From b50e74277d8d4556388e34e3e9ed30837e401ae4 Mon Sep 17 00:00:00 2001
From: David Reyna <David.Reyna@windriver.com>
Date: Wed, 1 Mar 2017 15:56:55 -0800
Subject: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..92d1a1c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,14 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                elif len(candidates) > 1 and hasattr(event,'_package'):
+                    if 'native-' in event._package:
+                        identifier = 'native:' + identifier
+                    if 'nativesdk-' in event._package:
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]
 
         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
-- 
1.9.1


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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-03-01 16:34   ` Brian Avery
@ 2017-03-01 16:35     ` Reyna, David
  0 siblings, 0 replies; 13+ messages in thread
From: Reyna, David @ 2017-03-01 16:35 UTC (permalink / raw)
  To: Brian Avery, Joshua Lock; +Cc: toaster

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

I might as well to a V3 just in case for future proofing (while I look to also  fixing the events themselves to make this obsolete).

I will send it later today.

- David

From: Brian Avery [mailto:avery.brian@gmail.com]
Sent: Wednesday, March 01, 2017 8:34 AM
To: Joshua Lock
Cc: Reyna, David; toaster@yoctoproject.org
Subject: Re: [Toaster] [PATCH] toaster: resolve missing 'native[sdk]:' prefixes

was about to push upstream, David did you want to do a V3 first that allows for candidates >2?
Right now, it only handles 1 or 2 candidates.

-b

On Wed, Feb 15, 2017 at 9:03 AM, Joshua Lock <joshua.g.lock@linux.intel.com<mailto:joshua.g.lock@linux.intel.com>> wrote:
On Wed, 2017-02-15 at 06:04 +0000, Reyna, David wrote:
> From da520beb19ee6a49178ae1181d12d088017acaf1 Mon Sep 17 00:00:00
> 2001
> From: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>
> Date: Tue, 14 Feb 2017 20:56:30 -0800
> Subject: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
>
> Some task events are missing the 'virtual:native[sdk]:' prefixes.
> The Toaster has code to help match missing prefixes, but needs
> additional help resolving between 'native:' and 'nativesdk:', by
> way of the '_package' event field.
>
> [YOCTO #10849]

This v2 looks much neater, thanks!

>
> Signed-off-by: David Reyna <David.Reyna@windriver.com<mailto:David.Reyna@windriver.com>>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
> b/bitbake/lib/bb/ui/buildinfohelper.py
> index 5ed150d..dee40c4 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
>                  candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
>                  if len(candidates) == 1:
>                      identifier = candidates[0]
> +                # break tie if missing 'native[sdk]:' prefix
> +                if (len(candidates) == 2) and
> hasattr(event,'_package'):

Out of interest, can we have more than 2 candidates here? Should we
just have something like:

if len(candidates) == 1:
  # pick that identifier
elif len(candidates) > 1 and hasattr(event, '_package'):
  # break the tie

Thanks,

Joshua

> +                    if 'native-' in event._package:
> +                        identifier = 'native:' + identifier
> +                    if 'nativesdk-' in event._package:
> +                        identifier = 'nativesdk:' + identifier
> +                    candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> +                    if len(candidates) == 1:
> +                        identifier = candidates[0]
>
>          assert identifier in self.internal_state['taskdata']
>          identifierlist = identifier.split(":")
> --
> 1.9.1
--
_______________________________________________
toaster mailing list
toaster@yoctoproject.org<mailto:toaster@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/toaster


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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-02-15 17:03 ` Joshua Lock
@ 2017-03-01 16:34   ` Brian Avery
  2017-03-01 16:35     ` Reyna, David
  0 siblings, 1 reply; 13+ messages in thread
From: Brian Avery @ 2017-03-01 16:34 UTC (permalink / raw)
  To: Joshua Lock; +Cc: toaster

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

was about to push upstream, David did you want to do a V3 first that allows
for candidates >2?
Right now, it only handles 1 or 2 candidates.

-b

On Wed, Feb 15, 2017 at 9:03 AM, Joshua Lock <joshua.g.lock@linux.intel.com>
wrote:

> On Wed, 2017-02-15 at 06:04 +0000, Reyna, David wrote:
> > From da520beb19ee6a49178ae1181d12d088017acaf1 Mon Sep 17 00:00:00
> > 2001
> > From: David Reyna <David.Reyna@windriver.com>
> > Date: Tue, 14 Feb 2017 20:56:30 -0800
> > Subject: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
> >
> > Some task events are missing the 'virtual:native[sdk]:' prefixes.
> > The Toaster has code to help match missing prefixes, but needs
> > additional help resolving between 'native:' and 'nativesdk:', by
> > way of the '_package' event field.
> >
> > [YOCTO #10849]
>
> This v2 looks much neater, thanks!
>
> >
> > Signed-off-by: David Reyna <David.Reyna@windriver.com>
> > ---
> >  bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
> > b/bitbake/lib/bb/ui/buildinfohelper.py
> > index 5ed150d..dee40c4 100644
> > --- a/bitbake/lib/bb/ui/buildinfohelper.py
> > +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> > @@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
> >                  candidates = [x for x in
> > self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> >                  if len(candidates) == 1:
> >                      identifier = candidates[0]
> > +                # break tie if missing 'native[sdk]:' prefix
> > +                if (len(candidates) == 2) and
> > hasattr(event,'_package'):
>
> Out of interest, can we have more than 2 candidates here? Should we
> just have something like:
>
> if len(candidates) == 1:
>   # pick that identifier
> elif len(candidates) > 1 and hasattr(event, '_package'):
>   # break the tie
>
> Thanks,
>
> Joshua
>
> > +                    if 'native-' in event._package:
> > +                        identifier = 'native:' + identifier
> > +                    if 'nativesdk-' in event._package:
> > +                        identifier = 'nativesdk:' + identifier
> > +                    candidates = [x for x in
> > self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> > +                    if len(candidates) == 1:
> > +                        identifier = candidates[0]
> >
> >          assert identifier in self.internal_state['taskdata']
> >          identifierlist = identifier.split(":")
> > --
> > 1.9.1
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>

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

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

* Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
  2017-02-15  6:04 Reyna, David
@ 2017-02-15 17:03 ` Joshua Lock
  2017-03-01 16:34   ` Brian Avery
  0 siblings, 1 reply; 13+ messages in thread
From: Joshua Lock @ 2017-02-15 17:03 UTC (permalink / raw)
  To: Reyna, David, toaster

On Wed, 2017-02-15 at 06:04 +0000, Reyna, David wrote:
> From da520beb19ee6a49178ae1181d12d088017acaf1 Mon Sep 17 00:00:00
> 2001
> From: David Reyna <David.Reyna@windriver.com>
> Date: Tue, 14 Feb 2017 20:56:30 -0800
> Subject: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
> 
> Some task events are missing the 'virtual:native[sdk]:' prefixes.
> The Toaster has code to help match missing prefixes, but needs
> additional help resolving between 'native:' and 'nativesdk:', by
> way of the '_package' event field.
> 
> [YOCTO #10849]

This v2 looks much neater, thanks!

> 
> Signed-off-by: David Reyna <David.Reyna@windriver.com>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
> b/bitbake/lib/bb/ui/buildinfohelper.py
> index 5ed150d..dee40c4 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
>                  candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
>                  if len(candidates) == 1:
>                      identifier = candidates[0]
> +                # break tie if missing 'native[sdk]:' prefix
> +                if (len(candidates) == 2) and
> hasattr(event,'_package'):

Out of interest, can we have more than 2 candidates here? Should we
just have something like:

if len(candidates) == 1:
  # pick that identifier
elif len(candidates) > 1 and hasattr(event, '_package'): 
  # break the tie

Thanks,

Joshua

> +                    if 'native-' in event._package:
> +                        identifier = 'native:' + identifier
> +                    if 'nativesdk-' in event._package:
> +                        identifier = 'nativesdk:' + identifier
> +                    candidates = [x for x in
> self.internal_state['taskdata'].keys() if x.endswith(identifier)]
> +                    if len(candidates) == 1:
> +                        identifier = candidates[0]
>  
>          assert identifier in self.internal_state['taskdata']
>          identifierlist = identifier.split(":")
> -- 
> 1.9.1


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

* [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
@ 2017-02-15  6:04 Reyna, David
  2017-02-15 17:03 ` Joshua Lock
  0 siblings, 1 reply; 13+ messages in thread
From: Reyna, David @ 2017-02-15  6:04 UTC (permalink / raw)
  To: toaster, LOCK, JOSHUA

From da520beb19ee6a49178ae1181d12d088017acaf1 Mon Sep 17 00:00:00 2001
From: David Reyna <David.Reyna@windriver.com>
Date: Tue, 14 Feb 2017 20:56:30 -0800
Subject: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes

Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..dee40c4 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                # break tie if missing 'native[sdk]:' prefix
+                if (len(candidates) == 2) and hasattr(event,'_package'):
+                    if 'native-' in event._package:
+                        identifier = 'native:' + identifier
+                    if 'nativesdk-' in event._package:
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]
 
         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
-- 
1.9.1


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

end of thread, other threads:[~2017-03-08 15:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20 21:18 [PATCH] toaster: resolve missing 'native[sdk]:' prefixes Reyna, David
2017-01-23 16:50 ` Joshua Lock
2017-02-15  6:04 Reyna, David
2017-02-15 17:03 ` Joshua Lock
2017-03-01 16:34   ` Brian Avery
2017-03-01 16:35     ` Reyna, David
2017-03-02  0:12 Reyna, David
2017-03-02  0:24 David Reyna
2017-03-06 22:05 ` Brian Avery
2017-03-06 22:06   ` Reyna, David
2017-03-08  3:23     ` Brian Avery
2017-03-06 22:07   ` Brian Avery
2017-03-08 15:56     ` Reyna, David

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.