From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id 1DE9E65D58 for ; Thu, 18 Sep 2014 05:28:16 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.14.9/8.14.5) with ESMTP id s8I5SGIB006727 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 17 Sep 2014 22:28:17 -0700 (PDT) Received: from [128.224.162.194] (128.224.162.194) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.174.1; Wed, 17 Sep 2014 22:28:16 -0700 Message-ID: <541A6D64.50503@windriver.com> Date: Thu, 18 Sep 2014 13:28:04 +0800 From: Hongxu Jia User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: References: <4974ccfdd59cd584893c3026595e0045e9be3cd6.1410939794.git.hongxu.jia@windriver.com> In-Reply-To: <4974ccfdd59cd584893c3026595e0045e9be3cd6.1410939794.git.hongxu.jia@windriver.com> Subject: Re: [PATCH 6/9] sstate_lockedsig.bbclass: add event handler to dump lockedsigs at recipe building time X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 05:28:17 -0000 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Hi Richard, Is this patch not acceptable, it is not merged to master or master-next. //Hongxu On 09/17/2014 04:08 PM, Hongxu Jia wrote: > While the class in use, it adds a event handler at 'bb.event.BuildCompleted', > so after the build completed, it will dump the lockedsigs files. > > Use SIGGEN_LOCKEDSIGS_CONFIG variable controls where to dump the lockedsigs file, > the default is placed into ${SSTATE_DIR}/locked-sigs.inc. > > Signed-off-by: Hongxu Jia > --- > meta/classes/sstate_lockedsig.bbclass | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > create mode 100644 meta/classes/sstate_lockedsig.bbclass > > diff --git a/meta/classes/sstate_lockedsig.bbclass b/meta/classes/sstate_lockedsig.bbclass > new file mode 100644 > index 0000000..ea88260 > --- /dev/null > +++ b/meta/classes/sstate_lockedsig.bbclass > @@ -0,0 +1,12 @@ > +SIGGEN_LOCKEDSIGS_CONFIG ?= "${SSTATE_DIR}/locked-sigs.inc" > +addhandler sstate_dump_lockedsig > +sstate_dump_lockedsig[eventmask] = "bb.event.BuildCompleted" > +python sstate_dump_lockedsig() { > + d = e.data > + if e.getFailures(): > + return > + > + if hasattr(bb.parse.siggen, "dump_lockedsigs"): > + lockedsigs = d.getVar('SIGGEN_LOCKEDSIGS_CONFIG', True) > + bb.parse.siggen.dump_lockedsigs(lockedsigs) > +}