[OE-core] [PATCH 9/9] sstatesig: incremental dump lockedsigs
Hongxu Jia
hongxu.jia at windriver.com
Thu Sep 18 05:24:32 UTC 2014
On 09/18/2014 12:16 AM, Richard Purdie wrote:
> 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 at 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?
Agree, thanks for the improvement, I will send V3 with some trivial fixes.
//Hongxu
>
> Cheers,
>
> Richard
>
>
More information about the Openembedded-core
mailing list