Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Hongxu Jia <hongxu.jia@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 9/9] sstatesig: incremental dump lockedsigs
Date: Wed, 17 Sep 2014 17:16:36 +0100	[thread overview]
Message-ID: <1410970596.14624.108.camel@ted> (raw)
In-Reply-To: <7e57c471b593b7be818545b5da25869cb506bde1.1410939794.git.hongxu.jia@windriver.com>

On Wed, 2014-09-17 at 16:08 +0800, Hongxu Jia wrote:
> The idea of incremental sig is:
> 
> New sig file = Old sig file (if available) + New sig items in current build.
> 
> Limit the modification within the dump_lockedsigs, and add two variables
> 'self.lockedsigs_types' and 'self.lockedsigs_raw' keep old sig file.
> 
> How to config for incremental dump:
> ...
> USER_CLASSES += "sstate_lockedsig"
> SIGGEN_LOCKEDSIGS_CONFIG = "${TOPDIR}/locked-sigs.inc"
> require ${SIGGEN_LOCKEDSIGS_CONFIG}
> ...
> 
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>

I'm fine with the idea in principle. Why can't we do something like:

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index af7617e..1da282e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -158,10 +158,14 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
                 sortedk = sorted(types[t], key=lambda k: self.lockedpnmap[k.rsplit(".",1)[0]])
                 for k in sortedk:
                     fn = k.rsplit(".",1)[0]
+                    pn = self.lockedpnmap[fn]
                     task = k.rsplit(".",1)[1]
                     if k not in self.taskhash:
                         continue
-                    f.write("    " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n")
+                    if pn in self.lockedsigs and task in self.lockedsigs[pn] and self.hashtask[k] == self.lockedsigs[pn][task]:
+                        continue
+                    sigentry = pn + ":" + task + ":" + self.taskhash[k]
+                    f.write("    " + sigentry + " \\\n")
                 f.write('    "\n')
             f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
 

which is substantially simpler though?

Cheers,

Richard




  reply	other threads:[~2014-09-17 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  8:08 [PATCH V2 0/5] improve locked down sstate Hongxu Jia
2014-09-17  8:08 ` [PATCH 5/9] sstate: set SIGGEN_LOCKEDSIGS_CHECK_LEVEL default to error Hongxu Jia
2014-09-17  8:08 ` [PATCH 6/9] sstate_lockedsig.bbclass: add event handler to dump lockedsigs at recipe building time Hongxu Jia
2014-09-18  5:28   ` Hongxu Jia
2014-09-17  8:08 ` [PATCH 7/9] sstatesig.py: fix typo of locke sstate Hongxu Jia
2014-09-17  8:08 ` [PATCH 8/9] sstatesig: fix overrides behaviour to remove SIGGEN_LOCKEDSIGS_i586 Hongxu Jia
2014-09-17  8:08 ` [PATCH 9/9] sstatesig: incremental dump lockedsigs Hongxu Jia
2014-09-17 16:16   ` Richard Purdie [this message]
2014-09-17 16:21     ` Otavio Salvador
2014-09-18  5:20       ` Hongxu Jia
2014-09-18  5:24     ` Hongxu Jia

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=1410970596.14624.108.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox