From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 1664CE00992; Wed, 15 Feb 2017 09:03:49 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 93774E00970 for ; Wed, 15 Feb 2017 09:03:46 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2017 09:03:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,166,1484035200"; d="scan'208";a="1095116525" Received: from jlock-mobl1.ger.corp.intel.com ([10.252.30.92]) by orsmga001.jf.intel.com with ESMTP; 15 Feb 2017 09:03:38 -0800 Message-ID: <1487178217.4342.10.camel@linux.intel.com> From: Joshua Lock To: "Reyna, David" , "toaster@yoctoproject.org" Date: Wed, 15 Feb 2017 17:03:37 +0000 In-Reply-To: <5E53D14CE4667A45B9A06760DE5D13D0C3430A5A@ALA-MBC.corp.ad.wrs.com> References: <5E53D14CE4667A45B9A06760DE5D13D0C3430A5A@ALA-MBC.corp.ad.wrs.com> X-Mailer: Evolution 3.22.4 (3.22.4-2.fc25) Mime-Version: 1.0 Subject: Re: [PATCH] toaster: resolve missing 'native[sdk]:' prefixes X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2017 17:03:49 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2017-02-15 at 06:04 +0000, Reyna, David wrote: > From da520beb19ee6a49178ae1181d12d088017acaf1 Mon Sep 17 00:00:00 > 2001 > From: David Reyna > 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 > --- >  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