From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E3D48E0092C; Mon, 23 Jan 2017 08:50:31 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [192.55.52.43 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 1D57AE0091A for ; Mon, 23 Jan 2017 08:50:27 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 23 Jan 2017 08:50:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,274,1477983600"; d="scan'208";a="56549508" Received: from jlock-mobl1.ger.corp.intel.com (HELO ijkelly-mobl.ger.corp.intel.com) ([10.252.25.46]) by fmsmga005.fm.intel.com with ESMTP; 23 Jan 2017 08:50:25 -0800 Message-ID: <1485190224.10885.7.camel@linux.intel.com> From: Joshua Lock To: "Reyna, David" , "toaster@yoctoproject.org" , "AVERY, BRIAN" Date: Mon, 23 Jan 2017 16:50:24 +0000 In-Reply-To: <5E53D14CE4667A45B9A06760DE5D13D0C3311DCC@ALA-MBA.corp.ad.wrs.com> References: <5E53D14CE4667A45B9A06760DE5D13D0C3311DCC@ALA-MBA.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: Mon, 23 Jan 2017 16:50:32 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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 > --- >  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