From: Joshua Lock <joshua.g.lock@linux.intel.com>
To: "Reyna, David" <david.reyna@windriver.com>,
"toaster@yoctoproject.org" <toaster@yoctoproject.org>,
"AVERY, BRIAN" <brian.avery@intel.com>
Subject: Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes
Date: Mon, 23 Jan 2017 16:50:24 +0000 [thread overview]
Message-ID: <1485190224.10885.7.camel@linux.intel.com> (raw)
In-Reply-To: <5E53D14CE4667A45B9A06760DE5D13D0C3311DCC@ALA-MBA.corp.ad.wrs.com>
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
next prev parent reply other threads:[~2017-01-23 16:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 21:18 [PATCH] toaster: resolve missing 'native[sdk]:' prefixes Reyna, David
2017-01-23 16:50 ` Joshua Lock [this message]
-- strict thread matches above, loose matches on Subject: below --
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485190224.10885.7.camel@linux.intel.com \
--to=joshua.g.lock@linux.intel.com \
--cc=brian.avery@intel.com \
--cc=david.reyna@windriver.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.